rpms/kernel/devel drm-nouveau.patch, 1.31, 1.32 kernel.spec, 1.1592, 1.1593
Ben Skeggs
bskeggs at fedoraproject.org
Fri Jun 26 10:24:20 UTC 2009
Author: bskeggs
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv22161
Modified Files:
drm-nouveau.patch kernel.spec
Log Message:
* Fri Jun 26 2009 Ben Skeggs <bskeggs at redhat.com>
- drm-nouveau.patch: latest upstream + reenable
drm-nouveau.patch:
View full diff with command:
/usr/bin/cvs -f diff -kk -u -p -N -r 1.31 -r 1.32 drm-nouveau.patch
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- drm-nouveau.patch 30 Mar 2009 06:32:12 -0000 1.31
+++ drm-nouveau.patch 26 Jun 2009 10:24:18 -0000 1.32
@@ -1,8 +1,8 @@
diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index a74980b..36582ff 100644
+index c961fe4..ae0c108 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
-@@ -133,3 +133,18 @@ config DRM_SAVAGE
+@@ -142,3 +142,22 @@ 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.
@@ -10,6 +10,10 @@ index a74980b..36582ff 100644
+config DRM_NOUVEAU
+ tristate "Nouveau (nVidia) cards"
+ depends on DRM
++ select DRM_TTM
++ select FB_CFB_FILLRECT
++ select FB_CFB_COPYAREA
++ select FB_CFB_IMAGEBLIT
+ help
+ Choose this option for open-source nVidia support.
+
@@ -22,17 +26,18 @@ index a74980b..36582ff 100644
+ userspaces with this enabled will cause pain.
+
diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
-index d6788df..97aa0c8 100644
+index 4e89ab0..5687c02 100644
--- a/drivers/gpu/drm/Makefile
+++ b/drivers/gpu/drm/Makefile
-@@ -27,4 +27,5 @@ obj-$(CONFIG_DRM_I915) += i915/
+@@ -26,4 +26,6 @@ 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/
-
++
+ obj-$(CONFIG_DRM_TTM) += ttm/
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
-index 4d2161f..ac503e2 100644
+index 6246e3f..436e2fe 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -51,38 +51,24 @@ resource_size_t drm_get_resource_len(struct drm_device *dev, unsigned int resour
@@ -80,7 +85,7 @@ index 4d2161f..ac503e2 100644
static int drm_map_handle(struct drm_device *dev, struct drm_hash_item *hash,
unsigned long user_token, int hashed_handle, int shm)
-@@ -349,7 +335,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
+@@ -357,7 +343,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
/* We do it here so that dev->struct_mutex protects the increment */
user_token = (map->type == _DRM_SHM) ? (unsigned long)map->handle :
map->offset;
@@ -89,157 +94,12 @@ index 4d2161f..ac503e2 100644
(map->type == _DRM_SHM));
if (ret) {
if (map->type == _DRM_REGISTERS)
-diff --git a/drivers/gpu/drm/drm_fence.c b/drivers/gpu/drm/drm_fence.c
-index f1c386c..fd62fd9 100644
---- a/drivers/gpu/drm/drm_fence.c
-+++ b/drivers/gpu/drm/drm_fence.c
-@@ -369,7 +369,7 @@ int drm_fence_object_wait(struct drm_fence_object *fence,
- struct drm_fence_manager *fm = &dev->fm;
- struct drm_fence_class_manager *fc = &fm->fence_class[fence->fence_class];
- int ret = 0;
-- unsigned long _end = 3 * DRM_HZ;
-+ unsigned long _end = jiffies + 3 * DRM_HZ;
-
- if (mask & ~fence->type) {
- DRM_ERROR("Wait trying to extend fence type"
-diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c
-index c1173d8..2e4e667 100644
---- a/drivers/gpu/drm/drm_gem.c
-+++ b/drivers/gpu/drm/drm_gem.c
-@@ -280,48 +280,58 @@ drm_gem_close_ioctl(struct drm_device *dev, void *data,
- * is freed, the name goes away.
- */
- int
--drm_gem_flink_ioctl(struct drm_device *dev, void *data,
-- struct drm_file *file_priv)
-+drm_gem_object_name(struct drm_device *dev, struct drm_gem_object *obj,
-+ uint64_t *name)
- {
-- struct drm_gem_flink *args = data;
-- struct drm_gem_object *obj;
- int ret;
-
-- if (!(dev->driver->driver_features & DRIVER_GEM))
-- return -ENODEV;
--
-- obj = drm_gem_object_lookup(dev, file_priv, args->handle);
-- if (obj == NULL)
-- return -EBADF;
--
- again:
-- if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0) {
-- ret = -ENOMEM;
-- goto err;
-- }
-+ if (idr_pre_get(&dev->object_name_idr, GFP_KERNEL) == 0)
-+ return -ENOMEM;
-
- spin_lock(&dev->object_name_lock);
- if (!obj->name) {
- ret = idr_get_new_above(&dev->object_name_idr, obj, 1,
- &obj->name);
-- args->name = (uint64_t) obj->name;
-+ *name = (uint64_t) obj->name;
- spin_unlock(&dev->object_name_lock);
-
- if (ret == -EAGAIN)
- goto again;
-
- if (ret != 0)
-- goto err;
-+ return ret;
-
- /* Allocate a reference for the name table. */
- drm_gem_object_reference(obj);
- } else {
-- args->name = (uint64_t) obj->name;
-+ *name = (uint64_t) obj->name;
- spin_unlock(&dev->object_name_lock);
-- ret = 0;
- }
-
--err:
-+ return 0;
-+}
-+EXPORT_SYMBOL(drm_gem_object_name);
-+
-+int
-+drm_gem_flink_ioctl(struct drm_device *dev, void *data,
-+ struct drm_file *file_priv)
-+{
-+ struct drm_gem_flink *args = data;
-+ struct drm_gem_object *obj;
-+ uint64_t name;
-+ int ret;
-+
-+ if (!(dev->driver->driver_features & DRIVER_GEM))
-+ return -ENODEV;
-+
-+ obj = drm_gem_object_lookup(dev, file_priv, args->handle);
-+ if (obj == NULL)
-+ return -EBADF;
-+
-+ ret = drm_gem_object_name(dev, obj, &name);
-+ args->name = name;
-+
- mutex_lock(&dev->struct_mutex);
- drm_gem_object_unreference(obj);
- mutex_unlock(&dev->struct_mutex);
-diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
-index 5d45cbf..e3b0a76 100644
---- a/drivers/gpu/drm/drm_stub.c
-+++ b/drivers/gpu/drm/drm_stub.c
-@@ -406,14 +406,14 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
- if (dev->driver->load) {
- ret = dev->driver->load(dev, ent->driver_data);
- if (ret)
-- goto err_g3;
-+ goto err_g4;
- }
-
- /* setup the grouping for the legacy output */
- if (drm_core_check_feature(dev, DRIVER_MODESET)) {
- ret = drm_mode_group_init_legacy_group(dev, &dev->primary->mode_group);
- if (ret)
-- goto err_g3;
-+ goto err_g4;
- }
-
- list_add_tail(&dev->driver_item, &driver->device_list);
-@@ -424,8 +424,11 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent,
-
- return 0;
-
--err_g3:
-+err_g4:
- drm_put_minor(&dev->primary);
-+err_g3:
-+ if (drm_core_check_feature(dev, DRIVER_MODESET))
-+ drm_put_minor(&dev->control);
- err_g2:
- pci_disable_device(pdev);
- err_g1:
-@@ -507,11 +510,11 @@ void drm_put_dev(struct drm_device *dev)
- dev->agp = NULL;
- }
-
[...35244 lines suppressed...]
++#define NV_PGRAPH_CTX_CONTROL_NV04 0x00400170
++#define NV_PGRAPH_ABS_UCLIP_XMIN 0x0040053C
++#define NV_PGRAPH_ABS_UCLIP_YMIN 0x00400540
++#define NV_PGRAPH_ABS_UCLIP_XMAX 0x00400544
++#define NV_PGRAPH_ABS_UCLIP_YMAX 0x00400548
++#define NV_PGRAPH_BETA_AND 0x00400608
++#define NV_PGRAPH_LIMIT_VIOL_PIX 0x00400610
++#define NV_PGRAPH_BOFFSET0 0x00400640
++#define NV_PGRAPH_BOFFSET1 0x00400644
++#define NV_PGRAPH_BOFFSET2 0x00400648
++#define NV_PGRAPH_BLIMIT0 0x00400684
++#define NV_PGRAPH_BLIMIT1 0x00400688
++#define NV_PGRAPH_BLIMIT2 0x0040068c
++#define NV_PGRAPH_STATUS 0x00400700
++#define NV_PGRAPH_SURFACE 0x00400710
++#define NV_PGRAPH_STATE 0x00400714
++#define NV_PGRAPH_FIFO 0x00400720
++#define NV_PGRAPH_PATTERN_SHAPE 0x00400810
++#define NV_PGRAPH_TILE 0x00400b00
++
++#define NV_PVIDEO_INTR_EN 0x00008140
++#define NV_PVIDEO_BUFFER 0x00008700
++#define NV_PVIDEO_STOP 0x00008704
++#define NV_PVIDEO_UVPLANE_BASE(buff) (0x00008800+(buff)*4)
++#define NV_PVIDEO_UVPLANE_LIMIT(buff) (0x00008808+(buff)*4)
++#define NV_PVIDEO_UVPLANE_OFFSET_BUFF(buff) (0x00008820+(buff)*4)
++#define NV_PVIDEO_BASE(buff) (0x00008900+(buff)*4)
++#define NV_PVIDEO_LIMIT(buff) (0x00008908+(buff)*4)
++#define NV_PVIDEO_LUMINANCE(buff) (0x00008910+(buff)*4)
++#define NV_PVIDEO_CHROMINANCE(buff) (0x00008918+(buff)*4)
++#define NV_PVIDEO_OFFSET_BUFF(buff) (0x00008920+(buff)*4)
++#define NV_PVIDEO_SIZE_IN(buff) (0x00008928+(buff)*4)
++#define NV_PVIDEO_POINT_IN(buff) (0x00008930+(buff)*4)
++#define NV_PVIDEO_DS_DX(buff) (0x00008938+(buff)*4)
++#define NV_PVIDEO_DT_DY(buff) (0x00008940+(buff)*4)
++#define NV_PVIDEO_POINT_OUT(buff) (0x00008948+(buff)*4)
++#define NV_PVIDEO_SIZE_OUT(buff) (0x00008950+(buff)*4)
++#define NV_PVIDEO_FORMAT(buff) (0x00008958+(buff)*4)
++# define NV_PVIDEO_FORMAT_PLANAR (1 << 0)
++# define NV_PVIDEO_FORMAT_COLOR_LE_CR8YB8CB8YA8 (1 << 16)
++# define NV_PVIDEO_FORMAT_DISPLAY_COLOR_KEY (1 << 20)
++# define NV_PVIDEO_FORMAT_MATRIX_ITURBT709 (1 << 24)
++#define NV_PVIDEO_COLOR_KEY 0x00008B00
++
++/* NV04 overlay defines from VIDIX & Haiku */
++#define NV_PVIDEO_INTR_EN_0 0x00680140
++#define NV_PVIDEO_STEP_SIZE 0x00680200
++#define NV_PVIDEO_CONTROL_Y 0x00680204
++#define NV_PVIDEO_CONTROL_X 0x00680208
++#define NV_PVIDEO_BUFF0_START_ADDRESS 0x0068020c
++#define NV_PVIDEO_BUFF0_PITCH_LENGTH 0x00680214
++#define NV_PVIDEO_BUFF0_OFFSET 0x0068021c
++#define NV_PVIDEO_BUFF1_START_ADDRESS 0x00680210
++#define NV_PVIDEO_BUFF1_PITCH_LENGTH 0x00680218
++#define NV_PVIDEO_BUFF1_OFFSET 0x00680220
++#define NV_PVIDEO_OE_STATE 0x00680224
++#define NV_PVIDEO_SU_STATE 0x00680228
++#define NV_PVIDEO_RM_STATE 0x0068022c
++#define NV_PVIDEO_WINDOW_START 0x00680230
++#define NV_PVIDEO_WINDOW_SIZE 0x00680234
++#define NV_PVIDEO_FIFO_THRES_SIZE 0x00680238
++#define NV_PVIDEO_FIFO_BURST_LENGTH 0x0068023c
++#define NV_PVIDEO_KEY 0x00680240
++#define NV_PVIDEO_OVERLAY 0x00680244
++#define NV_PVIDEO_RED_CSC_OFFSET 0x00680280
++#define NV_PVIDEO_GREEN_CSC_OFFSET 0x00680284
++#define NV_PVIDEO_BLUE_CSC_OFFSET 0x00680288
++#define NV_PVIDEO_CSC_ADJUST 0x0068028c
++
++#endif
+diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
+index c1c407f..cbdfbd2 100644
+--- a/drivers/gpu/drm/ttm/ttm_bo.c
++++ b/drivers/gpu/drm/ttm/ttm_bo.c
+@@ -90,6 +90,7 @@ int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible)
+ }
+ return 0;
+ }
++EXPORT_SYMBOL(ttm_bo_wait_unreserved);
+
+ static void ttm_bo_add_to_lru(struct ttm_buffer_object *bo)
+ {
+@@ -811,6 +812,7 @@ int ttm_bo_wait_cpu(struct ttm_buffer_object *bo, bool no_wait)
+
+ return ret;
+ }
++EXPORT_SYMBOL(ttm_bo_wait_cpu);
+
+ int ttm_bo_move_buffer(struct ttm_buffer_object *bo,
+ uint32_t proposed_placement,
+@@ -1593,12 +1595,14 @@ int ttm_bo_synccpu_write_grab(struct ttm_buffer_object *bo, bool no_wait)
+ ttm_bo_unreserve(bo);
+ return ret;
+ }
++EXPORT_SYMBOL(ttm_bo_synccpu_write_grab);
+
+ void ttm_bo_synccpu_write_release(struct ttm_buffer_object *bo)
+ {
+ if (atomic_dec_and_test(&bo->cpu_writers))
+ wake_up_all(&bo->event_queue);
+ }
++EXPORT_SYMBOL(ttm_bo_synccpu_write_release);
+
+ /**
+ * A buffer object shrink method that tries to swap out the first
diff --git a/include/drm/Kbuild b/include/drm/Kbuild
index b940fdf..cfa6af4 100644
--- a/include/drm/Kbuild
@@ -42929,10 +52407,10 @@ index b940fdf..cfa6af4 100644
unifdef-y += via_drm.h
+unifdef-y += nouveau_drm.h
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
-index b61b0c6..5b7ce2d 100644
+index 45b67d9..46e72e9 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
-@@ -1267,6 +1267,8 @@ extern void drm_idlelock_release(struct drm_lock_data *lock_data);
+@@ -1216,6 +1216,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) */
@@ -42943,10 +52421,10 @@ index b61b0c6..5b7ce2d 100644
extern int drm_addmap(struct drm_device *dev, resource_size_t offset,
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h
new file mode 100644
-index 0000000..4147f35
+index 0000000..dc6a194
--- /dev/null
+++ b/include/drm/nouveau_drm.h
-@@ -0,0 +1,299 @@
+@@ -0,0 +1,298 @@
+/*
+ * Copyright 2005 Stephane Marchesin.
+ * All Rights Reserved.
@@ -42974,7 +52452,7 @@ index 0000000..4147f35
+#ifndef __NOUVEAU_DRM_H__
+#define __NOUVEAU_DRM_H__
+
-+#define NOUVEAU_DRM_HEADER_PATCHLEVEL 12
++#define NOUVEAU_DRM_HEADER_PATCHLEVEL 14
+
+struct drm_nouveau_channel_alloc {
+ uint32_t fb_ctxdma_handle;
@@ -43102,17 +52580,22 @@ index 0000000..4147f35
+#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0)
+#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1)
+#define NOUVEAU_GEM_DOMAIN_GART (1 << 2)
-+#define NOUVEAU_GEM_DOMAIN_NOMAP (1 << 3)
-+#define NOUVEAU_GEM_DOMAIN_TILE (1 << 30)
-+#define NOUVEAU_GEM_DOMAIN_TILE_ZETA (1 << 31)
++#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3)
+
-+struct drm_nouveau_gem_new {
++struct drm_nouveau_gem_info {
++ uint32_t handle;
++ uint32_t domain;
+ uint64_t size;
++ uint64_t offset;
++ uint64_t map_handle;
++ uint32_t tile_mode;
++ uint32_t tile_flags;
++};
++
++struct drm_nouveau_gem_new {
++ struct drm_nouveau_gem_info info;
+ uint32_t channel_hint;
+ uint32_t align;
-+ uint32_t handle;
-+ uint32_t domain;
-+ uint32_t offset;
+};
+
+struct drm_nouveau_gem_pushbuf_bo {
@@ -43172,12 +52655,6 @@ index 0000000..4147f35
+ uint32_t handle;
+};
+
-+struct drm_nouveau_gem_mmap {
-+ uint32_t handle;
-+ uint32_t pad;
-+ uint64_t vaddr;
-+};
-+
+struct drm_nouveau_gem_cpu_prep {
+ uint32_t handle;
+};
@@ -43240,9 +52717,9 @@ index 0000000..4147f35
+#define DRM_NOUVEAU_GEM_PUSHBUF_CALL 0x42
+#define DRM_NOUVEAU_GEM_PIN 0x43
+#define DRM_NOUVEAU_GEM_UNPIN 0x44
-+#define DRM_NOUVEAU_GEM_MMAP 0x45
-+#define DRM_NOUVEAU_GEM_CPU_PREP 0x46
-+#define DRM_NOUVEAU_GEM_CPU_FINI 0x47
-+#define DRM_NOUVEAU_GEM_TILE 0x48
++#define DRM_NOUVEAU_GEM_CPU_PREP 0x45
++#define DRM_NOUVEAU_GEM_CPU_FINI 0x46
++#define DRM_NOUVEAU_GEM_TILE 0x47
++#define DRM_NOUVEAU_GEM_INFO 0x48
+
+#endif /* __NOUVEAU_DRM_H__ */
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1592
retrieving revision 1.1593
diff -u -p -r1.1592 -r1.1593
--- kernel.spec 25 Jun 2009 15:34:05 -0000 1.1592
+++ kernel.spec 26 Jun 2009 10:24:19 -0000 1.1593
@@ -440,7 +440,7 @@ Summary: The Linux kernel
Provides: kernel = %{rpmversion}-%{pkg_release}\
Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\
Provides: kernel-drm = 4.3.0\
-Provides: kernel-drm-nouveau = 12\
+Provides: kernel-drm-nouveau = 14\
Provides: kernel-modeset = 1\
Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
Requires(pre): %{kernel_prereq}\
@@ -1225,7 +1225,7 @@ ApplyPatch linux-2.6-e1000-ich9.patch
# Nouveau DRM + drm fixes
#ApplyPatch drm-next.patch
#ApplyPatch drm-modesetting-radeon.patch
-#ApplyPatch drm-nouveau.patch
+ApplyPatch drm-nouveau.patch
# pm broken on my thinkpad t60p - airlied
#ApplyPatch drm-radeon-pm.patch
ApplyPatch drm-no-gem-on-i8xx.patch
@@ -1846,6 +1846,9 @@ fi
# and build.
%changelog
+* Fri Jun 26 2009 Ben Skeggs <bskeggs at redhat.com>
+- drm-nouveau.patch: latest upstream + reenable
+
* Thu Jun 25 2009 Dave Jones <davej at redhat.com> 2.6.31-0.29.rc1
- Make kmemleak scan process stacks by default.
Should reduce false positives (which does also increase false negatives,
More information about the fedora-extras-commits
mailing list