rpms/kernel/devel linux-2.6-drm-git-mm.patch, NONE, 1.1 kernel.spec, 1.457, 1.458 nouveau-drm.patch, 1.7, 1.8

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Thu Feb 28 23:42:36 UTC 2008


Author: airlied

Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26619

Modified Files:
	kernel.spec nouveau-drm.patch 
Added Files:
	linux-2.6-drm-git-mm.patch 
Log Message:
* Wed Feb 27 2008 Dave Airlie <airlied at redhat.com>
- linux-2.6-drm-git-mm.patch - Add upstream git queue


linux-2.6-drm-git-mm.patch:

--- NEW FILE linux-2.6-drm-git-mm.patch ---
commit ae0bdbd7e1d02e978323640256125f8a5391510a
Author: Nick Piggin <npiggin at suse.de>
Date:   Thu Feb 7 16:29:15 2008 +1000

    drm:  reimplement nopfn callers with fault
    
    Reimplement the existing nopfn handlers with ->fault so we can subsequently
    remove nopfn
    
    Signed-off-by: Nick Piggin <npiggin at suse.de>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit 29403da6adea71d155a4c3ad0923cd7c86f0bf9e
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Feb 7 16:21:57 2008 +1000

    drm: remove tlb flush call as no longer needed.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit b691c8da4038e0e01fb3beaa06bf21468c8dd0f0
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jan 25 11:36:39 2008 +1000

    drm/i915: final i915 interface change - make reloc use copy from user
    
    Life is a lot simpler especially with relocation avoidance code, if we
    simple store the relocations in a malloced buffer and copy from user
    instead of bring up a BO everytime.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit 222a41948d2a1f454c7f978f3c3f18dc25061216
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Jan 25 11:05:59 2008 +1000

    drm: whitespace and some label cleanups.
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>

commit 046fd35ec86a5744b6a1073e47fd7fea1ab0c553
Author: Kyle McMartin <kyle at mcmartin.ca>
Date:   Thu Jan 24 16:48:24 2008 +1000

    i915: fix invalid opcode exception on cpus without clflush
    
    i915_flush_ttm was unconditionally executing a clflush instruction
    to (obviously) flush the cache. Instead, check if the cpu supports
    clflush, and if not, fall back to calling wbinvd to flush the entire
    cache.
    
    Signed-off-by: Kyle McMartin <kmcmartin at redhat.com>
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit 9f32218d9b003af5206d9e0c280a2bcff19ee125
Author: Eric Anholt <eric at anholt.net>
Date:   Thu Jan 24 16:47:28 2008 +1000

    drm: Add additional explanation of DRM_BO_FLAG_CACHED_MAPPED
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit 9149865182a2edf9e62ad290bbe93521f1c00372
Author: Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
Date:   Thu Jan 24 16:44:25 2008 +1000

    drm/ttm:  Properly propagate the user-space fence flags.
    
    This avoids a sync flush when user-space has already programmed
    and MI_FLUSH in the batchbuffer.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit f930fcb409db57172f7743d80cea9c6eb5bedfc4
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:42:46 2008 +1000

    drm: Change drm_bo_type_dc to drm_bo_type_device and comment usage of this value.
    
    I couldn't figure out what drm_bo_type_dc was for; Dave Airlie finally clued
    me in that it was the 'normal' buffer objects with kernel allocated pages
    that could be mmapped from the drm device file.
    
    I thought that 'drm_bo_type_device' was a more descriptive name.
    
    I also added a bunch of comments describing the use of the type enum values
    the functions that use them.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit ba1f054949cf2e71e80031fcbf8676db6d118b63
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:41:36 2008 +1000

    drm/ttm: Rename inappropriately named 'mask' fields to 'proposed_flags' instead.
    
    Flags pending validation were stored in a misleadingly named field, 'mask'.
    As 'mask' is already used to indicate pieces of a flags field which are
    changing, it seems better to use a name reflecting the actual purpose of
    this field. I chose 'proposed_flags' as they may not actually end up in
    'flags', and in an case will be modified when they are moved over.
    
    This affects the API, but not ABI of the user-mode interface.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit f386dcbb2d8d6b2410ebfe733d82c615c41c2a25
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:40:25 2008 +1000

    drm: Use dummy_read_page for unpopulated kernel-allocated ttm pages.
    
    Previously, dummy_read_page was used only for read-only user allocations; it
    filled in pages that were not present in the user address map (presumably,
    these were allocated but never written to pages).
    
    This patch allows them to be used for read-only ttms allocated from the
    kernel, so that applications can over-allocate buffers without forcing every
    page to be allocated.
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>

