[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/xorg-x11-drv-ati/devel radeon-6.6.2-pmac-bios.patch,NONE,1.1



Author: dwmw2

Update of /cvs/dist/rpms/xorg-x11-drv-ati/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv24426

Added Files:
	radeon-6.6.2-pmac-bios.patch 
Log Message:
Don't misdetect PC BIOS on pmac

radeon-6.6.2-pmac-bios.patch:
 radeon_bios.c |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletion(-)

--- NEW FILE radeon-6.6.2-pmac-bios.patch ---
From: Roland Scheidegger <rscheidegger_lists hispeed ch>
Date: Sat, 30 Sep 2006 13:14:42 +0000 (+0200)
Subject: radeon: Check ROM more thoroughly before treating it as an x86 BIOS.
X-Git-Url: http://gitweb.freedesktop.org/?p=xorg/driver/xf86-video-ati.git;a=commitdiff;h=c979c7f87fc449cc9631820101edff82c3013e66

radeon: Check ROM more thoroughly before treating it as an x86 BIOS.

This prevents the ROMs on some Mac cards getting treated as x86 BIOSen,
resulting in garbage values.
---

--- a/src/radeon_bios.c
+++ b/src/radeon_bios.c
@@ -45,6 +45,7 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn
 {
     RADEONInfoPtr info     = RADEONPTR(pScrn);
     int tmp;
+    unsigned short dptr;
 
     if (!(info->VBIOS = xalloc(RADEON_VBIOS_SIZE))) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
@@ -76,7 +77,22 @@ Bool RADEONGetBIOSInfo(ScrnInfoPtr pScrn
 	xfree (info->VBIOS);
 	info->VBIOS = NULL;
 	return FALSE;
-    } 
+    }
+
+    /* Verify it's an x86 BIOS not OF firmware, copied from radeonfb */
+    dptr = RADEON_BIOS16(0x18);
+    /* If PCI data signature is wrong assume x86 video BIOS anyway */
+    if (RADEON_BIOS32(dptr) != (('R' << 24) | ('I' << 16) | ('C' << 8) | 'P')) {
+       xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		   "ROM PCI data signature incorrect, ignoring\n");
+    }
+    else if (info->VBIOS[dptr + 0x14] != 0x0) {
+	xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+		   "Not an x86 BIOS ROM image, BIOS data will not be used\n");
+	xfree (info->VBIOS);
+	info->VBIOS = NULL;
+	return FALSE;
+    }
 
     if (info->VBIOS) info->ROMHeaderStart = RADEON_BIOS16(0x48);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]