From: Chris Wilson Subject: Re: [now bisected] i915: 2.6.36-rc2 hoses my Intel display Date: Mon, 23 Aug 2010 23:36:55 +0100 Message-ID: <8u3s8d$jcc0rr@orsmga001.jf.intel.com> References: <20100823110145.08eb72fd@bike.lwn.net> <20100823151708.6b242599@bike.lwn.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id DD2C99E7D5 for ; Mon, 23 Aug 2010 15:36:59 -0700 (PDT) In-Reply-To: <20100823151708.6b242599@bike.lwn.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Jonathan Corbet Jonathan Corbet Cc: LKML , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, 23 Aug 2010 15:17:08 -0600, Jonathan Corbet 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