Re: [now bisected] i915: 2.6.36-rc2 hoses my Intel display

From: Chris Wilson
Date: Mon Aug 23 2010 - 18:37:10 EST


On Mon, 23 Aug 2010 15:17:08 -0600, Jonathan Corbet <corbet@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/