Since the introduction of XSERVER_LIBPCIACCESS BIOS reading is broken
on some hardware (SIS_650, SIS_760, maybe others) causing severe color
corruption. This is a proposed fix.

Xorg bug:
https://bugs.freedesktop.org/show_bug.cgi?id=19070

Related launchpad bug:
https://bugs.launchpad.net/xorg-server/+bug/264769

xf86-video-sis commit switching bios reading to libpciaccess:
http://cgit.freedesktop.org/xorg/driver/xf86-video-sis/commit/?id=585e03e6878dd257c694517be9ea231a6b3cfb66

Signed-off-by: Matteo Delfino <kendats...@gmail.com>
---

Apparently a small amount of code in the bios reading routine is
skipped if XSERVER_LIBPCIACCESS is detected. In version 0.9.4 that
portion of code is supposed to read the card BIOS using xf86ReadBIOS
(or xf86ReadDomainMemory) if xf86ReadPciBIOS has failed or
readpci=FALSE. It seems that for SIS_660 and SIS_760 readpci is set to
FALSE resulting in the following error using versions > 0.9.4:

(WW) SIS(0): Could not find/read video BIOS

This fix forces readpci = TRUE for SIS_660 and SIS_760, I don't know
if that's correct but applying the patch solves the problem.

 src/sis_driver.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/sis_driver.c b/src/sis_driver.c
index 994b02d..b19e7a9 100644
--- a/src/sis_driver.c
+++ b/src/sis_driver.c
@@ -4099,6 +4099,8 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
             case SIS_315H:
             case SIS_330:
             case SIS_340:
+            case SIS_650:
+            case SIS_760:
             case XGI_40:     readpci = TRUE;
                              break;
             case XGI_20:     readpci = TRUE;
-- 
1.6.3.3
_______________________________________________
xorg-devel mailing list
xorg-devel@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to