commit 6e14fdc7ddb806e64e65ced441e925cd64603bd5
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:39:42 2008 +1000

    drm: Move dummy_read_page from drm_ttm_set_user to drm_ttm_create.
    
    I'm hoping to use the dummy_read_page for kernel allocated buffers to avoid
    allocating extra pages for read-only buffers (like vertex and batch buffers)
    This also eliminates the 'write' parameter to drm_ttm_set_user and just
    has DRM_TTM_PAGE_WRITE passed into drm_ttm_create.
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>

commit 7733096f48ad73ddb566b858d879fe0c49e48732
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:36:31 2008 +1000

    drm/ttm: Clean up and document drm_ttm.c APIs. drm_bind_ttm -> drm_ttm_bind.
    
    Aside from changing drm_bind_ttm to drm_ttm_bind, this patch
    adds only documentation and fixes the functions inside drm_ttm.c
    to all be prefixed with drm_ttm_.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit f953d51ccca1d8ce00eec8dbcac86491f23805bb
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:35:31 2008 +1000

    drm/ttm: Document drm_ttm_set_user.
    
    Add a comment explaining the parameters for this function
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit ca6d9673159712446a996c5810656fcb50a9cde4
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:34:54 2008 +1000

    drm/ttm: Document drm_buffer_object_validate function.
    
    Just add documentation for this function, no code changes.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit 94626068d3d5f8df61e1df79abfabd828041ca80
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:34:16 2008 +1000

    drm/ttm: Document fence_class mess in drm_bo_setstatus_ioctl
    
    drmBOSetStatus does not bother to set the fence_class parameter.
    Fortunately, drm_bo_setstatus_ioctl doesn't end up using it as it
    calls drm_bo_handle_validate with use_old_fence_class = 1.
    
    Signed-off-by: Dave Airlie <airlied at redhat.com>

commit 3f8b8605ad27546b80b4a55d5451f7cd3726df01
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:33:23 2008 +1000

    drm/ttm: Document drm_bo_handle_validate. Match drm_bo_do_validate parameter order.
    
    Document parameters and usage for drm_bo_handle_validate. Change parameter
    order to match drm_bo_do_validate (fence_class has been moved to after
    flags, hint and mask values). Existing users of this function have been
    changed, but out-of-tree users must be modified separately.
    
    Signed-off-by: Dave Airlie <airlied at linux.ie>

commit d2a2f35ac08ab9945c3bce188ccb37e528958524
Author: Keith Packard <keithp at keithp.com>
Date:   Thu Jan 24 16:32:43 2008 +1000

    drm/ttm: Document drm_bo_do_validate. Remove spurious 'do_wait' parameter
    
    Add comments about the parameters to drm_bo_do_validate, along
[...10027 lines suppressed...]
+void i915_user_irq_on(drm_i915_private_t *dev_priv)
+{
+	spin_lock(&dev_priv->user_irq_lock);
+	if (dev_priv->irq_enabled && (++dev_priv->user_irq_refcount == 1)) {
+		dev_priv->irq_enable_reg |= USER_INT_FLAG;
+		I915_WRITE16(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg);
+	}
+	spin_unlock(&dev_priv->user_irq_lock);
+}
+
+void i915_user_irq_off(drm_i915_private_t *dev_priv)
+{
+	spin_lock(&dev_priv->user_irq_lock);
+	if (dev_priv->irq_enabled && (--dev_priv->user_irq_refcount == 0)) {
+		/*		dev_priv->irq_enable_reg &= ~USER_INT_FLAG;
+		  I915_WRITE16(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg);*/
+	}
+	spin_unlock(&dev_priv->user_irq_lock);
+}
+
+
 static int i915_wait_irq(struct drm_device * dev, int irq_nr)
 {
 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
@@ -308,8 +409,10 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr)
 
 	dev_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
 
+	i915_user_irq_on(dev_priv);
 	DRM_WAIT_ON(ret, dev_priv->irq_queue, 3 * DRM_HZ,
 		    READ_BREADCRUMB(dev_priv) >= irq_nr);
