From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF1B4C4360F for ; Thu, 4 Apr 2019 09:34:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE206205F4 for ; Thu, 4 Apr 2019 09:34:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554370459; bh=KsncSQmwXyNzpxdtPUx/Z6zjx0oYvLa/gLHYEStzoVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=SH2CqJhRrM/028/LQKHllk/yfnNVzPHFlRmaLzPq3iG7O6VC3orcnBa7MBYz1+RdG gYV2IUpKUNm7ywLNR8jxx9tXH4zMqEHyjy03wMuEdsi/gOpICdLSqzGOJZFlIkk8A3 JATv+3wm1neIPTJZbyP7Q3CnY+EFifSpyOIwHIHI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732505AbfDDJH1 (ORCPT ); Thu, 4 Apr 2019 05:07:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:46214 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732485AbfDDJHZ (ORCPT ); Thu, 4 Apr 2019 05:07:25 -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 1F32721741; Thu, 4 Apr 2019 09:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1554368844; bh=KsncSQmwXyNzpxdtPUx/Z6zjx0oYvLa/gLHYEStzoVg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=otETm6ye1sks9OkYgpRRnLV3hwQqp1NLr8GNMoy1hkBpHozoO1LU+jGbY7XKEAkng xJ6Tj1pn1+TQ17ziZjbZPK3YcflqT3CX11y1oY98myvDa+ylALkb51K43Hg/gBtENI E8A39dFDRKQ8cbl6+Dt8G22smgAwEH/DFfHujib8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brian Vincent , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Dhinakaran Pandiyan , Sasha Levin Subject: [PATCH 4.19 183/187] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers Date: Thu, 4 Apr 2019 10:48:40 +0200 Message-Id: <20190404084611.737098497@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190404084603.119654039@linuxfoundation.org> References: <20190404084603.119654039@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit c978ae9bde582e82a04c63a4071701691dd8b35c ] We aren't supposed to force a stop+start between every i2c msg when performing multi message transfers. This should eg. cause the DDC segment address to be reset back to 0 between writing the segment address and reading the actual EDID extension block. To quote the E-DDC spec: "... this standard requires that the segment pointer be reset to 00h when a NO ACK or a STOP condition is received." Since we're going to touch this might as well consult the I2C_M_STOP flag to determine whether we want to force the stop or not. Cc: Brian Vincent References: https://bugs.freedesktop.org/show_bug.cgi?id=108081 Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20180928180403.22499-1-ville.syrjala@linux.intel.com Reviewed-by: Dhinakaran Pandiyan Signed-off-by: Sasha Levin --- drivers/gpu/drm/drm_dp_mst_topology.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index d708472d93c4..65f58e23e03d 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3278,6 +3278,7 @@ static int drm_dp_mst_i2c_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs msg.u.i2c_read.transactions[i].i2c_dev_id = msgs[i].addr; msg.u.i2c_read.transactions[i].num_bytes = msgs[i].len; msg.u.i2c_read.transactions[i].bytes = msgs[i].buf; + msg.u.i2c_read.transactions[i].no_stop_bit = !(msgs[i].flags & I2C_M_STOP); } msg.u.i2c_read.read_i2c_device_id = msgs[num - 1].addr; msg.u.i2c_read.num_bytes_read = msgs[num - 1].len; -- 2.19.1