[now bisected] i915: 2.6.36-rc2 hoses my Intel display
Chris Wilson
chris at chris-wilson.co.uk
Mon Aug 23 15:36:55 PDT 2010
On Mon, 23 Aug 2010 15:17:08 -0600, Jonathan Corbet <corbet at lwn.net> wrote:
> I went ahead and bisected the problem, which was added between -rc1 and
> -rc2. The end result is this:
Taking the patch at face value, the cause should be a mistake in error
handling. So the first step would be to identify which i2c_transfer()
failed.
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 093e914..6afc7cf 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -269,7 +269,7 @@ static bool intel_sdvo_read_byte(struct intel_sdvo *intel_sdvo, u8 addr, u8 *ch)
return true;
}
- DRM_DEBUG_KMS("i2c transfer returned %d\n", ret);
+ WARN(1, "i2c transfer failed, ret=%d\n", ret);
return false;
}
@@ -284,8 +284,13 @@ static bool intel_sdvo_write_byte(struct intel_sdvo *intel_sdvo, int addr, u8 ch
.buf = out_buf,
}
};
+ int ret;
+
+ if ((ret = i2c_transfer(intel_sdvo->base.i2c_bus, msgs, 1)) == 1)
+ return true;
- return i2c_transfer(intel_sdvo->base.i2c_bus, msgs, 1) == 1;
+ WARN(1, "i2c transfer failed, ret=%d\n", ret);
+ return false;
}
#define SDVO_CMD_NAME_ENTRY(cmd) {cmd, #cmd}
--
Chris Wilson, Intel Open Source Technology Centre
More information about the dri-devel
mailing list