rpms/kernel/F-10 drm-nouveau.patch, 1.8, 1.9 kernel.spec, 1.1254, 1.1255

Ben Skeggs bskeggs at fedoraproject.org
Wed Feb 11 04:51:59 UTC 2009


Author: bskeggs

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

Modified Files:
	drm-nouveau.patch kernel.spec 
Log Message:
nouveau: backport GF9 support

drm-nouveau.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.8 -r 1.9 drm-nouveau.patch
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/drm-nouveau.patch,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- drm-nouveau.patch	7 Feb 2009 05:42:20 -0000	1.8
+++ drm-nouveau.patch	11 Feb 2009 04:51:28 -0000	1.9
@@ -1,29 +1,29 @@
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index 5130b72..f29b63b 100644
+index af32c34..1766c5a 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
-@@ -123,3 +123,9 @@ config DRM_SAVAGE
+@@ -114,3 +114,9 @@ config DRM_SAVAGE
  	help
  	  Choose this option if you have a Savage3D/4/SuperSavage/Pro/Twister
  	  chipset. If M is selected the module will be called savage.
 +
 +config DRM_NOUVEAU
-+	tristate "Nouveau (nvidia) cards"
++	tristate "Nouveau (nVidia) cards"
 +	depends on DRM
 +	help
-+	  Choose for nvidia support
++	  Choose this option for open-source nVidia support.
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
-index 30022c4..1cccfaf 100644
+index cf6af69..dc12f9a 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
-@@ -25,4 +25,5 @@ obj-$(CONFIG_DRM_I915)  += i915/
+@@ -26,4 +26,5 @@ obj-$(CONFIG_DRM_I915)  += i915/
  obj-$(CONFIG_DRM_SIS)   += sis/
  obj-$(CONFIG_DRM_SAVAGE)+= savage/
  obj-$(CONFIG_DRM_VIA)	+=via/
 +obj-$(CONFIG_DRM_NOUVEAU) += nouveau/
  
 diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
-index 72c667f..414b52b 100644
+index 9ed8259..ed46425 100644
 --- a/drivers/gpu/drm/drm_bufs.c
 +++ b/drivers/gpu/drm/drm_bufs.c
 @@ -49,8 +49,8 @@ unsigned long drm_get_resource_len(struct drm_device *dev, unsigned int resource
@@ -33,7 +33,7 @@
 -static struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
 -					     drm_local_map_t *map)
 +struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
-+ 					   drm_local_map_t *map)
++					   drm_local_map_t *map)
  {
  	struct drm_map_list *entry;
  	list_for_each_entry(entry, &dev->maplist, head) {
@@ -47,18 +47,19 @@
  			  unsigned long user_token, int hashed_handle)
 diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
 new file mode 100644
-index 0000000..f01f82a
+index 0000000..557f04e
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/Makefile
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,20 @@
 +#
 +# Makefile for the drm device driver.  This driver provides support for the
 +# Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher.
 +
 +ccflags-y := -Iinclude/drm
 +nouveau-y := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
-+             nouveau_object.o nouveau_irq.o nouveau_notifier.o nouveau_swmthd.o \
-+             nouveau_sgdma.o nouveau_dma.o nouveau_bo.o nouveau_fence.o \
++             nouveau_object.o nouveau_irq.o nouveau_notifier.o \
++             nouveau_swmthd.o nouveau_sgdma.o nouveau_dma.o \
++             nouveau_bo.o nouveau_fence.o \
 +             nv04_timer.o \
 +             nv04_mc.o nv40_mc.o nv50_mc.o \
 +             nv04_fb.o nv10_fb.o nv40_fb.o \
@@ -1524,10 +1525,10 @@
 +};
 diff --git a/drivers/gpu/drm/nouveau/nouveau_fifo.c b/drivers/gpu/drm/nouveau/nouveau_fifo.c
 new file mode 100644
-index 0000000..92ea8fc
+index 0000000..114ed29
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_fifo.c
-@@ -0,0 +1,601 @@
+@@ -0,0 +1,602 @@
 +/*
 + * Copyright 2005-2006 Stephane Marchesin
 + * All Rights Reserved.
@@ -1892,7 +1893,8 @@
 +	/* If this is the first channel, setup PFIFO ourselves.  For any
 +	 * other case, the GPU will handle this when it switches contexts.
 +	 */
