Subject: [PATCH] radeonfb: DDC i2c fix
From: Benjamin Herrenschmidt <[email-masked]>
To: Andrew Morton <[email-masked]>
Cc: Linux Fbdev development list <[email-masked]>
Date: Fri, 11 Mar 2005 16:46:10 +1100

Hi !

The radeonfb code for DDC probing (like it's X.org counterpart) uses to
leave the DDC clock & data lines asserted after the probing is complete.
This causes problems with some Apple monitors like the new Cinema HD
23", who will turn themselves off when that happens. This fixes it.

Signed-off-by: Benjamin Herrenschmidt <[email-masked]>

Index: linux-work/drivers/video/aty/radeon_i2c.c
===================================================================
--- linux-work.orig/drivers/video/aty/radeon_i2c.c	2005-01-24 17:09:44.000000000 +1100
+++ linux-work/drivers/video/aty/radeon_i2c.c	2005-03-04 17:26:42.000000000 +1100
@@ -236,6 +236,12 @@
 		if (edid)
 			break;
 	}
+	/* Release the DDC lines when done or the Apple Cinema HD display
+	 * will switch off
+	 */
+	OUTREG(reg, INREG(reg) & ~(VGA_DDC_CLK_OUT_EN | VGA_DDC_DATA_OUT_EN));
+	(void)INREG(reg);
+
 	if (out_edid)
 		*out_edid = edid;
 	if (!edid) {