rpms/kernel/F-12 drm-nouveau.patch, 1.59, 1.60 kernel.spec, 1.1831, 1.1832

Ben Skeggs bskeggs at fedoraproject.org
Fri Sep 25 07:13:53 UTC 2009


Author: bskeggs

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

Modified Files:
	drm-nouveau.patch kernel.spec 
Log Message:
* Fri Sep 25 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.1-46
- drm-nouveau.patch: cleanups, fixes, pre-G80 s/r fixes, init rework



drm-nouveau.patch:
 drivers/gpu/drm/Kconfig                     |   45 
 drivers/gpu/drm/Makefile                    |    2 
 drivers/gpu/drm/i2c/Makefile                |    4 
 drivers/gpu/drm/i2c/ch7006_drv.c            |  531 
 drivers/gpu/drm/i2c/ch7006_mode.c           |  473 
 drivers/gpu/drm/i2c/ch7006_priv.h           |  344 
 drivers/gpu/drm/nouveau/Makefile            |   29 
 drivers/gpu/drm/nouveau/nouveau_acpi.c      |  125 
 drivers/gpu/drm/nouveau/nouveau_backlight.c |  155 
 drivers/gpu/drm/nouveau/nouveau_bios.c      | 5499 ++++++
 drivers/gpu/drm/nouveau/nouveau_bios.h      |  235 
 drivers/gpu/drm/nouveau/nouveau_bo.c        |  620 
 drivers/gpu/drm/nouveau/nouveau_calc.c      |  626 
 drivers/gpu/drm/nouveau/nouveau_channel.c   |  482 
 drivers/gpu/drm/nouveau/nouveau_connector.c |  761 
 drivers/gpu/drm/nouveau/nouveau_connector.h |   55 
 drivers/gpu/drm/nouveau/nouveau_crtc.h      |   95 
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |  157 
 drivers/gpu/drm/nouveau/nouveau_display.c   |  115 
 drivers/gpu/drm/nouveau/nouveau_dma.c       |  206 
 drivers/gpu/drm/nouveau/nouveau_dma.h       |  148 
 drivers/gpu/drm/nouveau/nouveau_drv.c       |  421 
 drivers/gpu/drm/nouveau/nouveau_drv.h       | 1281 +
 drivers/gpu/drm/nouveau/nouveau_encoder.h   |   66 
 drivers/gpu/drm/nouveau/nouveau_fb.h        |   47 
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  360 
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |   48 
 drivers/gpu/drm/nouveau/nouveau_fence.c     |  262 
 drivers/gpu/drm/nouveau/nouveau_gem.c       |  954 +
 drivers/gpu/drm/nouveau/nouveau_hw.c        | 1078 +
 drivers/gpu/drm/nouveau/nouveau_hw.h        |  448 
 drivers/gpu/drm/nouveau/nouveau_i2c.c       |  256 
 drivers/gpu/drm/nouveau/nouveau_i2c.h       |   45 
 drivers/gpu/drm/nouveau/nouveau_ioc32.c     |   72 
 drivers/gpu/drm/nouveau/nouveau_irq.c       |  688 
 drivers/gpu/drm/nouveau/nouveau_mem.c       |  572 
 drivers/gpu/drm/nouveau/nouveau_notifier.c  |  195 
 drivers/gpu/drm/nouveau/nouveau_object.c    | 1294 +
 drivers/gpu/drm/nouveau/nouveau_reg.h       |  788 
 drivers/gpu/drm/nouveau/nouveau_sgdma.c     |  318 
 drivers/gpu/drm/nouveau/nouveau_state.c     |  872 +
 drivers/gpu/drm/nouveau/nouveau_swmthd.h    |   33 
 drivers/gpu/drm/nouveau/nouveau_ttm.c       |  131 
 drivers/gpu/drm/nouveau/nv04_crtc.c         | 1019 +
 drivers/gpu/drm/nouveau/nv04_cursor.c       |   70 
 drivers/gpu/drm/nouveau/nv04_dac.c          |  529 
 drivers/gpu/drm/nouveau/nv04_dfp.c          |  621 
 drivers/gpu/drm/nouveau/nv04_display.c      |  293 
 drivers/gpu/drm/nouveau/nv04_fb.c           |   21 
 drivers/gpu/drm/nouveau/nv04_fbcon.c        |  295 
 drivers/gpu/drm/nouveau/nv04_fifo.c         |  257 
 drivers/gpu/drm/nouveau/nv04_graph.c        |  579 
 drivers/gpu/drm/nouveau/nv04_instmem.c      |  210 
 drivers/gpu/drm/nouveau/nv04_mc.c           |   20 
 drivers/gpu/drm/nouveau/nv04_timer.c        |   51 
 drivers/gpu/drm/nouveau/nv04_tv.c           |  305 
 drivers/gpu/drm/nouveau/nv10_fb.c           |   24 
 drivers/gpu/drm/nouveau/nv10_fifo.c         |  248 
 drivers/gpu/drm/nouveau/nv10_graph.c        |  949 +
 drivers/gpu/drm/nouveau/nv17_tv.c           |  689 
 drivers/gpu/drm/nouveau/nv17_tv.h           |  156 
 drivers/gpu/drm/nouveau/nv17_tv_modes.c     |  583 
 drivers/gpu/drm/nouveau/nv20_graph.c        |  769 
 drivers/gpu/drm/nouveau/nv40_fb.c           |   62 
 drivers/gpu/drm/nouveau/nv40_fifo.c         |  304 
 drivers/gpu/drm/nouveau/nv40_graph.c        | 2247 ++
 drivers/gpu/drm/nouveau/nv40_mc.c           |   38 
 drivers/gpu/drm/nouveau/nv50_crtc.c         |  810 +
 drivers/gpu/drm/nouveau/nv50_cursor.c       |  151 
 drivers/gpu/drm/nouveau/nv50_dac.c          |  295 
 drivers/gpu/drm/nouveau/nv50_display.c      |  902 +
 drivers/gpu/drm/nouveau/nv50_display.h      |   46 
 drivers/gpu/drm/nouveau/nv50_evo.h          |  113 
 drivers/gpu/drm/nouveau/nv50_fbcon.c        |  256 
 drivers/gpu/drm/nouveau/nv50_fifo.c         |  481 
 drivers/gpu/drm/nouveau/nv50_graph.c        |  472 
 drivers/gpu/drm/nouveau/nv50_grctx.h        |22284 ++++++++++++++++++++++++++++
 drivers/gpu/drm/nouveau/nv50_instmem.c      |  508 
 drivers/gpu/drm/nouveau/nv50_mc.c           |   40 
 drivers/gpu/drm/nouveau/nv50_sor.c          |  250 
 drivers/gpu/drm/nouveau/nvreg.h             |  535 
 drivers/gpu/drm/ttm/ttm_bo.c                |    4 
 include/drm/Kbuild                          |    1 
 include/drm/i2c/ch7006.h                    |   86 
 include/drm/nouveau_drm.h                   |  216 
 85 files changed, 58725 insertions(+)

