Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3397724ybp; Sun, 6 Oct 2019 11:03:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwdpxRTIeiQp2SZNEoWC4MixH1+8SAK/+zNeVW9KFa1weDMinY/f1SLNpsuySxaERiiGRWB X-Received: by 2002:a50:918d:: with SMTP id g13mr25467850eda.64.1570384981736; Sun, 06 Oct 2019 11:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384981; cv=none; d=google.com; s=arc-20160816; b=fwglDQO5Yb0kQMFayfPzCwBHerhQMNwjX92CEh1x25yezSQM4KeH16w+ouYGbSioR8 zD8BrbzbV9MH0w4h9q6dk22LM+HqCdvdfaPKBvtxGGL9M0M4sXsw9Ke8KbY1NHY8kox8 IqCLttrw1x0/ZuV5bFKgbgY89ktHClLtGFOAOfod97BJH5xpSEAvVc6TgGqfvpf84OUT oGyyQetxT8wTaT9Wpk9ePslrizRnga3NSKSdxtD4fVOBrYvkrSe9G1vx8NMyq1MJyp7K FBAVdubm8af0av3vRdZDUob80ADjvzlzw4eeb/h1Ecp3A8ZmTpETXlgGWaMMLu6KYHnB owkw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=LNsou017b8CsyfRoN0VEkbyEuWlFUTyeHgEo9i7KEe8=; b=SDhq/IekO1ni7NIV8KJKD6I3BiN0XJzHo1ZRdk4KPPQEp00/FBCcpFk4p+gjOMUgaE NSgXJ4tZgQXfXf/rUkqPNREFEezzWjW+TeUi9VxeetnGoK1oO5+qEh6uEEB1UEilvOHh AUH+TO1SiOJAjxZ2MV9PsXF3edS5bAGvyfPoONZiLMvfTm0GtW9UTE+6rNrvCaQfkwGQ WD6pMxx3K2lZUeU0Q/Xl9aZN+1dClNUqAAsElxu+j1saUIF19fhVGGC3kQapkSYWl2y/ HhS4l5/UyWEizVZXsUPWpoLtVOgOIJgHOihMWy8jz0N+gUge8AV95QCnv/RKJeoIFdu1 KETw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KbM1lBHq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b27si7095351ede.233.2019.10.06.11.02.37; Sun, 06 Oct 2019 11:03:01 -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=@kernel.org header.s=default header.b=KbM1lBHq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728099AbfJFSAW (ORCPT + 99 others); Sun, 6 Oct 2019 14:00:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:54852 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728942AbfJFR3J (ORCPT ); Sun, 6 Oct 2019 13:29:09 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 20EAE2080F; Sun, 6 Oct 2019 17:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570382948; bh=2Q/4MtwUVizCp4FO/MXsq8GYoPfKnljP6aUWr61tcrg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KbM1lBHq31a6rKXkMe0AVz7MuGC2ug3HA8llEYfJB4MWaG55A81B0X7maEucpd6It qiKgvYwU7c3SoSaee15kaAHUzIEL4lXHxWy+adIIUi/Y9DZAI2rXn32dI92DG/VZfP jO3cmf6rRuUYd+I5Da0YEzldvbhvvZc2IUp7+Ht0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andrey Smirnov , Andrzej Hajda , Tomi Valkeinen , Laurent Pinchart , Andrey Gusakov , Philipp Zabel , Cory Tusar , Chris Healy , Lucas Stach , dri-devel@lists.freedesktop.org, Sasha Levin Subject: [PATCH 4.19 003/106] drm/bridge: tc358767: Increase AUX transfer length limit Date: Sun, 6 Oct 2019 19:20:09 +0200 Message-Id: <20191006171126.240257065@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171124.641144086@linuxfoundation.org> References: <20191006171124.641144086@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andrey Smirnov [ Upstream commit e0655feaec62d5139b6b13a7b1bbb1ab8f1c2d83 ] 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 Reviewed-by: Tomi Valkeinen 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 Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20190619052716.16831-9-andrew.smirnov@gmail.com Signed-off-by: Sasha Levin --- 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 aaca5248da070..d728b6cf61096 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -302,7 +302,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; u8 *buf = msg->buffer; u32 tmp = 0; -- 2.20.1