intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/i915: Pass the correct msgs to gmbus_is_index_read()
@ 2017-11-23 19:41 Ville Syrjala
  2017-11-23 19:41 ` [PATCH 2/3] drm/i915: Don't try indexed reads to alternate slave addresses Ville Syrjala
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Ville Syrjala @ 2017-11-23 19:41 UTC (permalink / raw)
  To: intel-gfx; +Cc: stable, Daniel Kurtz, Chris Wilson, Daniel Vetter, Sean Paul

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We're supposed to examine msgs[i] and msgs[i+1] to see if they
form a pair suitable for an indexed transfer. But in reality
we're examining msgs[0] and msgs[1]. Fix this.

Cc: stable@vger.kernel.org
Cc: Daniel Kurtz <djkurtz@chromium.org>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <seanpaul@chromium.org>
Fixes: 56f9eac05489 ("drm/i915/intel_i2c: use INDEX cycles for i2c read transactions")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index eb5827110d8f..165375cbef2f 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -484,7 +484,7 @@ do_gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
 
 	for (; i < num; i += inc) {
 		inc = 1;
-		if (gmbus_is_index_read(msgs, i, num)) {
+		if (gmbus_is_index_read(&msgs[i], i, num)) {
 			ret = gmbus_xfer_index_read(dev_priv, &msgs[i]);
 			inc = 2; /* an index read is two msgs */
 		} else if (msgs[i].flags & I2C_M_RD) {
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-11-24 16:06 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23 19:41 [PATCH 1/3] drm/i915: Pass the correct msgs to gmbus_is_index_read() Ville Syrjala
2017-11-23 19:41 ` [PATCH 2/3] drm/i915: Don't try indexed reads to alternate slave addresses Ville Syrjala
2017-11-23 20:52   ` Chris Wilson
2017-11-23 19:41 ` [PATCH 3/3] drm/i915: Prevent zero length "index" write Ville Syrjala
2017-11-23 20:53   ` Chris Wilson
2017-11-23 20:12 ` ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Pass the correct msgs to gmbus_is_index_read() Patchwork
2017-11-23 20:50 ` [PATCH 1/3] " Chris Wilson
2017-11-24 12:55   ` Ville Syrjälä
2017-11-24 16:06     ` Ville Syrjälä
2017-11-23 23:39 ` ✓ Fi.CI.IGT: success for series starting with [1/3] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).