rpms/kernel/devel drm-page-flip.patch, 1.5, 1.6 kernel.spec, 1.1772, 1.1773
Dave Airlie
airlied at fedoraproject.org
Tue Sep 8 06:09:58 UTC 2009
- Previous message (by thread): rpms/xscreensaver/devel .cvsignore, 1.12, 1.13 sources, 1.12, 1.13 xscreensaver.spec, 1.97, 1.98
- Next message (by thread): rpms/xscreensaver/F-10 .cvsignore, 1.12, 1.13 sources, 1.12, 1.13 xscreensaver.spec, 1.82, 1.83 xscreensaver-5.08-hacks-window-too-small.patch, 1.1, NONE xscreensaver-5.09-hacks-missing-header-creation.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: airlied
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18090
Modified Files:
drm-page-flip.patch kernel.spec
Log Message:
* Tue Sep 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.210.rc9.git1
- drm-page-flip.patch: rebase again
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/i915/i915_drv.c | 1
drivers/gpu/drm/i915/intel_display.c | 26 +++-
drivers/gpu/drm/nouveau/nv04_crtc.c | 2
drivers/gpu/drm/nouveau/nv50_crtc.c | 2
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 +++
15 files changed, 415 insertions(+), 16 deletions(-)
Index: drm-page-flip.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/drm-page-flip.patch,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- drm-page-flip.patch 8 Sep 2009 03:47:17 -0000 1.5
+++ drm-page-flip.patch 8 Sep 2009 06:09:56 -0000 1.6
@@ -1,7 +1,6 @@
-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
+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
@@ -34,6 +34,8 @@
#include "drmP.h"
#include "drm_crtc.h"
@@ -11,7 +10,7 @@ index ba728ad..4b7e748 100644
struct drm_prop_enum_list {
int type;
char *name;
-@@ -330,6 +332,34 @@ void drm_framebuffer_cleanup(struct drm_framebuffer *fb)
+@@ -330,6 +332,34 @@ void drm_framebuffer_cleanup(struct drm_
EXPORT_SYMBOL(drm_framebuffer_cleanup);
/**
@@ -67,7 +66,7 @@ index ba728ad..4b7e748 100644
mutex_unlock(&dev->mode_config.mutex);
}
EXPORT_SYMBOL(drm_crtc_init);
-@@ -369,6 +401,9 @@ void drm_crtc_cleanup(struct drm_crtc *crtc)
+@@ -369,6 +401,9 @@ void drm_crtc_cleanup(struct drm_crtc *c
{
struct drm_device *dev = crtc->dev;
@@ -77,7 +76,7 @@ index ba728ad..4b7e748 100644
if (crtc->gamma_store) {
kfree(crtc->gamma_store);
crtc->gamma_store = NULL;
-@@ -376,6 +411,7 @@ void drm_crtc_cleanup(struct drm_crtc *crtc)
+@@ -376,6 +411,7 @@ void drm_crtc_cleanup(struct drm_crtc *c
drm_mode_object_put(dev, &crtc->base);
list_del(&crtc->head);
@@ -220,11 +219,10 @@ index ba728ad..4b7e748 100644
+
+ return ret;
+}
-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)
+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
old_fb = set->crtc->fb;
if (set->crtc->fb != set->fb)
set->crtc->fb = set->fb;
@@ -235,7 +233,7 @@ index ff447f1..fec66f9 100644
if (ret != 0)
goto fail;
}
-@@ -1095,3 +1097,13 @@ int drm_helper_resume_force_mode(struct drm_device *dev)
+@@ -1095,3 +1097,13 @@ int drm_helper_resume_force_mode(struct
return 0;
}
EXPORT_SYMBOL(drm_helper_resume_force_mode);
@@ -249,11 +247,10 @@ index ff447f1..fec66f9 100644
+ return crtc_funcs->mode_set_base(crtc, x, y, old_fb);
+}
+EXPORT_SYMBOL(drm_crtc_helper_set_base);
-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[] = {
+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[
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),
@@ -261,11 +258,10 @@ index a75ca63..672f473 100644
};
#define DRM_CORE_IOCTL_COUNT ARRAY_SIZE( drm_ioctls )
-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,
+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
INIT_LIST_HEAD(&priv->lhead);
INIT_LIST_HEAD(&priv->fbs);
@@ -274,7 +270,7 @@ index 251bc0e..dcd9c66 100644
if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_open(dev, priv);
-@@ -429,6 +431,9 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -429,6 +431,9 @@ int drm_release(struct inode *inode, str
{
struct drm_file *file_priv = filp->private_data;
struct drm_device *dev = file_priv->minor->dev;
@@ -284,7 +280,7 @@ index 251bc0e..dcd9c66 100644
int retcode = 0;
lock_kernel();
-@@ -451,6 +456,19 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -451,6 +456,19 @@ int drm_release(struct inode *inode, str
if (file_priv->minor->master)
drm_master_release(dev, filp);
@@ -304,7 +300,7 @@ index 251bc0e..dcd9c66 100644
if (dev->driver->driver_features & DRIVER_GEM)
drm_gem_release(dev, file_priv);
-@@ -544,9 +562,55 @@ int drm_release(struct inode *inode, struct file *filp)
+@@ -544,9 +562,55 @@ int drm_release(struct inode *inode, str
}
EXPORT_SYMBOL(drm_release);
@@ -362,10 +358,9 @@ index 251bc0e..dcd9c66 100644
+ return mask;
}
EXPORT_SYMBOL(drm_poll);
-diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
-index f85aaf2..2fe0be4 100644
---- a/drivers/gpu/drm/drm_irq.c
-+++ b/drivers/gpu/drm/drm_irq.c
+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
@@ -34,6 +34,7 @@
*/
@@ -374,7 +369,7 @@ index f85aaf2..2fe0be4 100644
#include <linux/interrupt.h> /* For task queue support */
-@@ -71,6 +72,44 @@ int drm_irq_by_busid(struct drm_device *dev, void *data,
+@@ -71,6 +72,44 @@ int drm_irq_by_busid(struct drm_device *
return 0;
}
@@ -419,7 +414,7 @@ index f85aaf2..2fe0be4 100644
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 *dev, int num_crtcs)
+@@ -161,6 +200,8 @@ int drm_vblank_init(struct drm_device *d
atomic_set(&dev->vblank_refcount[i], 0);
}
@@ -428,7 +423,7 @@ index f85aaf2..2fe0be4 100644
dev->vblank_disable_allowed = 0;
return 0;
-@@ -626,5 +667,7 @@ void drm_handle_vblank(struct drm_device *dev, int crtc)
+@@ -626,5 +667,7 @@ void drm_handle_vblank(struct drm_device
{
atomic_inc(&dev->_vblank_count[crtc]);
DRM_WAKEUP(&dev->vbl_queue[crtc]);
@@ -436,10 +431,9 @@ index f85aaf2..2fe0be4 100644
}
EXPORT_SYMBOL(drm_handle_vblank);
+
-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
+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
@@ -206,6 +206,7 @@ static struct drm_driver driver = {
.mmap = drm_gem_mmap,
.poll = drm_poll,
@@ -448,11 +442,10 @@ index dbe568c..b81305e 100644
#ifdef CONFIG_COMPAT
.compat_ioctl = i915_compat_ioctl,
#endif
-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,
+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
u32 dspcntr, alignment;
int ret;
@@ -461,7 +454,7 @@ index 155719f..0d6e677 100644
/* no fb bound */
if (!crtc->fb) {
DRM_DEBUG("No FB bound\n");
-@@ -1008,17 +1010,14 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+@@ -1008,17 +1010,14 @@ intel_pipe_set_base(struct drm_crtc *crt
BUG();
}
@@ -479,7 +472,7 @@ index 155719f..0d6e677 100644
return ret;
}
-@@ -1029,7 +1028,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+@@ -1029,7 +1028,6 @@ intel_pipe_set_base(struct drm_crtc *crt
ret = i915_gem_object_get_fence_reg(obj);
if (ret != 0) {
i915_gem_object_unpin(obj);
@@ -487,7 +480,7 @@ index 155719f..0d6e677 100644
return ret;
}
}
-@@ -1054,7 +1052,6 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+@@ -1054,7 +1052,6 @@ intel_pipe_set_base(struct drm_crtc *crt
default:
DRM_ERROR("Unknown color depth\n");
i915_gem_object_unpin(obj);
@@ -495,7 +488,7 @@ index 155719f..0d6e677 100644
return -EINVAL;
}
if (IS_I965G(dev)) {
-@@ -1086,17 +1083,14 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
+@@ -1086,17 +1083,14 @@ intel_pipe_set_base(struct drm_crtc *crt
I915_READ(dspbase);
}
@@ -514,7 +507,7 @@ index 155719f..0d6e677 100644
if (!dev->primary->master)
return 0;
-@@ -2732,7 +2726,9 @@ static int intel_crtc_mode_set(struct drm_crtc *crtc,
+@@ -2732,7 +2726,9 @@ static int intel_crtc_mode_set(struct dr
I915_WRITE(dspcntr_reg, dspcntr);
/* Flush the plane changes */
@@ -524,7 +517,7 @@ index 155719f..0d6e677 100644
intel_update_watermarks(dev);
-@@ -3521,6 +3517,7 @@ static const struct drm_crtc_funcs intel_crtc_funcs = {
+@@ -3521,6 +3517,7 @@ static const struct drm_crtc_funcs intel
.gamma_set = intel_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config,
.destroy = intel_crtc_destroy,
@@ -532,7 +525,7 @@ index 155719f..0d6e677 100644
};
-@@ -3533,7 +3530,7 @@ static void intel_crtc_init(struct drm_device *dev, int pipe)
+@@ -3533,7 +3530,7 @@ static void intel_crtc_init(struct drm_d
if (intel_crtc == NULL)
return;
@@ -541,7 +534,7 @@ index 155719f..0d6e677 100644
drm_mode_crtc_set_gamma_size(&intel_crtc->base, 256);
intel_crtc->pipe = pipe;
-@@ -3717,9 +3714,18 @@ static int intel_user_framebuffer_create_handle(struct drm_framebuffer *fb,
+@@ -3717,9 +3714,18 @@ static int intel_user_framebuffer_create
return drm_gem_handle_create(file_priv, object, handle);
}
@@ -560,11 +553,34 @@ index 155719f..0d6e677 100644
};
int intel_framebuffer_create(struct drm_device *dev,
-diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
-index 9d817a6..6f2dabf 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 = {
+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
.gamma_set = radeon_crtc_gamma_set,
.set_config = drm_crtc_helper_set_config,
.destroy = radeon_crtc_destroy,
@@ -572,7 +588,7 @@ index 9d817a6..6f2dabf 100644
};
static void radeon_crtc_init(struct drm_device *dev, int index)
-@@ -180,7 +181,7 @@ static void radeon_crtc_init(struct drm_device *dev, int index)
+@@ -180,7 +181,7 @@ static void radeon_crtc_init(struct drm_
if (radeon_crtc == NULL)
return;
@@ -581,131 +597,9 @@ index 9d817a6..6f2dabf 100644
drm_mode_crtc_set_gamma_size(&radeon_crtc->base, 256);
radeon_crtc->crtc_id = index;
-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
+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
@@ -238,6 +238,12 @@ struct drm_display_info {
};
@@ -784,7 +678,7 @@ index ae1e9e1..525f770 100644
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(struct drm_device *dev,
+@@ -744,6 +769,8 @@ extern int drm_mode_gamma_get_ioctl(stru
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);
@@ -793,11 +687,10 @@ index ae1e9e1..525f770 100644
extern struct drm_display_mode *drm_cvt_mode(struct drm_device *dev,
int hdisplay, int vdisplay, int vrefresh,
bool reduced, bool interlaced);
-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,
+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_
}
extern int drm_helper_resume_force_mode(struct drm_device *dev);
@@ -806,10 +699,51 @@ index 4c8daca..b5bd0b8 100644
+ struct drm_framebuffer *old_fb);
+
#endif
-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
+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
@@ -268,4 +268,20 @@ struct drm_mode_crtc_lut {
__u64 blue;
};
@@ -831,27 +765,80 @@ index 1f90841..6f08a77 100644
+};
+
#endif
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv04_crtc.c 2009-08-25 09:52:41.000000000 +1000
-@@ -1122,7 +1122,7 @@ nv04_crtc_create(struct drm_device *dev,
- nv_crtc->mode_set.connectors = (struct drm_connector **)(nv_crtc + 1);
- nv_crtc->mode_set.num_connectors = 0;
+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;
+ };
-- 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);
++/* 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;
+ };
-diff -up linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.pf linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c
---- linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c.pf 2009-08-25 09:52:20.000000000 +1000
-+++ linux-2.6.30.noarch/drivers/gpu/drm/nouveau/nv50_crtc.c 2009-08-25 09:52:41.000000000 +1000
-@@ -810,7 +810,7 @@ nv50_crtc_create(struct drm_device *dev,
- crtc->mode_set.connectors = (struct drm_connector **)(crtc + 1);
- crtc->mode_set.num_connectors = 0;
+ /** Wait queue */
+@@ -897,6 +908,16 @@ struct drm_minor {
+ struct drm_mode_group mode_group;
+ };
-- 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);
++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.1772
retrieving revision 1.1773
diff -u -p -r1.1772 -r1.1773
--- kernel.spec 8 Sep 2009 04:57:22 -0000 1.1772
+++ kernel.spec 8 Sep 2009 06:09:56 -0000 1.1773
@@ -2020,6 +2020,9 @@ fi
# and build.
%changelog
+* Tue Sep 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.210.rc9.git1
+- drm-page-flip.patch: rebase again
+
* Tue Sep 08 2009 Dave Airlie <airlied at redhat.com> 2.6.31-0.209.rc9.git1
- drm-next.patch: fix r600 signal interruption return value
- Previous message (by thread): rpms/xscreensaver/devel .cvsignore, 1.12, 1.13 sources, 1.12, 1.13 xscreensaver.spec, 1.97, 1.98
- Next message (by thread): rpms/xscreensaver/F-10 .cvsignore, 1.12, 1.13 sources, 1.12, 1.13 xscreensaver.spec, 1.82, 1.83 xscreensaver-5.08-hacks-window-too-small.patch, 1.1, NONE xscreensaver-5.09-hacks-missing-header-creation.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list