From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Damm Subject: [PATCH] aty128fb: ddc support Date: Wed, 16 Mar 2005 14:53:18 +0100 (CET) Message-ID: <20050316132625.316.60402.76665@localhost> Reply-To: linux-fbdev-devel@lists.sourceforge.net Received: from sc8-sf-mx2-b.sourceforge.net ([10.3.1.12] helo=sc8-sf-mx2.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.30) id 1DBYy0-0003oV-Sv for linux-fbdev-devel@lists.sourceforge.net; Wed, 16 Mar 2005 05:53:44 -0800 Received: from ns3.dataphone.se ([212.37.0.170] helo=mail-slave.dataphone.se) by sc8-sf-mx2.sourceforge.net with esmtp (Exim 4.41) id 1DBYxx-0005hr-UC for linux-fbdev-devel@lists.sourceforge.net; Wed, 16 Mar 2005 05:53:44 -0800 Sender: linux-fbdev-devel-admin@lists.sourceforge.net Errors-To: linux-fbdev-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-fbdev-devel@lists.sourceforge.net Cc: Magnus Damm , brad@neruo.com This patch adds DDC support to the ATI Rage 128 driver. The code is tested on my Apple G4 Cube and detects the 1600x1024 resolution of my SGI SW1600 monitor. The patch breaks out the i2c code from the radeon driver and puts it in a shared file called aty_ddc.c. There are some issues, please comment: 1) The new file aty_ddc.c should be used by both the radeon and the rage code. The Makefile-patch works for built-in drivers, but that's all. 2) The code affects the radeon code, but I have not tested it on a radeon. 3) I got the register definitions from the gatos code, but that code only had one I2C channel. And that channel did not detect my monitor. So I did some guess work and figured out that another channel existed. I suspect that channel 0 is mapped to the ADC port and channel 1 is mapped to the VGA port on my board. And I have not idea how this affects other Rage-based boards. 4) The DDC support is default off, and when enabled it currently overrides the selected video mode if a DDC-monitor is connected. 5) I saw that some patches float around that improves the radeon ddc code. These patches should be ported to this patch. Signed-off-by: Magnus Damm diff -urNp linux-2.6.11.4/drivers/video/aty/aty128fb.c linux-2.6.11.4-aty128fb_ddc/drivers/video/aty/aty128fb.c --- linux-2.6.11.4/drivers/video/aty/aty128fb.c 2005-03-16 10:56:18.000000000 +0100 +++ linux-2.6.11.4-aty128fb_ddc/drivers/video/aty/aty128fb.c 2005-03-16 11:15:10.960979816 +0100 @@ -29,10 +29,12 @@ * - PCI ID update * - replace ROM BIOS search * + * Magnus Damm + * - I2C/DDC probe support + * * Based off of Geert's atyfb.c and vfb.c. * * TODO: - * - monitor sensing (DDC) * - virtual display * - other platform support (only ppc/x86 supported) * - hardware cursor support @@ -87,6 +89,11 @@ #include