rpms/xorg-x11-drv-nouveau/F-11 nv50-pramin-vbios.patch, NONE, 1.1 nouveau-fptable-noerror.patch, 1.1, NONE

Ben Skeggs bskeggs at fedoraproject.org
Wed Jun 17 12:10:32 UTC 2009


Author: bskeggs

Update of /cvs/pkgs/rpms/xorg-x11-drv-nouveau/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv11315

Added Files:
	nv50-pramin-vbios.patch 
Removed Files:
	nouveau-fptable-noerror.patch 
Log Message:
update patches


nv50-pramin-vbios.patch:

--- NEW FILE nv50-pramin-vbios.patch ---
>From 1d8e2bc8022bb0f6e311dfbaa64311602ac82d50 Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs at redhat.com>
Date: Tue, 16 Jun 2009 10:28:00 +1000
Subject: [PATCH 8/8] bios: use image from PRAMIN in preference to PROM on NV50

There's at least one known case (rh#492658) where the DCB table present in
the VBIOS image from PROM is not suitable for use.  It contained all 16
entries filled, each entry valid in itself, but contradicting other entries.

The VBIOS image in PRAMIN however, still has all 16 entries filled, but the
first few entries now match what is present on the hardware, and the rest
are set as type 0xf, which we ignore.
---
 src/nv_bios.c |   66 +++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 43 insertions(+), 23 deletions(-)

diff --git a/src/nv_bios.c b/src/nv_bios.c
index ffd6b1f..2630916 100644
--- a/src/nv_bios.c
+++ b/src/nv_bios.c
@@ -190,42 +190,62 @@ static void load_vbios_pci(NVPtr pNv, uint8_t *data)
 #endif
 }
 
+struct methods {
+	const char desc[8];
+	void (*loadbios)(NVPtr, uint8_t *);
+	const bool rw;
+	int score;
+};
+
+static struct methods nv04_methods[] = {
+	{ "PROM", load_vbios_prom, false },
+	{ "PRAMIN", load_vbios_pramin, true },
+	{ "PCI ROM", load_vbios_pci, true }
+};
+
+static struct methods nv50_methods[] = {
+	{ "PRAMIN", load_vbios_pramin, true },
+	{ "PROM", load_vbios_prom, false },
+	{ "PCI ROM", load_vbios_pci, true }
+};
+
 static bool NVShadowVBIOS(ScrnInfoPtr pScrn, uint8_t *data)
 {
 	NVPtr pNv = NVPTR(pScrn);
-	struct methods {
-		const char desc[8];
-		void (*loadbios)(NVPtr, uint8_t *);
-		const bool rw;
-		int score;
-	} method[] = {
-		{ "PROM", load_vbios_prom, false },
-		{ "PRAMIN", load_vbios_pramin, true },
-		{ "PCI ROM", load_vbios_pci, true }
-	};
-	int i, testscore = 3;
-
-	for (i = 0; i < sizeof(method) / sizeof(struct methods); i++) {
+	struct methods *methods, *method;
+	int testscore = 3;
+
+	if (pNv->Architecture < NV_ARCH_50)
+		methods = nv04_methods;
+	else
+		methods = nv50_methods;
+
+	method = methods;
+	while (method->loadbios) {
 		NV_TRACE(pScrn, "Attempting to load BIOS image from %s\n",
-			 method[i].desc);
+			 method->desc);
 		data[0] = data[1] = 0;	/* avoid reuse of previous image */
-		method[i].loadbios(pNv, data);
-		method[i].score = score_vbios(pScrn, data, method[i].rw);
-		if (method[i].score == testscore)
+		method->loadbios(pNv, data);
+		method->score = score_vbios(pScrn, data, method->rw);
+		if (method->score == testscore)
 			return true;
+		method++;
 	}
 
-	while (--testscore > 0)
-		for (i = 0; i < sizeof(method) / sizeof(struct methods); i++)
-			if (method[i].score == testscore) {
+	while (--testscore > 0) {
+		method = methods;
+		while (method->loadbios) {
+			if (method->score == testscore) {
 				NV_TRACE(pScrn, "Using BIOS image from %s\n",
-					 method[i].desc);
-				method[i].loadbios(pNv, data);
+					 method->desc);
+				method->loadbios(pNv, data);
 				return true;
 			}
+			method++;
+		}
+	}
 
 	NV_ERROR(pScrn, "No valid BIOS image found\n");
-
 	return false;
 }
 
-- 
1.6.2.2



--- nouveau-fptable-noerror.patch DELETED ---




More information about the fedora-extras-commits mailing list