aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOndrej Zary2010-10-27 15:33:25 -0700
committerLinus Torvalds2010-10-27 18:03:08 -0700
commitf0a2f357d46a51f8066eb47b3dba40f87a680804 (patch)
treea2a8beb7b0996d2cb9fafe81ade2f4cda2005bdd
parent09b599ddd467911ad6b43f3abe3c533446662417 (diff)
savagefb: fix DDC for Savage 4
I tested savagefb on 3 different Savage 4 cards: Diamond Stealth III S520 Number Nine SR9 Datapath Horizon 2S (two savage chips on a PCI card) it worked except the DDC which did not work on any of them. Looking at the BIOS code, it does not use MMIO register 0xff20 but CRT register 0xa0 or 0xb1 - depending on the chip revision and something in register 0xa6. With this patch, DDC works fine on all 3 cards (even on the second head of Horizon 2S - although it does not display anything as it's misconfigured because of missing BIOS). Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/savage/savagefb-i2c.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
index ed371c868b3a..b16e6138fdd4 100644
--- a/drivers/video/savage/savagefb-i2c.c
+++ b/drivers/video/savage/savagefb-i2c.c
@@ -181,6 +181,15 @@ void savagefb_create_i2c_busses(struct fb_info *info)
par->chan.algo.getscl = prosavage_gpio_getscl;
break;
case FB_ACCEL_SAVAGE4:
+ par->chan.reg = CR_SERIAL1;
+ if (par->pcidev->revision > 1 && !(VGArCR(0xa6, par) & 0x40))
+ par->chan.reg = CR_SERIAL2;
+ par->chan.ioaddr = par->mmio.vbase;
+ par->chan.algo.setsda = prosavage_gpio_setsda;
+ par->chan.algo.setscl = prosavage_gpio_setscl;
+ par->chan.algo.getsda = prosavage_gpio_getsda;
+ par->chan.algo.getscl = prosavage_gpio_getscl;
+ break;
case FB_ACCEL_SAVAGE2000:
par->chan.reg = 0xff20;
par->chan.ioaddr = par->mmio.vbase;