rpms/kernel/F-11 drm-nouveau.patch, 1.51, 1.52 kernel.spec, 1.1647, 1.1648

Ben Skeggs bskeggs at fedoraproject.org
Tue Jun 16 00:23:34 UTC 2009


Author: bskeggs

Update of /cvs/pkgs/rpms/kernel/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1650

Modified Files:
	drm-nouveau.patch kernel.spec 
Log Message:
* Tue Jun 16 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.29.5-186
- nouveau: Use VBIOS image from PRAMIN in preference to PROM (#492658)



drm-nouveau.patch:

Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/drm-nouveau.patch,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -p -r1.51 -r1.52
--- drm-nouveau.patch	10 Jun 2009 06:42:31 -0000	1.51
+++ drm-nouveau.patch	16 Jun 2009 00:23:31 -0000	1.52
@@ -375,10 +375,10 @@ index 0000000..e3d354f
 +}	
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
 new file mode 100644
-index 0000000..29e26fb
+index 0000000..42006f1
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,4805 @@
+@@ -0,0 +1,4827 @@
 +/*
 + * Copyright 2005-2006 Erik Waling
 + * Copyright 2006 Stephane Marchesin
@@ -558,41 +558,63 @@ index 0000000..29e26fb
 +	pci_disable_rom(dev->pdev);
 +}
 +
++struct methods {
++	const char desc[8];
++	void (*loadbios)(struct drm_device *, 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(struct drm_device *dev, uint8_t *data)
 +{
-+	struct methods {
-+		const char desc[8];
-+		void (*loadbios)(struct drm_device *, 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;
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	struct methods *methods, *method;
++	int testscore = 3;
++
++	if (dev_priv->card_type < NV_50)
++		methods = nv04_methods;
++	else
++		methods = nv50_methods;
 +
-+	for (i = 0; i < sizeof(method) / sizeof(struct methods); i++) {
++	method = methods;
++	while (method->loadbios) {
 +		NV_TRACE(dev, "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(dev, data);
-+		method[i].score = score_vbios(dev, data, method[i].rw);
-+		if (method[i].score == testscore)
++		method->loadbios(dev, data);
++		method->score = score_vbios(dev, 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(dev, "Using BIOS image from %s\n",
-+					 method[i].desc);
-+				method[i].loadbios(dev, data);
++					 method->desc);
++				method->loadbios(dev, data);
 +				return true;
 +			}
++		}
++	}
 +
 +	NV_ERROR(dev, "No valid BIOS image found\n");
-+
 +	return false;
 +}
 +


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-11/kernel.spec,v
retrieving revision 1.1647
retrieving revision 1.1648
diff -u -p -r1.1647 -r1.1648
--- kernel.spec	16 Jun 2009 00:20:55 -0000	1.1647
+++ kernel.spec	16 Jun 2009 00:23:33 -0000	1.1648
@@ -2055,6 +2055,9 @@ fi
 # and build.
 
 %changelog
+* Tue Jun 16 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.29.5-186
+- nouveau: Use VBIOS image from PRAMIN in preference to PROM (#492658)
+
 * Tue Jun 16 2009 Dave Airlie <airlied at redhat.com> 2.6.29.5-185
 - drm-connector-dpms-fix.patch - allow hw to dpms off
 - drm-dont-frob-i2c.patch - don't play with i2c bits just do EDID




More information about the fedora-extras-commits mailing list