+	i915_user_irq_off(dev_priv);
 
 	if (ret == -EBUSY) {
 		DRM_ERROR("EBUSY -- rec: %d emitted: %d\n",
@@ -320,7 +423,8 @@ static int i915_wait_irq(struct drm_device * dev, int irq_nr)
 	return ret;
 }
 
-static int i915_driver_vblank_do_wait(struct drm_device *dev, unsigned int *sequence,
+static int i915_driver_vblank_do_wait(struct drm_device *dev,
+				      unsigned int *sequence,
 				      atomic_t *counter)
 {
 	drm_i915_private_t *dev_priv = dev->dev_private;
@@ -397,15 +501,15 @@ int i915_irq_wait(struct drm_device *dev, void *data,
 static void i915_enable_interrupt (struct drm_device *dev)
 {
 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
-	u16 flag;
 
-	flag = 0;
+	dev_priv->irq_enable_reg = USER_INT_FLAG;
 	if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_A)
-		flag |= VSYNC_PIPEA_FLAG;
+		dev_priv->irq_enable_reg |= VSYNC_PIPEA_FLAG;
 	if (dev_priv->vblank_pipe & DRM_I915_VBLANK_PIPE_B)
-		flag |= VSYNC_PIPEB_FLAG;
+		dev_priv->irq_enable_reg |= VSYNC_PIPEB_FLAG;
 
-	I915_WRITE16(I915REG_INT_ENABLE_R, USER_INT_FLAG | flag);
+	I915_WRITE16(I915REG_INT_ENABLE_R, dev_priv->irq_enable_reg);
+	dev_priv->irq_enabled = 1;
 }
 
 /* Set the vblank monitor pipe
@@ -464,7 +568,7 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 	drm_i915_private_t *dev_priv = dev->dev_private;
 	drm_i915_vblank_swap_t *swap = data;
 	drm_i915_vbl_swap_t *vbl_swap;
-	unsigned int pipe, seqtype, curseq;
+	unsigned int pipe, seqtype, curseq, plane;
 	unsigned long irqflags;
 	struct list_head *list;
 
@@ -479,12 +583,14 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 	}
 
 	if (swap->seqtype & ~(_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE |
-			     _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)) {
+			     _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS |
+			     _DRM_VBLANK_FLIP)) {
 		DRM_ERROR("Invalid sequence type 0x%x\n", swap->seqtype);
 		return -EINVAL;
 	}
 
-	pipe = (swap->seqtype & _DRM_VBLANK_SECONDARY) ? 1 : 0;
+	plane = (swap->seqtype & _DRM_VBLANK_SECONDARY) ? 1 : 0;
+	pipe = i915_get_pipe(dev, plane);
 
 	seqtype = swap->seqtype & (_DRM_VBLANK_RELATIVE | _DRM_VBLANK_ABSOLUTE);
 
@@ -495,6 +601,11 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 
 	spin_lock_irqsave(&dev->drw_lock, irqflags);
 
+	/* It makes no sense to schedule a swap for a drawable that doesn't have
+	 * valid information at this point. E.g. this could mean that the X
+	 * server is too old to push drawable information to the DRM, in which
+	 * case all such swaps would become ineffective.
+	 */
 	if (!drm_get_drawable_info(dev, swap->drawable)) {
 		spin_unlock_irqrestore(&dev->drw_lock, irqflags);
 		DRM_DEBUG("Invalid drawable ID %d\n", swap->drawable);
@@ -517,14 +628,43 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 		}
 	}
 
+	if (swap->seqtype & _DRM_VBLANK_FLIP) {
+		swap->sequence--;
+
+		if ((curseq - swap->sequence) <= (1<<23)) {
+			struct drm_drawable_info *drw;
+
+			LOCK_TEST_WITH_RETURN(dev, file_priv);
+
+			spin_lock_irqsave(&dev->drw_lock, irqflags);
+
+			drw = drm_get_drawable_info(dev, swap->drawable);
+
+			if (!drw) {
+				spin_unlock_irqrestore(&dev->drw_lock,
+				    irqflags);
+				DRM_DEBUG("Invalid drawable ID %d\n",
+					  swap->drawable);
+				return -EINVAL;
+			}
+
+			i915_dispatch_vsync_flip(dev, drw, plane);
+
+			spin_unlock_irqrestore(&dev->drw_lock, irqflags);
+
+			return 0;
+		}
+	}
+
 	spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);
 
 	list_for_each(list, &dev_priv->vbl_swaps.head) {
 		vbl_swap = list_entry(list, drm_i915_vbl_swap_t, head);
 
 		if (vbl_swap->drw_id == swap->drawable &&
-		    vbl_swap->pipe == pipe &&
+		    vbl_swap->plane == plane &&
 		    vbl_swap->sequence == swap->sequence) {
+			vbl_swap->flip = (swap->seqtype & _DRM_VBLANK_FLIP);
 			spin_unlock_irqrestore(&dev_priv->swaps_lock, irqflags);
 			DRM_DEBUG("Already scheduled\n");
 			return 0;
@@ -548,8 +688,12 @@ int i915_vblank_swap(struct drm_device *dev, void *data,
 	DRM_DEBUG("\n");
 
 	vbl_swap->drw_id = swap->drawable;
-	vbl_swap->pipe = pipe;
+	vbl_swap->plane = plane;
 	vbl_swap->sequence = swap->sequence;
+	vbl_swap->flip = (swap->seqtype & _DRM_VBLANK_FLIP);
+
+	if (vbl_swap->flip)
+		swap->sequence++;
 
 	spin_lock_irqsave(&dev_priv->swaps_lock, irqflags);
 
@@ -567,7 +711,7 @@ void i915_driver_irq_preinstall(struct drm_device * dev)
 {
 	drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
 
-	I915_WRITE16(I915REG_HWSTAM, 0xfffe);
+	I915_WRITE16(I915REG_HWSTAM, 0xeffe);
 	I915_WRITE16(I915REG_INT_MASK_R, 0x0);
 	I915_WRITE16(I915REG_INT_ENABLE_R, 0x0);
 }
@@ -580,10 +724,17 @@ void i915_driver_irq_postinstall(struct drm_device * dev)
 	INIT_LIST_HEAD(&dev_priv->vbl_swaps.head);
 	dev_priv->swaps_pending = 0;
 
-	if (!dev_priv->vblank_pipe)
-		dev_priv->vblank_pipe = DRM_I915_VBLANK_PIPE_A;
+	spin_lock_init(&dev_priv->user_irq_lock);
+	dev_priv->user_irq_refcount = 0;
+
 	i915_enable_interrupt(dev);
 	DRM_INIT_WAITQUEUE(&dev_priv->irq_queue);
+
+	/*
+	 * Initialize the hardware status page IRQ location.
+	 */
+
+	I915_WRITE(I915REG_INSTPM, (1 << 5) | (1 << 21));
 }
 
 void i915_driver_irq_uninstall(struct drm_device * dev)
@@ -594,6 +745,7 @@ void i915_driver_irq_uninstall(struct drm_device * dev)
 	if (!dev_priv)
 		return;
 
+	dev_priv->irq_enabled = 0;
 	I915_WRITE16(I915REG_HWSTAM, 0xffff);
 	I915_WRITE16(I915REG_INT_MASK_R, 0xffff);
 	I915_WRITE16(I915REG_INT_ENABLE_R, 0x0);


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.457
retrieving revision 1.458
diff -u -r1.457 -r1.458
--- kernel.spec	28 Feb 2008 02:06:24 -0000	1.457
+++ kernel.spec	28 Feb 2008 23:42:01 -0000	1.458
@@ -616,8 +616,9 @@
 Patch1515: linux-2.6-lirc.patch
 
 # nouveau + drm fixes
-Patch1802: nouveau-drm.patch
-Patch1803: linux-2.6-ppc32-ucmpdi2.patch
+Patch1801: linux-2.6-drm-git-mm.patch
+Patch1802: linux-2.6-ppc32-ucmpdi2.patch
+Patch1803: nouveau-drm.patch
 
 # kludge to make ich9 e1000 work
 Patch2000: linux-2.6-e1000-ich9.patch
@@ -1129,8 +1130,9 @@
 ApplyPatch linux-2.6-netdev-atl2.patch
 
 # Nouveau DRM + drm fixes
-ApplyPatch nouveau-drm.patch
+ApplyPatch linux-2.6-drm-git-mm.patch
 ApplyPatch linux-2.6-ppc32-ucmpdi2.patch
+ApplyPatch nouveau-drm.patch
 
 # ext4dev stable patch queue, slated for 2.6.25
 #ApplyPatch linux-2.6-ext4-stable-queue.patch
@@ -1733,6 +1735,9 @@
 %kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL} -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.conf %{with_xen} xen
 
 %changelog
+* Wed Feb 27 2008 Dave Airlie <airlied at redhat.com>
+- linux-2.6-drm-git-mm.patch - Add upstream git queue
+
 * Wed Feb 27 2008 John W. Linville <linville at redhat.com>
 - Use a separate config option for the b43 pci to ssb bridge.
 - Don't build bcm43xx if SSB is static and b43 PCI-SSB bridge is enabled.

nouveau-drm.patch:

Index: nouveau-drm.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/nouveau-drm.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- nouveau-drm.patch	12 Feb 2008 06:18:05 -0000	1.7
+++ nouveau-drm.patch	28 Feb 2008 23:42:01 -0000	1.8
@@ -20,7 +20,7 @@
 @@ -14,6 +14,16 @@ mga-objs    := mga_drv.o mga_dma.o mga_state.o mga_warp.o mga_irq.o
  i810-objs   := i810_drv.o i810_dma.o
  i830-objs   := i830_drv.o i830_dma.o i830_irq.o
- i915-objs   := i915_drv.o i915_dma.o i915_irq.o i915_mem.o
+ i915-objs   := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o i915_buffer.o
 +nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
 +		nouveau_object.o nouveau_irq.o nouveau_notifier.o \
 +		nouveau_sgdma.o nouveau_dma.o \




More information about the fedora-extras-commits mailing list