rpms/kernel/devel drm-nouveau.patch, 1.6, 1.7 kernel.spec, 1.1271, 1.1272

Ben Skeggs bskeggs at fedoraproject.org
Fri Feb 6 23:46:11 UTC 2009


Author: bskeggs

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17699

Modified Files:
	drm-nouveau.patch kernel.spec 
Log Message:
nouveau: new snapshot, 0.0.12


drm-nouveau.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.6 -r 1.7 drm-nouveau.patch
Index: drm-nouveau.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-nouveau.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- drm-nouveau.patch	28 Jan 2009 21:33:11 -0000	1.6
+++ drm-nouveau.patch	6 Feb 2009 23:46:10 -0000	1.7
@@ -1,29 +1,29 @@
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
-index 5130b72..f29b63b 100644
+index 0d87bfc..433bd8b 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
-@@ -123,3 +123,9 @@ config DRM_SAVAGE
+@@ -134,3 +134,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 9aba961..954fd51 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/
++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 19039d8..d5718bb 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,517 +47,905 @@
  			  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..384c3b5
 --- /dev/null
 +++ b/drivers/gpu/drm/nouveau/Makefile
-@@ -0,0 +1,19 @@
+@@ -0,0 +1,24 @@
 +#
 +# 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 nouveau_gem.o \
++             nouveau_bios.o \
 +             nv04_timer.o \
 +             nv04_mc.o nv40_mc.o nv50_mc.o \
 +             nv04_fb.o nv10_fb.o nv40_fb.o \
 +             nv04_fifo.o nv10_fifo.o nv40_fifo.o nv50_fifo.o \
 +             nv04_graph.o nv10_graph.o nv20_graph.o \
 +             nv40_graph.o nv50_graph.o \
-+             nv04_instmem.o nv50_instmem.o
++             nv04_instmem.o nv50_instmem.o \
++             nv50_crtc.o nv50_dac.o nv50_sor.o nv50_connector.o \
++             nv50_lut.o nv50_cursor.o nv50_i2c.o nv50_display.o \
++             nv50_fbcon.o
 +
 +nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o
 +
 +obj-$(CONFIG_DRM_NOUVEAU)+= nouveau.o
-diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
+diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
 new file mode 100644
-index 0000000..ab3b23a
+index 0000000..faa2b2b
 --- /dev/null
-+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
-@@ -0,0 +1,296 @@
++++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
+@@ -0,0 +1,854 @@
 +/*
-+ * Copyright 2007 Dave Airlied
++ * Copyright (C) 2005-2006 Erik Waling
++ * Copyright (C) 2006 Stephane Marchesin
++ * Copyright (C) 2007-2008 Stuart Bennett
++ * Copyright (C) 2008 Maarten Maathuis.
 + * All Rights Reserved.
 + *
-+ * Permission is hereby granted, free of charge, to any person obtaining a
-+ * copy of this software and associated documentation files (the "Software"),
-+ * to deal in the Software without restriction, including without limitation
-+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-+ * and/or sell copies of the Software, and to permit persons to whom the
-+ * Software is furnished to do so, subject to the following conditions:
++ * Permission is hereby granted, free of charge, to any person obtaining
++ * a copy of this software and associated documentation files (the
++ * "Software"), to deal in the Software without restriction, including
++ * without limitation the rights to use, copy, modify, merge, publish,
++ * distribute, sublicense, and/or sell copies of the Software, and to
++ * permit persons to whom the Software is furnished to do so, subject to
++ * the following conditions:
 + *
-+ * The above copyright notice and this permission notice (including the next
-+ * paragraph) shall be included in all copies or substantial portions of the
-+ * Software.
++ * The above copyright notice and this permission notice (including the
++ * next paragraph) shall be included in all copies or substantial
++ * portions of the Software.
++ *
++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
++ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
++ * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
++ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
++ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
++ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 + *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
-+ * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
-+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
-+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-+ * OTHER DEALINGS IN THE SOFTWARE.
-+ */
-+/*
-+ * Authors: Dave Airlied <airlied at linux.ie>
-+ *	    Ben Skeggs   <darktama at iinet.net.au>
-+ *	    Jeremy Kolb  <jkolb at brandeis.edu>
 + */
 +
