rpms/kernel/F-10 drm-nouveau.patch, 1.3, 1.3.12.1 kernel.spec, 1.1206.2.24, 1.1206.2.25
Ben Skeggs
bskeggs at fedoraproject.org
Tue Feb 17 01:38:36 UTC 2009
Author: bskeggs
Update of /cvs/pkgs/rpms/kernel/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22406
Modified Files:
Tag: private-fedora-10-2_6_27
drm-nouveau.patch kernel.spec
Log Message:
nouveau update: fixes, additional chipset support
drm-nouveau.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -N -r 1.3 -r 1.3.12.1 drm-nouveau.patch
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-10/drm-nouveau.patch,v
retrieving revision 1.3
retrieving revision 1.3.12.1
diff -u -r1.3 -r1.3.12.1
--- drm-nouveau.patch 2 Sep 2008 14:56:52 -0000 1.3
+++ drm-nouveau.patch 17 Feb 2009 01:38:34 -0000 1.3.12.1
@@ -1,19 +1,19 @@
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index 649757f..014fa6f 100644
+index af32c34..1766c5a 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
-@@ -113,3 +113,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 48567a9..e68042b 100644
+index cf6af69..dc12f9a 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
@@ -26,4 +26,5 @@ obj-$(CONFIG_DRM_I915) += i915/
@@ -23,7 +23,7 @@
+obj-$(CONFIG_DRM_NOUVEAU) += nouveau/
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
-index 112ba7a..6205d56 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
+nouveau_mem_fb_amount_igp(struct drm_device *dev)
+{
@@ -3824,10 +3849,10 @@
[...16971 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.
+ *
@@ -15353,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;
+}
@@ -15428,24 +28456,25 @@
+{
+}
diff --git a/include/drm/Kbuild b/include/drm/Kbuild
-index 82b6983..d65553c 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 31e2f17..c6ba6a9 100644
+index 18cae19..df715fe 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
-@@ -1136,6 +1136,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.1206.2.24
retrieving revision 1.1206.2.25
diff -u -r1.1206.2.24 -r1.1206.2.25
--- kernel.spec 11 Feb 2009 23:08:12 -0000 1.1206.2.24
+++ kernel.spec 17 Feb 2009 01:38:34 -0000 1.1206.2.25
@@ -1953,6 +1953,9 @@
%kernel_variant_files -k vmlinux %{with_kdump} kdump
%changelog
+* Tue Feb 17 2009 Ben Skeggs <bskeggs at redhat.com>
+- Bring in nouveau patchset from 2.6.29 kernel: fixes, support for more chips
+
* Wed Feb 11 2009 Chuck Ebbert <cebbert at redhat.com> 2.6.27.15-78.2.24
- Fix more ext4 patch queue problems.
(http://marc.info/?l=linux-kernel&m=123433917809157&w=2)
More information about the fedora-extras-commits
mailing list