From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, stable@kernel.org,
torvalds@linux-foundation.org
Cc: Justin Forbes <jmforbes@linuxtx.org>,
Zwane Mwaikambo <zwane@arm.linux.org.uk>,
"Theodore Ts'o" <tytso@mit.edu>,
Randy Dunlap <rdunlap@xenotime.net>,
Dave Jones <davej@redhat.com>,
Chuck Wolber <chuckw@quantumlinux.com>,
Chris Wedgwood <reviews@ml.cw.f00f.org>,
Michael Krufky <mkrufky@linuxtv.org>,
Chuck Ebbert <cebbert@redhat.com>,
Domenico Andreoli <cavokz@gmail.com>,
akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk,
rleigh@whinlatter.ukfsn.org, benh@kernel.crashing.org,
mb@bu3sch.de, khali@linux-fr.org, adaplas@pol.net
Subject: [patch 15/36] fb_ddc: fix DDC lines quirk
Date: Wed, 12 Dec 2007 22:34:42 -0800 [thread overview]
Message-ID: <20071213063442.GP25301@kroah.com> (raw)
In-Reply-To: <20071213063308.GA25301@kroah.com>
[-- Attachment #1: fb_ddc-fix-ddc-lines-quirk.patch --]
[-- Type: text/plain, Size: 3258 bytes --]
2.6.22-stable review patch. If anyone has any objections, please let us
know.
------------------
From: Jean Delvare <khali@linux-fr.org>
patch b64d70825abbf706bbe80be1b11b09514b71f45e in mainline.
The code in fb_ddc_read() is said to be based on the implementation of the
radeon driver:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=fc5891c8a3ba284f13994d7bc1f1bfa8283982de
However, comparing the old radeon driver code with the new fb_ddc code
reveals some differences. Most notably, the I2C bus lines are held at the
end of the function, while the original code was releasing them (as the
comment above correctly says.)
There are a few other differences, which appear to be responsible for read
failures on my system. While tracing low-level I2C code in i2c-algo-bit, I
noticed that the initial attempt to read the EDID always failed. It takes
one retry for the read to succeed. As we are about to remove this
automatic retry property from i2c-algo-bit, reading the EDID would really
fail.
As a summary, the I2C lines quirk which is supposedly needed to read EDID
on some older monitors is currently breaking the (first) read on all other
monitors (and might not even work with older ones - did anyone try since
October 2006?)
After applying the patch below, which makes the code in fb_ddc_read()
really similar to what the radeon driver used to have, the first EDID read
succeeds again.
On top of that, as it appears that this code has been broken for one year
now and nobody seems to have complained, I'm curious if it makes sense to
keep this quirk in place. It makes the code more complex and slower just
for the sake of monitors which I guess nobody uses anymore. Can't we just
get rid of it?
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Tested-by: Roger Leigh <rleigh@whinlatter.ukfsn.org>
Tested-by: Michael Buesch <mb@bu3sch.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/video/fb_ddc.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/video/fb_ddc.c
+++ b/drivers/video/fb_ddc.c
@@ -56,13 +56,12 @@ unsigned char *fb_ddc_read(struct i2c_ad
int i, j;
algo_data->setscl(algo_data->data, 1);
- algo_data->setscl(algo_data->data, 0);
for (i = 0; i < 3; i++) {
/* For some old monitors we need the
* following process to initialize/stop DDC
*/
- algo_data->setsda(algo_data->data, 0);
+ algo_data->setsda(algo_data->data, 1);
msleep(13);
algo_data->setscl(algo_data->data, 1);
@@ -97,14 +96,15 @@ unsigned char *fb_ddc_read(struct i2c_ad
algo_data->setsda(algo_data->data, 1);
msleep(15);
algo_data->setscl(algo_data->data, 0);
+ algo_data->setsda(algo_data->data, 0);
if (edid)
break;
}
/* Release the DDC lines when done or the Apple Cinema HD display
* will switch off
*/
- algo_data->setsda(algo_data->data, 0);
- algo_data->setscl(algo_data->data, 0);
+ algo_data->setsda(algo_data->data, 1);
+ algo_data->setscl(algo_data->data, 1);
return edid;
}
--
next prev parent reply other threads:[~2007-12-13 6:43 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071213062511.265908583@mini.kroah.org>
2007-12-13 6:33 ` [patch 00/36] 2.6.22-stable review Greg KH
2007-12-13 6:33 ` [patch 01/36] atl1: disable broken 64-bit DMA Greg KH
2007-12-13 6:33 ` [patch 02/36] rd: fix data corruption on memory pressure Future of Linux 2.6.22.y series Greg KH
2007-12-13 6:34 ` [patch 03/36] wait_task_stopped(): pass correct exit_code to wait_noreap_copyout() Greg KH
2007-12-13 6:34 ` [patch 04/36] USB: make the microtek driver and HAL cooperate Greg KH
2007-12-13 6:34 ` [patch 05/36] USB: fix up EHCI startup synchronization Greg KH
2007-12-13 6:34 ` [patch 06/36] tmpfs: restore missing clear_highpage Greg KH
2007-12-13 6:34 ` [patch 07/36] nf_nat: fix memset error Greg KH
2007-12-13 6:34 ` [patch 08/36] libcrc32c: keep intermediate crc state in cpu order Greg KH
2007-12-13 6:34 ` [patch 09/36] isdn: avoid copying overly-long strings Greg KH
2007-12-13 6:34 ` [patch 10/36] I4L: fix isdn_ioctl memory overrun vulnerability Greg KH
2007-12-13 6:34 ` [patch 11/36] hrtimers: avoid overflow for large relative timeouts (CVE-2007-5966) Greg KH
2007-12-13 6:34 ` [patch 12/36] futex: fix for futex_wait signal stack corruption Greg KH
2007-12-13 6:34 ` [patch 13/36] forcedeth: new mcp79 pci ids Greg KH
2007-12-13 6:34 ` [patch 14/36] forcedeth boot delay fix Greg KH
2007-12-13 6:34 ` Greg KH [this message]
2007-12-13 6:34 ` [patch 16/36] TCP: Problem bug with sysctl_tcp_congestion_control function Greg KH
2007-12-13 6:34 ` [patch 17/36] TCP: MTUprobe: fix potential sk_send_head corruption Greg KH
2007-12-13 6:34 ` [patch 18/36] PFKEY: Sending an SADB_GET responds with an SADB_GET Greg KH
2007-12-13 6:34 ` [patch 19/36] NET: Corrects a bug in ip_rt_acct_read() Greg KH
2007-12-13 6:34 ` [patch 20/36] IPV4: Remove bogus ifdef mess in arp_process Greg KH
2007-12-13 6:34 ` [patch 21/36] CRYPTO api: Fix potential race in crypto_remove_spawn Greg KH
2007-12-13 6:35 ` [patch 22/36] ATM: initialize lock and tasklet earlier Greg KH
2007-12-13 6:35 ` [patch 23/36] UNIX: EOF on non-blocking SOCK_SEQPACKET Greg KH
2007-12-13 6:35 ` [patch 24/36] TEXTSEARCH: Do not allow zero length patterns in the textsearch infrastructure Greg KH
2007-12-13 6:35 ` [patch 25/36] TCP: illinois: Incorrect beta usage Greg KH
2007-12-13 6:35 ` [patch 26/36] RXRPC: Add missing select on CRYPTO Greg KH
2007-12-13 6:35 ` [patch 27/36] IPV6: Restore IPv6 when MTU is big enough Greg KH
2007-12-13 6:35 ` [patch 28/36] DECNET: dn_nl_deladdr() almost always returns no error Greg KH
2007-12-13 6:35 ` [patch 29/36] BRIDGE: Lost call to br_fdb_fini() in br_init() error path Greg KH
2007-12-13 6:35 ` [patch 30/36] knfsd: Validate filehandle type in fsid_source Greg KH
2007-12-13 6:35 ` [patch 31/36] Revert "Fix SMP poweroff hangs" Greg KH
2007-12-13 6:35 ` [patch 32/36] XFS: Make xfsbufd threads freezable Greg KH
2007-12-13 18:46 ` Fortier,Vincent [Montreal]
2007-12-13 19:07 ` Olivér Pintér
2007-12-13 19:16 ` Olivér Pintér
2007-12-14 0:34 ` Greg KH
2007-12-13 6:35 ` [patch 33/36] XFRM: Fix leak of expired xfrm_states Greg KH
2007-12-13 6:35 ` [patch 34/36] NETFILTER: xt_TCPMSS: remove network triggerable WARN_ON Greg KH
2007-12-13 6:35 ` [patch 35/36] libata: kill spurious NCQ completion detection Greg KH
2007-12-13 6:35 ` [patch 36/36] BRIDGE: Properly dereference the br_should_route_hook Greg KH
2007-12-13 6:42 ` [stable] [patch 00/36] 2.6.22-stable review Greg KH
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=20071213063442.GP25301@kroah.com \
--to=gregkh@suse.de \
--cc=adaplas@pol.net \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=benh@kernel.crashing.org \
--cc=cavokz@gmail.com \
--cc=cebbert@redhat.com \
--cc=chuckw@quantumlinux.com \
--cc=davej@redhat.com \
--cc=jmforbes@linuxtx.org \
--cc=khali@linux-fr.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mb@bu3sch.de \
--cc=mkrufky@linuxtv.org \
--cc=rdunlap@xenotime.net \
--cc=reviews@ml.cw.f00f.org \
--cc=rleigh@whinlatter.ukfsn.org \
--cc=stable@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=zwane@arm.linux.org.uk \
/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