-+#include "drmP.h"
-+#include "nouveau_drm.h"
++#include <asm/byteorder.h>
++#include "nouveau_bios.h"
 +#include "nouveau_drv.h"
-+#include "nouveau_dma.h"
 +
-+static struct drm_ttm_backend *
-+nouveau_bo_create_ttm_backend_entry(struct drm_device * dev)
++/* returns true if it mismatches */
++static bool nv_checksum(const uint8_t *data, unsigned int length)
 +{
-+	struct drm_nouveau_private *dev_priv = dev->dev_private;
++	/* there's a few checksums in the BIOS, so here's a generic checking function */
++	int i;
++	uint8_t sum = 0;
 +
-+	switch (dev_priv->gart_info.type) {
-+	case NOUVEAU_GART_AGP:
-+		return drm_agp_init_ttm(dev);
-+	case NOUVEAU_GART_SGDMA:
-+		return nouveau_sgdma_init_ttm(dev);
-+	default:
-+		DRM_ERROR("Unknown GART type %d\n", dev_priv->gart_info.type);
-+		break;
-+	}
++	for (i = 0; i < length; i++)
++		sum += data[i];
 +
-+	return NULL;
++	if (sum)
++		return true;
++
++	return false;
 +}
 +
-+static int
-+nouveau_bo_fence_type(struct drm_buffer_object *bo,
-+		      uint32_t *fclass, uint32_t *type)
++static int nv_valid_bios(struct drm_device *dev, uint8_t *data)
 +{
-+	/* When we get called, *fclass is set to the requested fence class */
++	/* check for BIOS signature */
++	if (!(data[0] == 0x55 && data[1] == 0xAA)) {
++		DRM_ERROR("BIOS signature not found.\n");
++		return 0;
++	}
[...41526 lines suppressed...]
++	}
++
++	return 0;
++}
 diff --git a/include/drm/Kbuild b/include/drm/Kbuild
 index b940fdf..cfa6af4 100644
 --- a/include/drm/Kbuild
@@ -15439,24 +32481,24 @@
  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 67cadab..4e2c0c8 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);
+@@ -1206,6 +1206,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,
 diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h
 new file mode 100644
-index 0000000..a99c615
+index 0000000..4147f35
 --- /dev/null
 +++ b/include/drm/nouveau_drm.h
-@@ -0,0 +1,184 @@
+@@ -0,0 +1,299 @@
 +/*
 + * Copyright 2005 Stephane Marchesin.
 + * All Rights Reserved.
@@ -15484,13 +32526,26 @@
 +#ifndef __NOUVEAU_DRM_H__
 +#define __NOUVEAU_DRM_H__
 +
-+#define NOUVEAU_DRM_HEADER_PATCHLEVEL 11
++#define NOUVEAU_DRM_HEADER_PATCHLEVEL 12
 +
 +struct drm_nouveau_channel_alloc {
 +	uint32_t     fb_ctxdma_handle;
 +	uint32_t     tt_ctxdma_handle;
 +
 +	int          channel;
++
++	/* Notifier memory */
++	drm_handle_t notifier;
++	int          notifier_size;
++
++	/* DRM-enforced subchannel assignments */
++	struct {
++		uint32_t handle;
++		uint32_t grclass;
++	} subchan[8];
++	uint32_t nr_subchan;
++
++/* !MM_ENABLED ONLY */
 +	uint32_t     put_base;
 +	/* FIFO control regs */
 +	drm_handle_t ctrl;
@@ -15498,9 +32553,6 @@
 +	/* DMA command buffer */
 +	drm_handle_t cmdbuf;
 +	int          cmdbuf_size;
