From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: Brian Vincent <brainn@gmail.com>, intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/5] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers
Date: Fri, 28 Sep 2018 21:03:59 +0300 [thread overview]
Message-ID: <20180928180403.22499-1-ville.syrjala@linux.intel.com> (raw)
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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 <brainn@gmail.com>
References: https://bugs.freedesktop.org/show_bug.cgi?id=108081
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
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 5ff1d79b86c4..3b400eab18a2 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -3276,6 +3276,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.16.4
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2018-09-28 18:03 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 18:03 Ville Syrjala [this message]
2018-09-28 18:04 ` [PATCH 2/5] drm/dp/mst: Validate REMOTE_I2C_READ harder Ville Syrjala
2018-12-07 23:11 ` Dhinakaran Pandiyan
2018-09-28 18:04 ` [PATCH 3/5] drm/dp: Implement I2C_M_STOP for i2c-over-aux Ville Syrjala
2018-12-11 2:47 ` Dhinakaran Pandiyan
2018-12-12 10:30 ` Daniel Vetter
2018-12-12 12:12 ` Ville Syrjälä
2018-09-28 18:04 ` [PATCH 4/5] drm/dp/mst: Provide defines for ACK vs. NAK reply type Ville Syrjala
2018-12-08 0:22 ` [Intel-gfx] " Dhinakaran Pandiyan
2018-09-28 18:04 ` [PATCH 5/5] drm/dp/mst: Provide better debugs for NAK replies Ville Syrjala
2018-09-28 21:55 ` kbuild test robot
2018-12-08 0:57 ` [Intel-gfx] " Dhinakaran Pandiyan
2018-12-08 1:05 ` Dhinakaran Pandiyan
2018-10-01 11:55 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/dp/mst: Configure no_stop_bit correctly for remote i2c xfers Patchwork
2018-10-01 12:18 ` ✓ Fi.CI.BAT: success " Patchwork
2018-10-01 13:56 ` ✓ Fi.CI.IGT: " Patchwork
2018-12-07 20:45 ` [PATCH 1/5] " Dhinakaran Pandiyan
2018-12-07 22:52 ` [Intel-gfx] " Dhinakaran Pandiyan
2018-12-10 16:39 ` Ville Syrjälä
2018-12-10 20:09 ` [Intel-gfx] " Dhinakaran Pandiyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180928180403.22499-1-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=brainn@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox