Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5407444ybi; Wed, 12 Jun 2019 01:55:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqwM7Z+ks3GWO4LHdz/KElaY11OACc0n9+81i5PF4FTzBIAXlzNnfZHhxxWHeOq25trst/1k X-Received: by 2002:a17:90a:a415:: with SMTP id y21mr31803670pjp.75.1560329727067; Wed, 12 Jun 2019 01:55:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560329727; cv=none; d=google.com; s=arc-20160816; b=BwpHmLc+YMLteeKQ5oVm882YtTD3WwOUfMmukjrSeDcvRPqQgPhHFtKKzmgkrBbnJd 9rODCsWBastcSf3E2VzCziBgD8LxrKBzECbwwkt5NYFlbZ3bYJLs6A9VYtoDIQdPEX/p 1CMAsv78ysbIqXXuFS2lX91AT7ul7aFc/IXE3G4EyxdMdFZHhGTZQ9z6SM6doi0xJvlN WngYY7qU6KC5MIKp1QLa9n8gqTd1VwZ+KXb8usqO7cYJY9Z8mVT49q4shv/ABTSQChzA w9W4EU+apLr/TlpLDsTn20IVAzPntvIU1H9sHYZisEOlrSwR1H4WKaJYmTWf5vXpRY2w Tl0g== 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=IkoTSU+mzhOTwZNjhoLWJnr2hoktBFVx8r5EH1CrPa8DcVDjH2+faF81oQ9CImRnyW Y15BZlPKhGNhxsseqwvWZXfAOSIhdh17ZcHW8dLnFdKMtAfBCNZGLcdmhlJHA+d1K2oy qNPRSi1gYnzX1CIN9tU0s0V9g6oxKtwn8MYtJbhUS/l5LS+32iG0HgfCztVvceNY78No XxwP39udRR3+wSguBLsOx2YfUAfMG6FmI41wE5ZhNINCzQ4jwwfMjLANjKslPCAeJnFY 3X0s347527jI2VrQwO8tBp8DUK/hdHdCTN+pNqJyUjdBt5loEq3+7wtVskks4sMd+zv9 YR6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=mOvvwzHP; 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 f12si10298031plo.100.2019.06.12.01.55.12; Wed, 12 Jun 2019 01:55:27 -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=mOvvwzHP; 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 S2407783AbfFLIdU (ORCPT + 99 others); Wed, 12 Jun 2019 04:33:20 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:45180 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407739AbfFLIdS (ORCPT ); Wed, 12 Jun 2019 04:33:18 -0400 Received: by mail-pl1-f194.google.com with SMTP id bi6so5935155plb.12 for ; Wed, 12 Jun 2019 01:33:18 -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=mOvvwzHPXtbeJQJgKDqkLn87pkjQYbEZSLBgDdPr55YYhw+JQsnz0osXnx9SgcHM5D gSzYvEVPSL8B+n/X+xXWESg15Z+8sGqkJxi79mI3UsMehPqzERZvOp/WNs6E/j9Xlsyq Rp/vsYZ4C62qzKb5k6grCJPVN9VToVF+hpYC28tEPuMZQ3m0ZXeWmXqxT5OIOTY8RcTM zzhd6hX9TnBrH1POf6+nxLfSXP2oRx7wcA3cPU0QhtPQ5TB4iflsgGyDcj0C/nMEHKhA FqCw4FjJwh91q/jqWkWUE2bA50rFcvRtZ5cn58PHtFeo+2L3qqSaWS4m77U6XRxTIkQ0 pBVg== 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=dmPg6+dQVxMRUgXhOEjrjqTfl1mSISZzOONhuYxOlMak0wQsWE3riJ8Vkw9W+pjwH3 Jc+WdxudaNuAPB+nMUuNekQMcbqg92gV+nHLc6ba05Xr91f7Qc5fKPM9k7QkXz0VIDvt gbbfev4hM5WKNl77gOdGNur+aO9F8okw12XIT4Ap9jpOk4Olznlv2uT35SS+eoxoNdQp uFrauuHRyjXBxDPSiDykwPRukw2v6UWZ134OyLngrOineJXTh4i+dgyljVCzKaTCyoUQ fJRrtuJLayD/7ZwGAJUnmuvqQPU+ts2ekh5R7cqU8uUnvMdM3ldw1oc8YguBFg3QwzkC kioQ== X-Gm-Message-State: APjAAAXQOjDHxsDFMKY231h7Lu7y5+bPGaJkbojgJ/344lbwasvySRAo n2TyAxJqH2IFde+7hWlYCXQ= X-Received: by 2002:a17:902:20e9:: with SMTP id v38mr39306822plg.62.1560328398066; Wed, 12 Jun 2019 01:33:18 -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 d21sm18845991pfr.162.2019.06.12.01.33.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 12 Jun 2019 01:33:16 -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 v5 08/15] drm/bridge: tc358767: Increase AUX transfer length limit Date: Wed, 12 Jun 2019 01:32:45 -0700 Message-Id: <20190612083252.15321-9-andrew.smirnov@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190612083252.15321-1-andrew.smirnov@gmail.com> References: <20190612083252.15321-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