-+	/* Notifier memory */
-+	drm_handle_t notifier;
-+	int          notifier_size;
 +};
 +
 +struct drm_nouveau_channel_free {
@@ -15585,6 +32637,8 @@
 +#define NOUVEAU_GETPARAM_AGP_SIZE        9
 +#define NOUVEAU_GETPARAM_PCI_PHYSICAL    10
 +#define NOUVEAU_GETPARAM_CHIPSET_ID      11
++#define NOUVEAU_GETPARAM_MM_ENABLED      12
++#define NOUVEAU_GETPARAM_VM_VRAM_BASE    13
 +struct drm_nouveau_getparam {
 +	uint64_t param;
 +	uint64_t value;
@@ -15597,6 +32651,100 @@
 +	uint64_t value;
 +};
 +
++#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)
++
++struct drm_nouveau_gem_new {
++	uint64_t size;
++	uint32_t channel_hint;
++	uint32_t align;
++	uint32_t handle;
++	uint32_t domain;
++	uint32_t offset;
++};
++
++struct drm_nouveau_gem_pushbuf_bo {
++	uint64_t user_priv;
++	uint32_t handle;
++	uint32_t read_domains;
++	uint32_t write_domains;
++	uint32_t valid_domains;
++	uint32_t presumed_ok;
++	uint32_t presumed_domain;
++	uint64_t presumed_offset;
++};
++
++#define NOUVEAU_GEM_RELOC_LOW  (1 << 0)
++#define NOUVEAU_GEM_RELOC_HIGH (1 << 1)
++#define NOUVEAU_GEM_RELOC_OR   (1 << 2)
++struct drm_nouveau_gem_pushbuf_reloc {
++	uint32_t bo_index;
++	uint32_t reloc_index;
++	uint32_t flags;
++	uint32_t data;
++	uint32_t vor;
++	uint32_t tor;
++};
++
++#define NOUVEAU_GEM_MAX_BUFFERS 1024
++#define NOUVEAU_GEM_MAX_RELOCS 1024
++
++struct drm_nouveau_gem_pushbuf {
++	uint32_t channel;
++	uint32_t nr_dwords;
++	uint32_t nr_buffers;
++	uint32_t nr_relocs;
++	uint64_t dwords;
++	uint64_t buffers;
++	uint64_t relocs;
++};
++
++struct drm_nouveau_gem_pushbuf_call {
++	uint32_t channel;
++	uint32_t handle;
++	uint32_t offset;
++	uint32_t nr_buffers;
++	uint32_t nr_relocs;
++	uint32_t pad0;
++	uint64_t buffers;
++	uint64_t relocs;
++};
++
++struct drm_nouveau_gem_pin {
++	uint32_t handle;
++	uint32_t domain;
++	uint64_t offset;
++};
++
++struct drm_nouveau_gem_unpin {
++	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;
++};
++
++struct drm_nouveau_gem_cpu_fini {
++	uint32_t handle;
++};
++
++struct drm_nouveau_gem_tile {
++	uint32_t handle;
++	uint32_t delta;
++	uint32_t size;
++	uint32_t flags;
++};
++
 +enum nouveau_card_type {
 +	NV_UNKNOWN =0,
 +	NV_04      =4,
@@ -15639,5 +32787,14 @@
 +#define DRM_NOUVEAU_MEM_TILE           0x0a
 +#define DRM_NOUVEAU_SUSPEND            0x0b
 +#define DRM_NOUVEAU_RESUME             0x0c
++#define DRM_NOUVEAU_GEM_NEW            0x40
++#define DRM_NOUVEAU_GEM_PUSHBUF        0x41
++#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
 +
 +#endif /* __NOUVEAU_DRM_H__ */


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1271
retrieving revision 1.1272
diff -u -r1.1271 -r1.1272
--- kernel.spec	6 Feb 2009 15:16:22 -0000	1.1271
+++ kernel.spec	6 Feb 2009 23:46:10 -0000	1.1272
@@ -436,7 +436,7 @@
 Provides: kernel = %{rpmversion}-%{pkg_release}\
 Provides: kernel-%{_target_cpu} = %{rpmversion}-%{pkg_release}%{?1:.%{1}}\
 Provides: kernel-drm = 4.3.0\
-Provides: kernel-drm-nouveau = 11\
+Provides: kernel-drm-nouveau = 12\
 Provides: kernel-modeset = 1\
 Provides: kernel-uname-r = %{KVERREL}%{?1:.%{1}}\
 Requires(pre): %{kernel_prereq}\
@@ -1761,6 +1761,9 @@
 %kernel_variant_files -k vmlinux %{with_kdump} kdump
 
 %changelog
+* Fri Feb 06 2009 Ben Skeggs <bskeggs at redhat.com>
+- major nouveau snapshot update - 0.0.12
+
 * Fri Feb 06 2009 Chuck Ebbert <cebbert at redhat.com>
 - 2.6.29-rc3-git9
 




More information about the scm-commits mailing list