Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp5639442img; Wed, 27 Mar 2019 12:14:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqx7hod+MQhoghBATIiSnV6dopu+vdED+wBXgRJl07UnU7eITKna6wWqU/8AEkdY/iQsltXx X-Received: by 2002:a17:902:2927:: with SMTP id g36mr10636246plb.57.1553714041110; Wed, 27 Mar 2019 12:14:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553714041; cv=none; d=google.com; s=arc-20160816; b=R/pA5SjxdRJe1TcRzO+LeOuPbBmgnAj/gIekYYca0Rus7mC7+19AipAqSXciR871Zu ly3pxy5zIrzTkvGSKi9iz0j1c97cFqnn2fPpDwFvorvlCou637JrS8TRypUPS7PdhMjb ae5n6/mmPxe4kwvrmhzHUvTLJqk6YcowwzLn5XlXmpxzoV+9G05hNG6hwc9OVHnIYyKH 0bsHZdqBGMrVHgUhxrMCnkPSiRr08zx/nW27umpnwkaKyg+N8FoLSLx6pZz42LdXZ7zP Zbbsise6kQqrEJOtF+KSfxMotNIohKLca6Fo8bPL0z+TCm97C9e+KpHm7yOH3TqvqQ0Z JGuA== 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=DBMGt3Th+/VzhVhIDiJY5PcsloRder8ZeykwLKusCwA=; b=PbRCpVgGe/okfXkCIN1yvtkdtolthCq+LbmAHjnb4RE4DTSRfY9odGjdWDhsLPbRAH zReKQiU9oMLNJ1qjP9GYBFw01zS4dIbX8icRY18OqHhWsJPgnPXOisfV2RkuOKcwF3MJ vrh7QY4YRSqR+w58Y9bgrPcuYrK5jv1ySmfVx/i6W9IRLti++4dSZ0H+RLqjP77+JtgN qcnW1OOlXUxpjd1lVrfDUmn9vDTtDHec3dt5GwZNDQ6RIaqvl9xuhJZgJpDe+qjocyvQ JXBijWTA0xizmAednlMYof73LoIEEvWRI5XTp2H8d8I6aI+vMEPxcQDWgvkhnaK5jV8W cC9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bjf7ve5z; 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 a11si18779111pgw.243.2019.03.27.12.13.46; Wed, 27 Mar 2019 12:14: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=Bjf7ve5z; 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 S2388382AbfC0TNC (ORCPT + 99 others); Wed, 27 Mar 2019 15:13:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:52268 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388329AbfC0SKQ (ORCPT ); Wed, 27 Mar 2019 14:10:16 -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 675F72147C; Wed, 27 Mar 2019 18:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553710216; bh=E+ROpDuRuthJY2Hl4/oJtUg6QTmIEA3ZcneOCSQqwlc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bjf7ve5zi4qlMWIV+wVoVK3r+TYmved5fn0FgelutIaXqhtyam2PtPfQkWyLtGnoo U/VIzRW+CUMvw/PDKCSm06yUSuICI4x+YFWCOATywnrWiCFz3jgeTj10nNiLkCEV87 0+7csz3jHg99F/K3GUw7ViaajjuRULZJ34hEIJ14= 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 5.0 257/262] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers Date: Wed, 27 Mar 2019 14:01:52 -0400 Message-Id: <20190327180158.10245-257-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190327180158.10245-1-sashal@kernel.org> References: <20190327180158.10245-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 529414556962..1a244c53252c 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -3286,6 +3286,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