View full diff with command:
/usr/bin/cvs -n -f diff -kk -u -p -N -r 1.59 -r 1.60 drm-nouveau.patchIndex: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/drm-nouveau.patch,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -p -r1.59 -r1.60
--- drm-nouveau.patch	25 Sep 2009 03:43:51 -0000	1.59
+++ drm-nouveau.patch	25 Sep 2009 07:13:50 -0000	1.60
@@ -1474,10 +1474,10 @@ index 0000000..ab46e3a
 +obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
 diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
 new file mode 100644
-index 0000000..f71789a
+index 0000000..ec0f2f3
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
-@@ -0,0 +1,127 @@
+@@ -0,0 +1,125 @@
 +#include <linux/pci.h>
 +#include <linux/acpi.h>
 +#include <acpi/acpi_drivers.h>
@@ -1508,13 +1508,14 @@ index 0000000..f71789a
 +#define NOUVEAU_DSM_POWER_SPEED 0x01
 +#define NOUVEAU_DSM_POWER_STAMINA 0x02
 +
-+static int nvidia_dsm(struct pci_dev *dev, int func, int arg, int *result)
++static int nouveau_dsm(struct drm_device *dev, int func, int arg, int *result)
 +{
 +	static char muid[] = {
 +		0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
 +		0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
 +	};
 +
++	struct pci_dev *pdev = dev->pdev;
 +	struct acpi_handle *handle;
 +	struct acpi_buffer output = { ACPI_ALLOCATE_BUFFER, NULL };
 +	struct acpi_object_list input;
@@ -1522,7 +1523,7 @@ index 0000000..f71789a
 +	union acpi_object *obj;
 +	int err;
 +
-+	handle = DEVICE_ACPI_HANDLE(&dev->dev);
++	handle = DEVICE_ACPI_HANDLE(&pdev->dev);
 +
 +	if (!handle)
 +		return -ENODEV;
@@ -1541,8 +1542,7 @@ index 0000000..f71789a
 +
 +	err = acpi_evaluate_object(handle, "_DSM", &input, &output);
 +	if (err) {
-+		printk(KERN_ERR "nvidia-control: failed to evaluate _DSM: %d\n",
-+		       err);
++		NV_ERROR(dev, "failed to evaluate _DSM: %d\n", err);
 +		return err;
 +	}
 +
@@ -1568,24 +1568,23 @@ index 0000000..f71789a
 +
 +int nouveau_hybrid_setup(struct drm_device *dev)
 +{
-+	struct pci_dev *pdev = dev->pdev;
 +	int result;
 +
-+	if (nvidia_dsm(pdev, NOUVEAU_DSM_ACTIVE, NOUVEAU_DSM_ACTIVE_QUERY,
-+		       &result))
++	if (nouveau_dsm(dev, NOUVEAU_DSM_ACTIVE, NOUVEAU_DSM_ACTIVE_QUERY,
++								&result))
 +		return -ENODEV;
 +
-+	printk(KERN_INFO "nouveau: _DSM hardware status gave 0x%x\n", result);
++	NV_INFO(dev, "_DSM hardware status gave 0x%x\n", result);
 +
 +	if (result & 0x1) {	/* Stamina mode - disable the external GPU */
-+		nvidia_dsm(pdev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA,
-+			   NULL);
-+		nvidia_dsm(pdev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA,
-+			   NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_STAMINA,
++									NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_STAMINA,
++									NULL);
 +	} else {		/* Ensure that the external GPU is enabled */
-+		nvidia_dsm(pdev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL);
-+		nvidia_dsm(pdev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED,
-+			   NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_LED, NOUVEAU_DSM_LED_SPEED, NULL);
++		nouveau_dsm(dev, NOUVEAU_DSM_POWER, NOUVEAU_DSM_POWER_SPEED,
++									NULL);
 +	}
 +
 +	return 0;
@@ -1593,11 +1592,10 @@ index 0000000..f71789a
 +
 +bool nouveau_dsm_probe(struct drm_device *dev)
 +{
-+	struct pci_dev *pdev = dev->pdev;
 +	int support = 0;
 +
-+	if (nvidia_dsm(pdev, NOUVEAU_DSM_SUPPORTED,
-+		       NOUVEAU_DSM_SUPPORTED_FUNCTIONS, &support))
++	if (nouveau_dsm(dev, NOUVEAU_DSM_SUPPORTED,
++				NOUVEAU_DSM_SUPPORTED_FUNCTIONS, &support))
 +		return false;
 +
 +	if (!support)
@@ -1768,10 +1766,10 @@ index 0000000..20564f8
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
 new file mode 100644
-index 0000000..585790f
+index 0000000..09ccffd
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
-@@ -0,0 +1,5476 @@
+@@ -0,0 +1,5499 @@
 +/*
 + * Copyright 2005-2006 Erik Waling
 + * Copyright 2006 Stephane Marchesin
@@ -1961,14 +1959,14 @@ index 0000000..585790f
 +static struct methods nv04_methods[] = {
 +	{ "PROM", load_vbios_prom, false },
 +	{ "PRAMIN", load_vbios_pramin, true },
-+	{ "PCI ROM", load_vbios_pci, true },
++	{ "PCIROM", 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 },
++	{ "PCIROM", load_vbios_pci, true },
 +	{ }
 +};
 +
@@ -1978,6 +1976,26 @@ index 0000000..585790f
 +	struct methods *methods, *method;
 +	int testscore = 3;
 +
++	if (nouveau_vbios) {
++		method = nv04_methods;
++		while (method->loadbios) {
++			if (!strcasecmp(nouveau_vbios, method->desc))
++				break;
++			method++;
++		}
++
++		if (method->loadbios) {
++			NV_INFO(dev, "Attempting to use BIOS image from %s\n",
++				method->desc);
++
++			method->loadbios(dev, data);
++			if (score_vbios(dev, data, method->rw))
++				return true;
++		}
++
++		NV_ERROR(dev, "VBIOS source \'%s\' invalid\n", nouveau_vbios);
++	}
++
 +	if (dev_priv->card_type < NV_50)
 +		methods = nv04_methods;
 +	else
@@ -7151,9 +7169,12 @@ index 0000000..585790f
 +		parse_init_table(bios, bios->some_script_ptr, &iexec);
 +	}
 +
-+	for (i = 0; i < bios->bdcb.dcb.entries; i++) {
-+		nouveau_bios_run_display_table(dev, &bios->bdcb.dcb.entry[i],
-+					       0, 0);
++	if (dev_priv->card_type >= NV_50) {
++		for (i = 0; i < bios->bdcb.dcb.entries; i++) {
++			nouveau_bios_run_display_table(dev,
++						       &bios->bdcb.dcb.entry[i],
++						       0, 0);
++		}
 +	}
 +
 +	NVLockVgaCrtcs(dev, true);
@@ -8749,10 +8770,10 @@ index 0000000..3f80db8
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
 new file mode 100644
-index 0000000..ebc01ad
+index 0000000..1a87041
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
-@@ -0,0 +1,540 @@
+@@ -0,0 +1,482 @@
 +/*
 + * Copyright 2005-2006 Stephane Marchesin
 + * All Rights Reserved.
@@ -8865,9 +8886,9 @@ index 0000000..ebc01ad
 +		      uint32_t vram_handle, uint32_t tt_handle)
 +{
 +	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	struct nouveau_engine *engine = &dev_priv->engine;
++	struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
++	struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo;
 +	struct nouveau_channel *chan;
-+	unsigned fbdev_flags = 0;
[...2848 lines suppressed...]
 +	0x0040a405, 0x00600009, 0x00700005, 0x00700006, 0x0060000e, ~0
 +};
 +
-+static uint32_t nv4e_ctx_prog[] = {
++static uint32_t nv4e_ctxprog[] = {
 +	0x00400889, 0x00200000, 0x0060000a, 0x00200000, 0x00300000, 0x00800001,
 +	0x00700009, 0x0060000e, 0x00400d64, 0x00400d05, 0x00409565, 0x00409a06,
 +	0x0040a868, 0x00200000, 0x0060000a, 0x00700000, 0x00106000, 0x00700080,
@@ -31307,7 +31371,7 @@ index 0000000..ed85386
 +{
 +	struct drm_nouveau_private *dev_priv =
 +		(struct drm_nouveau_private *)dev->dev_private;
-+	uint32_t *ctx_prog = NULL;
++	uint32_t *ctxprog = NULL;
 +	uint32_t vramsz, tmp;
 +	int i, j;
 +
@@ -31318,39 +31382,39 @@ index 0000000..ed85386
 +
 +	switch (dev_priv->chipset) {
 +	case 0x40:
-+		ctx_prog = nv40_ctx_prog;
++		ctxprog = nv40_ctxprog;
 +		break;
 +	case 0x41:
 +	case 0x42:
-+		ctx_prog = nv41_ctx_prog;
++		ctxprog = nv41_ctxprog;
 +		break;
 +	case 0x43:
-+		ctx_prog = nv43_ctx_prog;
++		ctxprog = nv43_ctxprog;
 +		break;
 +	case 0x44:
-+		ctx_prog = nv44_ctx_prog;
++		ctxprog = nv44_ctxprog;
 +		break;
 +	case 0x46:
-+		ctx_prog = nv46_ctx_prog;
++		ctxprog = nv46_ctxprog;
 +		break;
 +	case 0x47:
-+		ctx_prog = nv47_ctx_prog;
++		ctxprog = nv47_ctxprog;
 +		break;
 +	case 0x49:
-+		ctx_prog = nv49_4b_ctx_prog;
++		ctxprog = nv49_4b_ctxprog;
 +		break;
 +	case 0x4a:
-+		ctx_prog = nv4a_ctx_prog;
++		ctxprog = nv4a_ctxprog;
 +		break;
 +	case 0x4b:
-+		ctx_prog = nv49_4b_ctx_prog;
++		ctxprog = nv49_4b_ctxprog;
 +		break;
 +	case 0x4c:
 +	case 0x67:
-+		ctx_prog = nv4c_ctx_prog;
++		ctxprog = nv4c_ctxprog;
 +		break;
 +	case 0x4e:
-+		ctx_prog = nv4e_ctx_prog;
++		ctxprog = nv4e_ctxprog;
 +		break;
 +	default:
 +		NV_ERROR(dev, "Context program for 0x%02x unavailable\n",
@@ -31360,13 +31424,13 @@ index 0000000..ed85386
 +	}
 +
 +	/* Load the context program onto the card */
-+	if (ctx_prog) {
++	if (ctxprog) {
 +		NV_DEBUG(dev, "Loading context program\n");
 +
 +		i = 0;
 +		nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_INDEX, 0);
-+		while (ctx_prog[i] != ~0) {
-+			nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, ctx_prog[i]);
++		while (ctxprog[i] != ~0) {
++			nv_wr32(dev, NV40_PGRAPH_CTXCTL_UCODE_DATA, ctxprog[i]);
 +			i++;
 +		}
 +	}
@@ -31544,20 +31608,6 @@ index 0000000..ed85386
 +		break;
 +	}
 +
-+	/* per-context state, doesn't belong here */
-+	nv_wr32(dev, 0x400B20, 0x00000000);
-+	nv_wr32(dev, 0x400B04, 0xFFFFFFFF);
-+
-+	tmp = nv_rd32(dev, NV10_PGRAPH_SURFACE) & 0x0007ff00;
-+	nv_wr32(dev, NV10_PGRAPH_SURFACE, tmp);
-+	tmp = nv_rd32(dev, NV10_PGRAPH_SURFACE) | 0x00020100;
-+	nv_wr32(dev, NV10_PGRAPH_SURFACE, tmp);
-+
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_XMIN, 0);
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_YMIN, 0);
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_XMAX, 0x7fff);
-+	nv_wr32(dev, NV03_PGRAPH_ABS_UCLIP_YMAX, 0x7fff);
-+
 +	return 0;
 +}
 +
