Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5671781img; Wed, 27 Mar 2019 12:54:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxF+q8VDAj8f1btVJMzXMdQlmX7Kr9eVeqyVuAltwnf2T3FtPmDDSlyenKhG/6kTYyr1YBL X-Received: by 2002:a63:ef07:: with SMTP id u7mr13304510pgh.0.1553716452320; Wed, 27 Mar 2019 12:54:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553716452; cv=none; d=google.com; s=arc-20160816; b=OTRTts4MosBN6QxXg8qLMgSkeNYX7XQyJp3GxkQbvdOp1iBwsi0SA9xW8AZ7zHX4mr K4Z+/OHJA5J9zV1zszCcp1FFi+5udv66SDX5rS1qqULhgurPDXCwZExfO8LGmSc9/6SB knXucgbbbVQRwzc4wNsvzeXI1tZE0/I+gEcV6RkIaAuOZDsnYR9faRwvcWw/qNDYq1Hy 83CSDHniE1z+I7TTXi5jvX2fFh+JLsbJZk6gTLaqp2KilvKN0DxDe+S00YkilcrDEaso U/Br5VwlUJ4cyaTsGvg0PQPUZanEnDrzAbX1GKerwN/fggQsbSc0I6DV07AmHRHFqZUu P+IQ== 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=mDmbWksUxQeDczoiMdi4ILDAWcfNfthd5xKFXEb1EzQ=; b=wwpJSJBpRpfajaM0UGs/mmiwg6XSMv85yQukFQ4I2ybSShcZVKrZ5k0JiCjJNnc4YC 0nZc+/v7y1myqFXQlP0U73iheQ6rLktzN/8MjYfbN9w6x6V5wvq9LWMeZ7VbSbBOk49z 3vyBHRfyQ7ka2QPHHLIII7LLRwWWb0I5ewGZm7DjaYhVkmd68ZKBok9xPva+wrXCUBqD VU0YQH03KqqA83/2UFgFJsDIoOX/L7OoqIwa68QdqOOIM7//s60RKltwGdFTWUMi/QxG 5E6FgOlLa+ctBFZwiiki2h/SSLQNh9xxafxsyBnVfcbuF3WStBqWUHO7Gb0H+YCr1QTY dbtg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CZ1E15Z2; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 137si11239464pge.63.2019.03.27.12.53.56; Wed, 27 Mar 2019 12:54:12 -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=CZ1E15Z2; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2403844AbfC0SjN (ORCPT + 99 others); Wed, 27 Mar 2019 14:39:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:41864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391466AbfC0SXW (ORCPT ); Wed, 27 Mar 2019 14:23:22 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0EBC62087C; Wed, 27 Mar 2019 18:23:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553711001; bh=kQrnVuvwbvZ/v2g+FXm7OZJkV6eVdxt6UV2qsS9yZqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CZ1E15Z21nbSjRO92zizqByD41twM4rRnvmf9yqQqOrcPotpa9gZwGtUEjS8rI2Ky Urfot96T875ynedwPS8nes8BsAa6T8meV6zwkDVo1Zm4qtoua1q4wiEYRPY5/ikFXn L6BBpZpxnqFD62BqjF5bgIs3HQ6u1/NiDa6ZHqww= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Brian Vincent , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 4.9 86/87] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers Date: Wed, 27 Mar 2019 14:20:39 -0400 Message-Id: <20190327182040.17444-86-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327182040.17444-1-sashal@kernel.org> References: <20190327182040.17444-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ville Syrjälä [ 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 b59441d109a5..4a959740058e 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3069,6 +3069,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