Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1002078yba; Thu, 4 Apr 2019 02:09:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqze/4RwPfVh56UAY5xn9tuQWxiL6oSV8uHKFhWB0OTGzdRERPHjt3pUh5gUmGT0JZzhEn+R X-Received: by 2002:a62:1b03:: with SMTP id b3mr4757758pfb.150.1554368970806; Thu, 04 Apr 2019 02:09:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554368970; cv=none; d=google.com; s=arc-20160816; b=OnAmeQvDFeskqqDJXGKkbkUrG8uQsFnIZBB7KWMgx5MnChau0wmqKuox2vF+14MoWc snuuuzyHpdm5If/VvIHmRyzdEo4l586xsZxUByZ7tnoQX0FFzlv8wQw6YBDgwUYdL3GM CwdO4VI9dhARYcs3gwzxvyNce9izjuqqW0aE+KmtJHdIIdUYiY1vF9yiU///lSKdGRtN t2l0sR4BqgPXDIZ9WLH+/7fR3joBImKU/n+j9FEhM/3fs7eqCm2WSqm1di+6RRKKxUwG rCiIfJlXnixF+nSaZK3gkn6OLPDR1/6dO9BPbrkZ0pj4G00nJ0yLqsf8xkxctSrM5Eu6 cRvw== 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=73xprhGj5/K7Fh8OTfoCK0VZttB/EMQ1wPcLXf29MyY=; b=pI+yXPuGM8pm0ASMq0HzCRpjrJx8xDFCBG4ck+eULN5N6KRUvGgBSdJD914RqS2YdP bN9XAdhA2C6H/ptBJcbKtPFnKvIqDwtOURx4ECHLW7API4cmMkDqNwMxlp8Ii0on6hOL CRpj/AJbwPGJUi6T6nlc8WFsPso3E54/gY+rapP/wxflEdIlsx5ecxd8Vwopww7t3HnD DjeCsAdOK21pFLsKdn9mQ8NZvaYung2ux/BLrP9fY/Kd+d3GnS+o41BGnEevNyU56zZn 0axNij2sTN5szr7O+l3aRfzlH3OxtfdaM/qJBGvqcg+fgENkgcFFATZIHjN2usAkmeXu SASQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=otETm6ye; 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 f65si16274806pff.195.2019.04.04.02.09.15; Thu, 04 Apr 2019 02:09:30 -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=otETm6ye; 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 S1732514AbfDDJHb (ORCPT + 99 others); Thu, 4 Apr 2019 05:07:31 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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