@@ -31631,10 +31681,10 @@ index 0000000..2a3495e
 +}
 diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c
 new file mode 100644
-index 0000000..c4bc54a
+index 0000000..5e7df86
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c
-@@ -0,0 +1,809 @@
+@@ -0,0 +1,810 @@
 +/*
 + * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
@@ -32191,6 +32241,7 @@ index 0000000..c4bc54a
 +		format = NV50_EVO_CRTC_FB_DEPTH_16;
 +		break;
 +	case 24:
++	case 32:
 +		format = NV50_EVO_CRTC_FB_DEPTH_24;
 +		break;
 +	case 30:
@@ -34245,10 +34296,10 @@ index 0000000..aca9ea6
 +
 diff --git a/drivers/gpu/drm/nouveau/nv50_fifo.c b/drivers/gpu/drm/nouveau/nv50_fifo.c
 new file mode 100644
-index 0000000..bec78d6
+index 0000000..10ed193
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_fifo.c
-@@ -0,0 +1,479 @@
+@@ -0,0 +1,481 @@
 +/*
 + * Copyright (C) 2007 Ben Skeggs.
 + * All Rights Reserved.
@@ -34457,6 +34508,8 @@ index 0000000..bec78d6
 +	nv50_fifo_init_context_table(dev);
 +	nv50_fifo_init_regs__nv(dev);
 +	nv50_fifo_init_regs(dev);
++	dev_priv->engine.fifo.enable(dev);
++	dev_priv->engine.fifo.reassign(dev, true);
 +
 +	return 0;
 +}
@@ -34730,10 +34783,10 @@ index 0000000..bec78d6
 +
 diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c
 new file mode 100644
-index 0000000..c163859
+index 0000000..d9c3e21
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_graph.c
-@@ -0,0 +1,450 @@
+@@ -0,0 +1,472 @@
 +/*
 + * Copyright (C) 2007 Ben Skeggs.
 + * All Rights Reserved.
@@ -34803,7 +34856,7 @@ index 0000000..c163859
 +	nv_wr32(dev, 0x400108, 0xffffffff);
 +
 +	nv_wr32(dev, 0x400824, 0x00004000);
-+	nv_wr32(dev, 0x400500, 0x00000000);
++	nv_wr32(dev, 0x400500, 0x00010001);
 +}
 +
 +static void
@@ -34912,6 +34965,28 @@ index 0000000..c163859
 +		nv_wr32(dev, 0x400500, nv_rd32(dev, 0x400500) & ~mask);
 +}
 +
++struct nouveau_channel *
++nv50_graph_channel(struct drm_device *dev)
++{
++	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	uint32_t inst;
++	int i;
++
++	inst = nv_rd32(dev, NV50_PGRAPH_CTXCTL_CUR);
++	if (!(inst & NV50_PGRAPH_CTXCTL_CUR_LOADED))
++		return NULL;
++	inst = (inst & NV50_PGRAPH_CTXCTL_CUR_INSTANCE) << 12;
++
++	for (i = 0; i < dev_priv->engine.fifo.channels; i++) {
++		struct nouveau_channel *chan = dev_priv->fifos[i];
++
++		if (chan && chan->ramin && chan->ramin->instance == inst)
++			return chan;
++	}
++
++	return NULL;
++}
++
 +int
 +nv50_graph_create_context(struct nouveau_channel *chan)
 +{


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/kernel.spec,v
retrieving revision 1.1831
retrieving revision 1.1832
diff -u -p -r1.1831 -r1.1832
--- kernel.spec	25 Sep 2009 04:36:02 -0000	1.1831
+++ kernel.spec	25 Sep 2009 07:13:51 -0000	1.1832
@@ -2059,6 +2059,9 @@ fi
 # and build.
 
 %changelog
+* Fri Sep 25 2009 Ben Skeggs <bskeggs at redhat.com> 2.6.31.1-46
+- drm-nouveau.patch: cleanups, fixes, pre-G80 s/r fixes, init rework
+
 * Fri Sep 25 2009 Dave Airlie <airlied at redhat.com> 2.6.31.1-45
 - drm-next-adea4796c.patch: fix r600 glxgears
 




More information about the fedora-extras-commits mailing list