Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8840908ybi; Thu, 6 Jun 2019 21:48:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwqvqGwefeAJO9eZJboU3Tt67buyZlPaatVvQv/5KXn2UDqvxkD4VvjHsfQc8jKvJkBHwij X-Received: by 2002:a17:902:522:: with SMTP id 31mr51025976plf.296.1559882938574; Thu, 06 Jun 2019 21:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559882938; cv=none; d=google.com; s=arc-20160816; b=S9/lspFlIQD6ygnhpKl3j7vptCDDAoNsvmMIkbVlFIyjW9L9ISAX2YUEoe7iSgHG8X HRB1rlzaSDklNoIWUgnR1s9c4DU2sxAHAACH7119rEsvPYOFeoyA0gxKuRCG9bWHbVe7 qf6Tuy7YQGuDZLf++yXd6O5Vbe2wP5Y6iE4a576SfaAM3rky6TFDgyjRMlPyGmkMbK1c 5FtbS8Kou0mejXGlfwppPcYS8jvgP3s9ZuAcWP64uVyaOt5iz4nb5dl2y0L8HtTAha1y 31PkK38RqN7tHoMsVv5a522w6yOH7qR4WcfNwfKi9mg2YyU8AE0PuEX+85AIpGV9q4e7 TzCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=NNIcg/6FzHv0SaLr8o+2YXmb6sNSUGijrDWegBfUk58=; b=HLh6wg9/tVd/i/vNLDWDNwb45JlTXBPj23XoZE8dyiQFrX06mrqWQh+Z2gpnA2Q3Uu Yc2tMaX8Wi3rpZfJRkRq+vcS6Wk+ttqEmYgwihIsw5bMkmDSoyG5JzX+Yxh5Cndg0xmB 0WNNCbLtkrswrobNOiA0B/ozoDWvquT+ua80yhAYQXYvEt6INCmjhzByq2qRpGGzgIrC znWe83JGJk7TYqRabTmIPgVnWRCLI8K4xu5AvczcuswBbYxnDx+2qE/FsQFI/K2tzxwE JcCl3hSsHrlpMtDYg9HsUmr4bFAKRG4OpmQCJMuA/on87ldqQT0kZiKW/1P5b03RzPsU fwFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HoVJ+oYD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c9si829692pjr.16.2019.06.06.21.48.30; Thu, 06 Jun 2019 21:48:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HoVJ+oYD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbfFGEqp (ORCPT + 99 others); Fri, 7 Jun 2019 00:46:45 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:36675 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726554AbfFGEqj (ORCPT ); Fri, 7 Jun 2019 00:46:39 -0400 Received: by mail-pf1-f195.google.com with SMTP id u22so467859pfm.3 for ; Thu, 06 Jun 2019 21:46:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NNIcg/6FzHv0SaLr8o+2YXmb6sNSUGijrDWegBfUk58=; b=HoVJ+oYD8J4ULPS9O8lxZd8yvoPINb8pNDoitMPebyRoxetwy3X8gqUHTiCymIAA4x 9FRpH6by3GCn4DvwoGa2vJ2dw1wxmwjj1PgmZkEILGuBiq5EKm+8RVetgs8ulQEqON/a 1KNu4Zi3RLzCUhRuw6PbUvaRrlux/CKHaDsEpc3CYpTM+z7vpn4VcY+wotHFSrWQzcIB 76nTrVbiWF31h288acQJXHUuKaNGEkHmG1P/xrQQvhTLUlK2KTsWacQMlvlBK4pZ8vjn o3rPtrbxfGy6n3Z2b1A/SBC6GLc/A+62Any+6k00II8vxT4ypfUa1x+8LK53rwmswWqE DXrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NNIcg/6FzHv0SaLr8o+2YXmb6sNSUGijrDWegBfUk58=; b=e8XD/VTxbi8J8SUMX+UuEtD5afHFz6fi2kE4FpmVwiggK0kh5BWqmNVO5FkADqygxg BG4O3mQK4Gr50W8cc5yUstkfW3DkcbZMPyyxW8CO/BasEz5rsq6DWcHAvNbfekNHMQYR X9KwduPxK59kg7fNFYmsgEswfeifcm0TBGFAIKX7FWLe2QpIotTqdyezeSJYYFH3MQE1 ZkhHfKlEqXSCZEAZtl7vEll3q0DKJibOlGV6wAVhtFyHfwcnyuXN2tvr/C6pKrSibcxj qEtRKtvbJLQbEMV1XYT5oDA1ODuRm0DHvqs/9207LUMjD/IGglO90LAYtoe9eGrouFHQ QZjw== X-Gm-Message-State: APjAAAW5pc2S5L5bs8Y8crQiWOQik9/ErWNi5XwxMtBbvFDrfFpu1WcT 9joNZEBQ7UY4PkdD7wgFQgQ= X-Received: by 2002:a17:90a:a397:: with SMTP id x23mr3542121pjp.118.1559882798281; Thu, 06 Jun 2019 21:46:38 -0700 (PDT) Received: from localhost.lan (c-24-22-235-96.hsd1.wa.comcast.net. [24.22.235.96]) by smtp.gmail.com with ESMTPSA id o13sm919516pfh.23.2019.06.06.21.46.36 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 06 Jun 2019 21:46:37 -0700 (PDT) From: Andrey Smirnov To: dri-devel@lists.freedesktop.org Cc: Andrey Smirnov , Andrzej Hajda , Laurent Pinchart , Tomi Valkeinen , Andrey Gusakov , Philipp Zabel , Cory Tusar , Chris Healy , Lucas Stach , linux-kernel@vger.kernel.org Subject: [PATCH v4 08/15] drm/bridge: tc358767: Increase AUX transfer length limit Date: Thu, 6 Jun 2019 21:45:43 -0700 Message-Id: <20190607044550.13361-9-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190607044550.13361-1-andrew.smirnov@gmail.com> References: <20190607044550.13361-1-andrew.smirnov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org According to the datasheet tc358767 can transfer up to 16 bytes via its AUX channel, so the artificial limit of 8 appears to be too low. However only up to 15-bytes seem to be actually supported and trying to use 16-byte transfers results in transfers failing sporadically (with bogus status in case of I2C transfers), so limit it to 15. Signed-off-by: Andrey Smirnov Reviewed-by: Andrzej Hajda Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Tomi Valkeinen Cc: Andrey Gusakov Cc: Philipp Zabel Cc: Cory Tusar Cc: Chris Healy Cc: Lucas Stach Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index e60692b8cd69..8b53dc8908d3 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -354,7 +354,7 @@ static ssize_t tc_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg) { struct tc_data *tc = aux_to_tc(aux); - size_t size = min_t(size_t, 8, msg->size); + size_t size = min_t(size_t, DP_AUX_MAX_PAYLOAD_BYTES - 1, msg->size); u8 request = msg->request & ~DP_AUX_I2C_MOT; int ret; -- 2.21.0