rpms/kernel/devel drm-page-flip.patch, 1.6, 1.7 kernel.spec, 1.1780, 1.1781

Dave Airlie airlied at fedoraproject.org
Wed Sep 9 09:09:31 UTC 2009


Author: airlied

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

Modified Files:
	drm-page-flip.patch kernel.spec 
Log Message:
* Wed Sep 09 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.218.rc9.git2
- fix r600 oops with page flip patch (#520766)


drm-page-flip.patch:
 drivers/gpu/drm/drm_crtc.c              |  169 +++++++++++++++++++++++++++++++-
 drivers/gpu/drm/drm_crtc_helper.c       |   12 ++
 drivers/gpu/drm/drm_drv.c               |    1 
 drivers/gpu/drm/drm_fops.c              |   68 ++++++++++++
 drivers/gpu/drm/drm_irq.c               |   43 ++++++++
 drivers/gpu/drm/drm_stub.c              |    1 
 drivers/gpu/drm/i915/i915_drv.c         |    1 
 drivers/gpu/drm/i915/intel_display.c    |   26 +++-
 drivers/gpu/drm/radeon/radeon_display.c |    3 
 include/drm/drm.h                       |   25 ++++
 include/drm/drmP.h                      |   32 ++++++
 include/drm/drm_crtc.h                  |   27 +++++
 include/drm/drm_crtc_helper.h           |    4 
 include/drm/drm_mode.h                  |   16 +++
 14 files changed, 414 insertions(+), 14 deletions(-)

Index: drm-page-flip.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-page-flip.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- drm-page-flip.patch	8 Sep 2009 06:09:56 -0000	1.6
+++ drm-page-flip.patch	9 Sep 2009 09:09:31 -0000	1.7
@@ -1,6 +1,7 @@
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c.da linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc.c	2009-09-08 16:08:09.000000000 +1000
+diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
+index ba728ad..4b7e748 100644
+--- a/drivers/gpu/drm/drm_crtc.c
++++ b/drivers/gpu/drm/drm_crtc.c
 @@ -34,6 +34,8 @@
  #include "drmP.h"
  #include "drm_crtc.h"
@@ -10,7 +11,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  struct drm_prop_enum_list {
  	int type;
  	char *name;
-@@ -330,6 +332,34 @@ void drm_framebuffer_cleanup(struct drm_
+@@ -330,6 +332,34 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
  EXPORT_SYMBOL(drm_framebuffer_cleanup);
  
  /**
@@ -66,7 +67,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  	mutex_unlock(&dev->mode_config.mutex);
  }
  EXPORT_SYMBOL(drm_crtc_init);
-@@ -369,6 +401,9 @@ void drm_crtc_cleanup(struct drm_crtc *c
+@@ -369,6 +401,9 @@ void drm_crtc_cleanup(struct drm_crtc *crtc)
  {
  	struct drm_device *dev = crtc->dev;
  
@@ -76,7 +77,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  	if (crtc->gamma_store) {
  		kfree(crtc->gamma_store);
  		crtc->gamma_store = NULL;
-@@ -376,6 +411,7 @@ void drm_crtc_cleanup(struct drm_crtc *c
+@@ -376,6 +411,7 @@ void drm_crtc_cleanup(struct drm_crtc *crtc)
  
  	drm_mode_object_put(dev, &crtc->base);
  	list_del(&crtc->head);
@@ -219,10 +220,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
 +
 +	return ret;
 +}
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.da linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_crtc_helper.c	2009-09-08 16:08:09.000000000 +1000
-@@ -872,8 +872,10 @@ int drm_crtc_helper_set_config(struct dr
+diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
+index ff447f1..fec66f9 100644
+--- a/drivers/gpu/drm/drm_crtc_helper.c
++++ b/drivers/gpu/drm/drm_crtc_helper.c
+@@ -872,8 +872,10 @@ int drm_crtc_helper_set_config(struct drm_mode_set *set)
  		old_fb = set->crtc->fb;
  		if (set->crtc->fb != set->fb)
  			set->crtc->fb = set->fb;
@@ -233,7 +235,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  		if (ret != 0)
  			goto fail;
  	}
-@@ -1095,3 +1097,13 @@ int drm_helper_resume_force_mode(struct 
+@@ -1095,3 +1097,13 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
  	return 0;
  }
  EXPORT_SYMBOL(drm_helper_resume_force_mode);
@@ -247,10 +249,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
 +	return crtc_funcs->mode_set_base(crtc, x, y, old_fb);
 +}
 +EXPORT_SYMBOL(drm_crtc_helper_set_base);
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c.da linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_drv.c	2009-09-08 16:08:09.000000000 +1000
-@@ -145,6 +145,7 @@ static struct drm_ioctl_desc drm_ioctls[
+diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
+index a75ca63..672f473 100644
+--- a/drivers/gpu/drm/drm_drv.c
++++ b/drivers/gpu/drm/drm_drv.c
+@@ -145,6 +145,7 @@ static struct drm_ioctl_desc drm_ioctls[] = {
  	DRM_IOCTL_DEF(DRM_IOCTL_MODE_GETFB, drm_mode_getfb, DRM_MASTER|DRM_CONTROL_ALLOW),
  	DRM_IOCTL_DEF(DRM_IOCTL_MODE_ADDFB, drm_mode_addfb, DRM_MASTER|DRM_CONTROL_ALLOW),
  	DRM_IOCTL_DEF(DRM_IOCTL_MODE_RMFB, drm_mode_rmfb, DRM_MASTER|DRM_CONTROL_ALLOW),
@@ -258,10 +261,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  };
  
  #define DRM_CORE_IOCTL_COUNT	ARRAY_SIZE( drm_ioctls )
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c.da linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c.da	2009-09-08 13:14:32.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_fops.c	2009-09-08 16:08:09.000000000 +1000
-@@ -257,6 +257,8 @@ static int drm_open_helper(struct inode 
+diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
+index 251bc0e..dcd9c66 100644
+--- a/drivers/gpu/drm/drm_fops.c
++++ b/drivers/gpu/drm/drm_fops.c
+@@ -257,6 +257,8 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
  
  	INIT_LIST_HEAD(&priv->lhead);
  	INIT_LIST_HEAD(&priv->fbs);
@@ -270,7 +274,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  
  	if (dev->driver->driver_features & DRIVER_GEM)
  		drm_gem_open(dev, priv);
-@@ -429,6 +431,9 @@ int drm_release(struct inode *inode, str
+@@ -429,6 +431,9 @@ int drm_release(struct inode *inode, struct file *filp)
  {
  	struct drm_file *file_priv = filp->private_data;
  	struct drm_device *dev = file_priv->minor->dev;
@@ -280,7 +284,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  	int retcode = 0;
  
  	lock_kernel();
-@@ -451,6 +456,19 @@ int drm_release(struct inode *inode, str
+@@ -451,6 +456,19 @@ int drm_release(struct inode *inode, struct file *filp)
  	if (file_priv->minor->master)
  		drm_master_release(dev, filp);
  
@@ -300,7 +304,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  	if (dev->driver->driver_features & DRIVER_GEM)
  		drm_gem_release(dev, file_priv);
  
-@@ -544,9 +562,55 @@ int drm_release(struct inode *inode, str
+@@ -544,9 +562,55 @@ int drm_release(struct inode *inode, struct file *filp)
  }
  EXPORT_SYMBOL(drm_release);
  
@@ -358,9 +362,10 @@ diff -up linux-2.6.30.noarch/drivers/gpu
 +	return mask;
  }
  EXPORT_SYMBOL(drm_poll);
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c.da linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c
---- linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c.da	2009-09-08 13:14:32.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/drm_irq.c	2009-09-08 16:08:09.000000000 +1000
+diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
+index f85aaf2..102d19d 100644
+--- a/drivers/gpu/drm/drm_irq.c
++++ b/drivers/gpu/drm/drm_irq.c
 @@ -34,6 +34,7 @@
   */
  
@@ -369,7 +374,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  
  #include <linux/interrupt.h>	/* For task queue support */
  
-@@ -71,6 +72,44 @@ int drm_irq_by_busid(struct drm_device *
+@@ -71,6 +72,44 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
  	return 0;
  }
  
@@ -414,16 +419,16 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  static void vblank_disable_fn(unsigned long arg)
  {
  	struct drm_device *dev = (struct drm_device *)arg;
-@@ -161,6 +200,8 @@ int drm_vblank_init(struct drm_device *d
+@@ -161,6 +200,8 @@ int drm_vblank_init(struct drm_device *dev, int num_crtcs)
  		atomic_set(&dev->vblank_refcount[i], 0);
  	}
  
-+	INIT_LIST_HEAD(&dev->flip_list);
 +	INIT_WORK(&dev->flip_work, drm_flip_work_func);
++
  	dev->vblank_disable_allowed = 0;
  
  	return 0;
-@@ -626,5 +667,7 @@ void drm_handle_vblank(struct drm_device
+@@ -626,5 +667,7 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
  {
  	atomic_inc(&dev->_vblank_count[crtc]);
  	DRM_WAKEUP(&dev->vbl_queue[crtc]);
@@ -431,9 +436,22 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  }
  EXPORT_SYMBOL(drm_handle_vblank);
 +
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c.da linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c
---- linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/i915/i915_drv.c	2009-09-08 16:08:09.000000000 +1000
+diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
+index 55bb8a8..65c8662 100644
+--- a/drivers/gpu/drm/drm_stub.c
++++ b/drivers/gpu/drm/drm_stub.c
+@@ -220,6 +220,7 @@ static int drm_fill_in_dev(struct drm_device * dev, struct pci_dev *pdev,
+ 	INIT_LIST_HEAD(&dev->ctxlist);
+ 	INIT_LIST_HEAD(&dev->vmalist);
+ 	INIT_LIST_HEAD(&dev->maplist);
++	INIT_LIST_HEAD(&dev->flip_list);
+ 
+ 	spin_lock_init(&dev->count_lock);
+ 	spin_lock_init(&dev->drw_lock);
+diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
+index dbe568c..b81305e 100644
+--- a/drivers/gpu/drm/i915/i915_drv.c
++++ b/drivers/gpu/drm/i915/i915_drv.c
 @@ -206,6 +206,7 @@ static struct drm_driver driver = {
  		 .mmap = drm_gem_mmap,
  		 .poll = drm_poll,
@@ -442,10 +460,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  #ifdef CONFIG_COMPAT
  		 .compat_ioctl = i915_compat_ioctl,
  #endif
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c.da linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c
---- linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/i915/intel_display.c	2009-09-08 16:08:09.000000000 +1000
-@@ -973,6 +973,8 @@ intel_pipe_set_base(struct drm_crtc *crt
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index 155719f..0d6e677 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -973,6 +973,8 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
  	u32 dspcntr, alignment;
  	int ret;
  
@@ -454,7 +473,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  	/* no fb bound */
  	if (!crtc->fb) {
  		DRM_DEBUG("No FB bound\n");
-@@ -1008,17 +1010,14 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1008,17 +1010,14 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
  		BUG();
  	}
  
@@ -472,7 +491,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  		return ret;
  	}
  
-@@ -1029,7 +1028,6 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1029,7 +1028,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
  		ret = i915_gem_object_get_fence_reg(obj);
  		if (ret != 0) {
  			i915_gem_object_unpin(obj);
@@ -480,7 +499,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  			return ret;
  		}
  	}
-@@ -1054,7 +1052,6 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1054,7 +1052,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
  	default:
  		DRM_ERROR("Unknown color depth\n");
  		i915_gem_object_unpin(obj);
@@ -488,7 +507,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  		return -EINVAL;
  	}
  	if (IS_I965G(dev)) {
-@@ -1086,17 +1083,14 @@ intel_pipe_set_base(struct drm_crtc *crt
+@@ -1086,17 +1083,14 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
  		I915_READ(dspbase);
  	}
  
@@ -507,7 +526,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  	if (!dev->primary->master)
  		return 0;
  
-@@ -2732,7 +2726,9 @@ static int intel_crtc_mode_set(struct dr
+@@ -2732,7 +2726,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
  	I915_WRITE(dspcntr_reg, dspcntr);
  
  	/* Flush the plane changes */
@@ -517,7 +536,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  
  	intel_update_watermarks(dev);
  
-@@ -3521,6 +3517,7 @@ static const struct drm_crtc_funcs intel
+@@ -3521,6 +3517,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
  	.gamma_set = intel_crtc_gamma_set,
  	.set_config = drm_crtc_helper_set_config,
  	.destroy = intel_crtc_destroy,
@@ -525,7 +544,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  };
  
  
-@@ -3533,7 +3530,7 @@ static void intel_crtc_init(struct drm_d
+@@ -3533,7 +3530,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
  	if (intel_crtc == NULL)
  		return;
  
@@ -534,7 +553,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  
  	drm_mode_crtc_set_gamma_size(&intel_crtc->base, 256);
  	intel_crtc->pipe = pipe;
-@@ -3717,9 +3714,18 @@ static int intel_user_framebuffer_create
+@@ -3717,9 +3714,18 @@ static int intel_user_framebuffer_create_handle(struct drm_framebuffer *fb,
  	return drm_gem_handle_create(file_priv, object, handle);
  }
  
@@ -553,34 +572,11 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  };
  
  int intel_framebuffer_create(struct drm_device *dev,
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.da linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c	2009-09-08 16:08:09.000000000 +1000
-@@ -993,7 +993,7 @@ nv04_crtc_create(struct drm_device *dev,
- 	nv_crtc->index = crtc_num;
- 	nv_crtc->last_dpms = NV_DPMS_CLEARED;
- 
--	drm_crtc_init(dev, &nv_crtc->base, &nv04_crtc_funcs);
-+	drm_crtc_init(dev, &nv_crtc->base, crtc_num, &nv04_crtc_funcs);
- 	drm_crtc_helper_add(&nv_crtc->base, &nv04_crtc_helper_funcs);
- 	drm_mode_crtc_set_gamma_size(&nv_crtc->base, 256);
- 
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.da linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c	2009-09-08 16:08:09.000000000 +1000
-@@ -777,7 +777,7 @@ nv50_crtc_create(struct drm_device *dev,
- 	crtc->set_dither = nv50_crtc_set_dither;
- 	crtc->set_scale = nv50_crtc_set_scale;
- 
--	drm_crtc_init(dev, &crtc->base, &nv50_crtc_funcs);
-+	drm_crtc_init(dev, &crtc->base, index, &nv50_crtc_funcs);
- 	drm_crtc_helper_add(&crtc->base, &nv50_crtc_helper_funcs);
- 	drm_mode_crtc_set_gamma_size(&crtc->base, 256);
- 
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c.da linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c
---- linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/radeon/radeon_display.c	2009-09-08 16:08:09.000000000 +1000
-@@ -168,6 +168,7 @@ static const struct drm_crtc_funcs radeo
+diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
+index f5739e2..0ec45bc 100644
+--- a/drivers/gpu/drm/radeon/radeon_display.c
++++ b/drivers/gpu/drm/radeon/radeon_display.c
+@@ -168,6 +168,7 @@ static const struct drm_crtc_funcs radeon_crtc_funcs = {
  	.gamma_set = radeon_crtc_gamma_set,
  	.set_config = drm_crtc_helper_set_config,
  	.destroy = radeon_crtc_destroy,
@@ -588,7 +584,7 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  };
  
  static void radeon_crtc_init(struct drm_device *dev, int index)
-@@ -180,7 +181,7 @@ static void radeon_crtc_init(struct drm_
+@@ -180,7 +181,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
  	if (radeon_crtc == NULL)
  		return;
  
@@ -597,9 +593,131 @@ diff -up linux-2.6.30.noarch/drivers/gpu
  
  	drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
  	radeon_crtc->crtc_id = index;
-diff -up linux-2.6.30.noarch/include/drm/drm_crtc.h.da linux-2.6.30.noarch/include/drm/drm_crtc.h
---- linux-2.6.30.noarch/include/drm/drm_crtc.h.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm_crtc.h	2009-09-08 16:08:09.000000000 +1000
+diff --git a/include/drm/drm.h b/include/drm/drm.h
+index 7cb50bd..1920323 100644
+--- a/include/drm/drm.h
++++ b/include/drm/drm.h
+@@ -686,6 +686,7 @@ struct drm_gem_open {
+ #define DRM_IOCTL_MODE_GETFB		DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
+ #define DRM_IOCTL_MODE_ADDFB		DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
+ #define DRM_IOCTL_MODE_RMFB		DRM_IOWR(0xAF, unsigned int)
++#define DRM_IOCTL_MODE_PAGE_FLIP	DRM_IOW( 0xB0, struct drm_mode_page_flip)
+ 
+ /**
+  * Device specific ioctls should only be in their respective headers
+@@ -698,6 +699,30 @@ struct drm_gem_open {
+ #define DRM_COMMAND_BASE                0x40
+ #define DRM_COMMAND_END			0xA0
+ 
++/**
++ * Header for events written back to userspace on the drm fd.  The
++ * type defines the type of event, the length specifies the total
++ * length of the event (including the header), and user_data is
++ * typically a 64 bit value passed with the ioctl that triggered the
++ * event.  A read on the drm fd will always only return complete
++ * events, that is, if for example the read buffer is 100 bytes, and
++ * there are two 64 byte events pending, only one will be returned.
++ */
++struct drm_event {
++	__u32 type;
++	__u32 length;
++};
++
++#define DRM_EVENT_MODE_PAGE_FLIP 0x01
++
++struct drm_event_page_flip {
++	struct drm_event base;
++	__u64 user_data;
++	__u32 tv_sec;
++	__u32 tv_usec;
++	__u32 frame;
++};
++
+ /* typedef area */
+ #ifndef __KERNEL__
+ typedef struct drm_clip_rect drm_clip_rect_t;
+diff --git a/include/drm/drmP.h b/include/drm/drmP.h
+index eeefb63..5431888 100644
+--- a/include/drm/drmP.h
++++ b/include/drm/drmP.h
+@@ -426,6 +426,14 @@ struct drm_buf_entry {
+ 	struct drm_freelist freelist;
+ };
+ 
++/* Event queued up for userspace to read */
++struct drm_pending_event {
++	struct drm_event *event;
++	struct list_head link;
++	struct drm_file *file_priv;
++	void (*destroy) (struct drm_pending_event *event);
++};
++
+ /** File private data */
+ struct drm_file {
+ 	int authenticated;
+@@ -449,6 +457,9 @@ struct drm_file {
+ 	struct drm_master *master; /* master this node is currently associated with
+ 				      N.B. not always minor->master */
+ 	struct list_head fbs;
++
++	wait_queue_head_t event_wait;
++	struct list_head event_list;
+ };
+ 
+ /** Wait queue */
+@@ -897,6 +908,16 @@ struct drm_minor {
+ 	struct drm_mode_group mode_group;
+ };
+ 
++struct drm_pending_flip {
++	struct drm_pending_event pending_event;
++	struct drm_framebuffer *old_fb;
++	struct drm_crtc *crtc;
++	u32 frame;
++	int pipe;
++	struct list_head link;
++	struct drm_event_page_flip event;
++};
++
+ /**
+  * DRM device structure. This structure represent a complete card that
+  * may contain multiple heads.
+@@ -996,6 +1017,13 @@ struct drm_device {
+ 
+ 	u32 max_vblank_count;           /**< size of vblank counter register */
+ 
++	struct work_struct flip_work;
++
++	/**
++	 * List of objects waiting on flip completion
++	 */
++	struct list_head flip_list;
++
+ 	/*@} */
+ 	cycles_t ctx_start;
+ 	cycles_t lck_start;
+@@ -1132,6 +1160,8 @@ extern int drm_lastclose(struct drm_device *dev);
+ extern int drm_open(struct inode *inode, struct file *filp);
+ extern int drm_stub_open(struct inode *inode, struct file *filp);
+ extern int drm_fasync(int fd, struct file *filp, int on);
++extern ssize_t drm_read(struct file *filp, char __user *buffer,
++			size_t count, loff_t *offset);
+ extern int drm_release(struct inode *inode, struct file *filp);
+ 
+ 				/* Mapping support (drm_vm.h) */
+@@ -1298,6 +1328,8 @@ extern void drm_vblank_pre_modeset(struct drm_device *dev, int crtc);
+ extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
+ extern int drm_modeset_ctl(struct drm_device *dev, void *data,
+ 			   struct drm_file *file_priv);
++extern void drm_finish_pending_flip(struct drm_device *dev,
++				   struct drm_pending_flip *f, u32 frame);
+ 
+ 				/* AGP/GART support (drm_agpsupport.h) */
+ extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);
+diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
+index ae1e9e1..525f770 100644
+--- a/include/drm/drm_crtc.h
++++ b/include/drm/drm_crtc.h
 @@ -238,6 +238,12 @@ struct drm_display_info {
  };
  
@@ -678,7 +796,7 @@ diff -up linux-2.6.30.noarch/include/drm
  			  const struct drm_crtc_funcs *funcs);
  extern void drm_crtc_cleanup(struct drm_crtc *crtc);
  
-@@ -744,6 +769,8 @@ extern int drm_mode_gamma_get_ioctl(stru
+@@ -744,6 +769,8 @@ extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
  extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
  				    void *data, struct drm_file *file_priv);
  extern bool drm_detect_hdmi_monitor(struct edid *edid);
@@ -687,10 +805,11 @@ diff -up linux-2.6.30.noarch/include/drm
  extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev,
  				int hdisplay, int vdisplay, int vrefresh,
  				bool reduced, bool interlaced);
-diff -up linux-2.6.30.noarch/include/drm/drm_crtc_helper.h.da linux-2.6.30.noarch/include/drm/drm_crtc_helper.h
---- linux-2.6.30.noarch/include/drm/drm_crtc_helper.h.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm_crtc_helper.h	2009-09-08 16:08:09.000000000 +1000
-@@ -126,4 +126,8 @@ static inline void drm_connector_helper_
+diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
+index 4c8daca..b5bd0b8 100644
+--- a/include/drm/drm_crtc_helper.h
++++ b/include/drm/drm_crtc_helper.h
+@@ -126,4 +126,8 @@ static inline void drm_connector_helper_add(struct drm_connector *connector,
  }
  
  extern int drm_helper_resume_force_mode(struct drm_device *dev);
@@ -699,51 +818,10 @@ diff -up linux-2.6.30.noarch/include/drm
 +				    struct drm_framebuffer *old_fb);
 +
  #endif
-diff -up linux-2.6.30.noarch/include/drm/drm.h.da linux-2.6.30.noarch/include/drm/drm.h
---- linux-2.6.30.noarch/include/drm/drm.h.da	2009-06-10 13:05:27.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm.h	2009-09-08 16:08:09.000000000 +1000
-@@ -686,6 +686,7 @@ struct drm_gem_open {
- #define DRM_IOCTL_MODE_GETFB		DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
- #define DRM_IOCTL_MODE_ADDFB		DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
- #define DRM_IOCTL_MODE_RMFB		DRM_IOWR(0xAF, unsigned int)
-+#define DRM_IOCTL_MODE_PAGE_FLIP	DRM_IOW( 0xB0, struct drm_mode_page_flip)
- 
- /**
-  * Device specific ioctls should only be in their respective headers
-@@ -698,6 +699,30 @@ struct drm_gem_open {
- #define DRM_COMMAND_BASE                0x40
- #define DRM_COMMAND_END			0xA0
- 
-+/**
-+ * Header for events written back to userspace on the drm fd.  The
-+ * type defines the type of event, the length specifies the total
-+ * length of the event (including the header), and user_data is
-+ * typically a 64 bit value passed with the ioctl that triggered the
-+ * event.  A read on the drm fd will always only return complete
-+ * events, that is, if for example the read buffer is 100 bytes, and
-+ * there are two 64 byte events pending, only one will be returned.
-+ */
-+struct drm_event {
-+	__u32 type;
-+	__u32 length;
-+};
-+
-+#define DRM_EVENT_MODE_PAGE_FLIP 0x01
-+
-+struct drm_event_page_flip {
-+	struct drm_event base;
-+	__u64 user_data;
-+	__u32 tv_sec;
-+	__u32 tv_usec;
-+	__u32 frame;
-+};
-+
- /* typedef area */
- #ifndef __KERNEL__
- typedef struct drm_clip_rect drm_clip_rect_t;
-diff -up linux-2.6.30.noarch/include/drm/drm_mode.h.da linux-2.6.30.noarch/include/drm/drm_mode.h
---- linux-2.6.30.noarch/include/drm/drm_mode.h.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drm_mode.h	2009-09-08 16:08:09.000000000 +1000
+diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
+index 1f90841..6f08a77 100644
+--- a/include/drm/drm_mode.h
++++ b/include/drm/drm_mode.h
 @@ -268,4 +268,20 @@ struct drm_mode_crtc_lut {
  	__u64 blue;
  };
@@ -765,80 +843,3 @@ diff -up linux-2.6.30.noarch/include/drm
 +};
 +
  #endif
-diff -up linux-2.6.30.noarch/include/drm/drmP.h.da linux-2.6.30.noarch/include/drm/drmP.h
---- linux-2.6.30.noarch/include/drm/drmP.h.da	2009-09-08 16:07:49.000000000 +1000
-+++ linux-2.6.30.noarch/include/drm/drmP.h	2009-09-08 16:08:09.000000000 +1000
-@@ -426,6 +426,14 @@ struct drm_buf_entry {
- 	struct drm_freelist freelist;
- };
- 
-+/* Event queued up for userspace to read */
-+struct drm_pending_event {
-+	struct drm_event *event;
-+	struct list_head link;
-+	struct drm_file *file_priv;
-+	void (*destroy) (struct drm_pending_event *event);
-+};
-+
- /** File private data */
- struct drm_file {
- 	int authenticated;
-@@ -449,6 +457,9 @@ struct drm_file {
- 	struct drm_master *master; /* master this node is currently associated with
- 				      N.B. not always minor->master */
- 	struct list_head fbs;
-+
-+	wait_queue_head_t event_wait;
-+	struct list_head event_list;
- };
- 
- /** Wait queue */
-@@ -897,6 +908,16 @@ struct drm_minor {
- 	struct drm_mode_group mode_group;
- };
- 
-+struct drm_pending_flip {
-+	struct drm_pending_event pending_event;
-+	struct drm_framebuffer *old_fb;
-+	struct drm_crtc *crtc;
-+	u32 frame;
-+	int pipe;
-+	struct list_head link;
-+	struct drm_event_page_flip event;
-+};
-+
- /**
-  * DRM device structure. This structure represent a complete card that
-  * may contain multiple heads.
-@@ -996,6 +1017,13 @@ struct drm_device {
- 
- 	u32 max_vblank_count;           /**< size of vblank counter register */
- 
-+	struct work_struct flip_work;
-+
-+	/**
-+	 * List of objects waiting on flip completion
-+	 */
-+	struct list_head flip_list;
-+
- 	/*@} */
- 	cycles_t ctx_start;
- 	cycles_t lck_start;
-@@ -1132,6 +1160,8 @@ extern int drm_lastclose(struct drm_devi
- extern int drm_open(struct inode *inode, struct file *filp);
- extern int drm_stub_open(struct inode *inode, struct file *filp);
- extern int drm_fasync(int fd, struct file *filp, int on);
-+extern ssize_t drm_read(struct file *filp, char __user *buffer,
-+			size_t count, loff_t *offset);
- extern int drm_release(struct inode *inode, struct file *filp);
- 
- 				/* Mapping support (drm_vm.h) */
-@@ -1300,6 +1330,8 @@ extern void drm_vblank_pre_modeset(struc
- extern void drm_vblank_post_modeset(struct drm_device *dev, int crtc);
- extern int drm_modeset_ctl(struct drm_device *dev, void *data,
- 			   struct drm_file *file_priv);
-+extern void drm_finish_pending_flip(struct drm_device *dev,
-+				   struct drm_pending_flip *f, u32 frame);
- 
- 				/* AGP/GART support (drm_agpsupport.h) */
- extern struct drm_agp_head *drm_agp_init(struct drm_device *dev);


Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1780
retrieving revision 1.1781
diff -u -p -r1.1780 -r1.1781
--- kernel.spec	9 Sep 2009 06:41:34 -0000	1.1780
+++ kernel.spec	9 Sep 2009 09:09:31 -0000	1.1781
@@ -2025,6 +2025,9 @@ fi
 # and build.
 
 %changelog
+* Wed Sep 09 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.218.rc9.git2
+- fix r600 oops with page flip patch (#520766)
+
 * Wed Sep 09 2009 Ben Skeggs <bskeggs at redhat.com>
 - drm-nouveau.patch: fix display resume on pre-G8x chips
 




More information about the fedora-extras-commits mailing list