From: Chris Wilson <chris@chris-wilson.co.uk>
To: Jonathan Corbet <corbet@lwn.net>, Jonathan Corbet <corbet@lwn.net>
Cc: LKML <linux-kernel@vger.kernel.org>,
dri-devel@lists.freedesktop.org, Eric Anholt <eric@anholt.net>
Subject: Re: [now bisected] i915: 2.6.36-rc2 hoses my Intel display
Date: Mon, 23 Aug 2010 23:36:55 +0100 [thread overview]
Message-ID: <8u3s8d$jcc0rr@orsmga001.jf.intel.com> (raw)
In-Reply-To: <20100823151708.6b242599@bike.lwn.net>
On Mon, 23 Aug 2010 15:17:08 -0600, Jonathan Corbet <corbet@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
next prev parent reply other threads:[~2010-08-23 22:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-23 17:01 Jonathan Corbet
2010-08-23 21:17 ` [now bisected] " Jonathan Corbet
2010-08-23 22:36 ` Chris Wilson [this message]
2010-08-23 23:32 ` Jonathan Corbet
2010-08-23 23:37 ` Chris Wilson
2010-08-23 23:46 ` Jonathan Corbet
2010-08-23 23:55 ` Chris Wilson
2010-08-24 13:16 ` Jonathan Corbet
2010-08-24 13:37 ` Chris Wilson
2010-08-26 19:23 ` Maciej Rutecki
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='8u3s8d$jcc0rr@orsmga001.jf.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®