-+	if (dev_priv->fifo_alloc_count == 1) {
++	if (dev_priv->card_type < NV_50 &&
++	    dev_priv->fifo_alloc_count == 1) {
 +		ret = engine->fifo.load_context(chan);
 +		if (ret) {
 +			nouveau_fifo_free(chan);
@@ -2131,10 +2133,10 @@
 +int nouveau_max_ioctl = DRM_ARRAY_SIZE(nouveau_ioctls);
 diff --git a/drivers/gpu/drm/nouveau/nouveau_ioc32.c b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
 new file mode 100644
-index 0000000..4f53a50
+index 0000000..f55ae7a
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_ioc32.c
-@@ -0,0 +1,68 @@
+@@ -0,0 +1,72 @@
 +/**
 + * \file mga_ioc32.c
 + *
@@ -2194,6 +2196,10 @@
 +	if (nr < DRM_COMMAND_BASE)
 +		return drm_compat_ioctl(filp, cmd, arg);
 +
++#if 0
++	if (nr < DRM_COMMAND_BASE + DRM_ARRAY_SIZE(mga_compat_ioctls))
++		fn = nouveau_compat_ioctls[nr - DRM_COMMAND_BASE];
++#endif
 +	lock_kernel();	  /* XXX for now */
 +	if (fn != NULL)
 +		ret = (*fn)(filp, cmd, arg);
@@ -2205,10 +2211,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_irq.c b/drivers/gpu/drm/nouveau/nouveau_irq.c
 new file mode 100644
-index 0000000..2a3d8a0
+index 0000000..f4eb72b
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_irq.c
-@@ -0,0 +1,568 @@
+@@ -0,0 +1,588 @@
 +/*
 + * Copyright (C) 2006 Ben Skeggs.
 + *
@@ -2653,9 +2659,10 @@
 +nv50_pgraph_irq_handler(struct drm_device *dev)
 +{
 +	struct drm_nouveau_private *dev_priv = dev->dev_private;
-+	uint32_t status;
++	uint32_t status, nsource;
 +
 +	status = NV_READ(NV03_PGRAPH_INTR);
++	nsource = NV_READ(NV03_PGRAPH_NSOURCE);
 +
 +	if (status & 0x00000020) {
 +		nouveau_pgraph_intr_error(dev,
@@ -2674,10 +2681,29 @@
 +	}
 +
 +	if (status & 0x00200000) {
-+		nouveau_pgraph_intr_error(dev,
++		int r;
++
++		nouveau_pgraph_intr_error(dev, nsource |
 +					  NV03_PGRAPH_NSOURCE_PROTECTION_ERROR);
 +
++		DRM_ERROR("magic set 1:\n");
++		for (r = 0x408900; r <= 0x408910; r += 4)
++			DRM_ERROR("\t0x%08x: 0x%08x\n", r, NV_READ(r));
++		NV_WRITE(0x408900, NV_READ(0x408904) | 0xc0000000);
++		for (r = 0x408e08; r <= 0x408e24; r += 4)
++			DRM_ERROR("\t0x%08x: 0x%08x\n", r, NV_READ(r));
++		NV_WRITE(0x408e08, NV_READ(0x408e08) | 0xc0000000);
++
++		DRM_ERROR("magic set 2:\n");
++		for (r = 0x409900; r <= 0x409910; r += 4)
++			DRM_ERROR("\t0x%08x: 0x%08x\n", r, NV_READ(r));
++		NV_WRITE(0x409900, NV_READ(0x409904) | 0xc0000000);
++		for (r = 0x409e08; r <= 0x409e24; r += 4)
++			DRM_ERROR("\t0x%08x: 0x%08x\n", r, NV_READ(r));
++		NV_WRITE(0x409e08, NV_READ(0x409e08) | 0xc0000000);
++
 +		status &= ~0x00200000;
++		NV_WRITE(NV03_PGRAPH_NSOURCE, nsource);
 +		NV_WRITE(NV03_PGRAPH_INTR, 0x00200000);
 +	}
 +
@@ -2779,10 +2805,10 @@
 +}
 diff --git a/drivers/gpu/drm/nouveau/nouveau_mem.c b/drivers/gpu/drm/nouveau/nouveau_mem.c
 new file mode 100644
-index 0000000..5e7ac9e
+index 0000000..7dc9149
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nouveau_mem.c
-@@ -0,0 +1,868 @@
+@@ -0,0 +1,867 @@
 +/*
 + * Copyright (C) The Weather Channel, Inc.  2002.  All Rights Reserved.
 + * Copyright 2005 Stephane Marchesin
@@ -3016,7 +3042,6 @@
 +		nouveau_mem_takedown(&dev_priv->pci_heap);
 +}
 +
-+/*XXX won't work on BSD because of pci_read_config_dword */
 +static uint32_t
[...16965 lines suppressed...]
++	0x0047, 0x00000000,
++	0x0001, 0x08100c12,
++	0x0008, 0x00000000,
++	0x0003, 0x00000080,
++	0x0004, 0x00000000,
++	0x0001, 0x00000080,
++	0x0003, 0x80007004,
++	0x0004, 0x00000000,
++	0x0001, 0x80007004,
++	0x0003, 0x04000400,
++	0x0004, 0x00000000,
++	0x0001, 0x04000400,
++	0x0003, 0x00001000,
++	0x0004, 0x00000000,
++	0x0001, 0x00001000,
++	0x0010, 0x00000000,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0010, 0x00000000,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0008, 0x00000000,
++	0x0003, 0x00000004,
++	0x0004, 0x00000000,
++	0x0001, 0x00000004,
++	0x0003, 0x00000002,
++	0x0004, 0x00000000,
++	0x0001, 0x00000002,
++	0x0058, 0x00000000,
++	0x0003, 0x00000080,
++	0x0004, 0x00000000,
++	0x0001, 0x00000080,
++	0x0003, 0x80007004,
++	0x0004, 0x00000000,
++	0x0001, 0x80007004,
++	0x0003, 0x04000400,
++	0x0004, 0x00000000,
++	0x0001, 0x04000400,
++	0x0003, 0x00001000,
++	0x0004, 0x00000000,
++	0x0001, 0x00001000,
++	0x0010, 0x00000000,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0010, 0x00000000,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0008, 0x00000000,
++	0x0003, 0x00000004,
++	0x0004, 0x00000000,
++	0x0001, 0x00000004,
++	0x0003, 0x00000002,
++	0x0004, 0x00000000,
++	0x0001, 0x00000002,
++	0x0050, 0x00000000,
++	0x0003, 0x08100c12,
++	0x0004, 0x00000000,
++	0x0001, 0x08100c12,
++	0x0030, 0x00000000,
++	0x0003, 0x0000ffff,
++	0x0004, 0x00000000,
++	0x0004, 0x0000ffff,
++	0x0004, 0x00000000,
++	0x0004, 0x0000ffff,
++	0x0004, 0x00000000,
++	0x0004, 0x0000ffff,
++	0x0004, 0x00000000,
++	0x0001, 0x0000ffff,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0003, 0x00010001,
++	0x0004, 0x00000000,
++	0x0004, 0x00010001,
++	0x0004, 0x00000000,
++	0x0001, 0x00010001,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0008, 0x00000000,
++	0x0003, 0x0001fe21,
++	0x0004, 0x00000000,
++	0x0001, 0x0001fe21,
++	0x0028, 0x00000000,
++	0x0003, 0x08100c12,
++	0x0004, 0x00000000,
++	0x0001, 0x08100c12,
++	0x0003, 0x00000004,
++	0x0004, 0x00000000,
++	0x0001, 0x00000004,
++	0x0008, 0x00000000,
++	0x0003, 0x00000002,
++	0x0004, 0x00000000,
++	0x0001, 0x00000002,
++	0x0003, 0x00000011,
++	0x0004, 0x00000000,
++	0x0001, 0x00000011,
++	0x0040, 0x00000000,
++	0x0003, 0x0fac6881,
++	0x0004, 0x00000000,
++	0x0001, 0x0fac6881,
++	0x0020, 0x00000000,
++	0x0003, 0x00000004,
++	0x0004, 0x00000000,
++	0x0001, 0x00000004,
++	0x0048, 0x00000000,
++	0x0003, 0x00000002,
++	0x0004, 0x00000000,
++	0x0001, 0x00000002,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0004, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0003, 0x00000002,
++	0x0004, 0x00000000,
++	0x0001, 0x00000002,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0004, 0x00000001,
++	0x0004, 0x00000000,
++	0x0004, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0008, 0x00000000,
++	0x0003, 0x00000004,
++	0x0004, 0x00000000,
++	0x0001, 0x00000004,
++	0x1d18, 0x00000000,
++	0x0003, 0x00000011,
++	0x0004, 0x00000000,
++	0x0001, 0x00000011,
++	0x0008, 0x00000000,
++	0x0003, 0x00000001,
++	0x0004, 0x00000000,
++	0x0001, 0x00000001,
++	0x0000
++};
++
++#endif
 diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
 new file mode 100644
-index 0000000..b7a51f0
+index 0000000..d76ebf3
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
-@@ -0,0 +1,324 @@
+@@ -0,0 +1,331 @@
 +/*
 + * Copyright (C) 2007 Ben Skeggs.
 + *
@@ -15355,6 +28374,13 @@
 +		vram += NV50_INSTMEM_PAGE_SIZE;
 +	}
 +
++	NV_WRITE(0x070000, 0x00000001);
++	while(NV_READ(0x070000) & 1);
++	NV_WRITE(0x100c80, 0x00040001);
++	while(NV_READ(0x100c80) & 1);
++	NV_WRITE(0x100c80, 0x00060001);
++	while(NV_READ(0x100c80) & 1);
++
 +	gpuobj->im_bound = 1;
 +	return 0;
 +}
@@ -15430,24 +28456,25 @@
 +{
 +}
 diff --git a/include/drm/Kbuild b/include/drm/Kbuild
-index b940fdf..cfa6af4 100644
+index b940fdf..a9de055 100644
 --- a/include/drm/Kbuild
 +++ b/include/drm/Kbuild
-@@ -8,3 +8,4 @@ unifdef-y += radeon_drm.h
+@@ -8,3 +8,5 @@ unifdef-y += radeon_drm.h
  unifdef-y += sis_drm.h
  unifdef-y += savage_drm.h
  unifdef-y += via_drm.h
 +unifdef-y += nouveau_drm.h
++
 diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index afb7858..d8dae5f 100644
+index 18cae19..df715fe 100644
 --- a/include/drm/drmP.h
 +++ b/include/drm/drmP.h
-@@ -1160,6 +1160,8 @@ extern void drm_idlelock_release(struct drm_lock_data *lock_data);
+@@ -1202,6 +1202,8 @@ extern void drm_idlelock_release(struct drm_lock_data *lock_data);
  extern int drm_i_have_hw_lock(struct drm_device *dev, struct drm_file *file_priv);
  
  				/* Buffer management support (drm_bufs.h) */
 +extern struct drm_map_list *drm_find_matching_map(struct drm_device *dev,
-+ 					   drm_local_map_t *map);
++						  drm_local_map_t *map);
  extern int drm_addbufs_agp(struct drm_device *dev, struct drm_buf_desc * request);
  extern int drm_addbufs_pci(struct drm_device *dev, struct drm_buf_desc * request);
  extern int drm_addmap(struct drm_device *dev, unsigned int offset,


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/kernel.spec,v
retrieving revision 1.1254
retrieving revision 1.1255
diff -u -r1.1254 -r1.1255
--- kernel.spec	10 Feb 2009 06:34:09 -0000	1.1254
+++ kernel.spec	11 Feb 2009 04:51:28 -0000	1.1255
@@ -1745,6 +1745,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Wed Feb 11 2009 Ben Skeggs <bskeggs at redhat.com>
+- Updated nouveau snapshot.  Fixes + GeForce 9 chipset support.
+
 * Tue Feb 10 2009 Chuck Ebbert <cebbert at redhat.com>  2.6.29.0.24.rc4.git2
 - 2.6.29-rc4-git2
 - Drop our redundant atl2 network driver patch.




More information about the fedora-extras-commits mailing list