aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-11-04 15:01:24 -0500
committerDave Airlie <airlied@linux.ie>2008-11-11 02:44:22 -0500
commitbd95e0a4a6bb9485fe35dda62719663f6ceabae1 (patch)
tree72e0665fb8585f3f2b68a7c1fbc10baf5bbbb5c3 /drivers/gpu/drm/i915/i915_drv.h
parentd3e74d0237b102d34979015fbf6df02ca4413074 (diff)
i915: Remove racy delayed vblank swap ioctl.
When userland detected that this ioctl was supported (by version number check), it used it in a racy way -- dispatch delayed swap, wait for vblank, continue rendering. As there was no mechanism for it to wait for the swap to finish, sometimes it would render before the swap and garbage would be displayed on the screen. By removing the ioctl and returning -EINVAL, userland returns to its previous, correct rendering path of waiting for a vblank then dispatching a swap. The only path that could have used this ioctl correctly was page flipping, which relied on only one client running and emitting wait-for-vblank-before-rendering in the command stream. That path also falls back correctly, at the performance cost of not being able to queue up rendering before the flip occurs. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index be56b0ba88c4..4afbadb13316 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -88,13 +88,6 @@ struct mem_block {
88 struct drm_file *file_priv; /* NULL: free, -1: heap, other: real files */ 88 struct drm_file *file_priv; /* NULL: free, -1: heap, other: real files */
89}; 89};
90 90
91typedef struct _drm_i915_vbl_swap {
92 struct list_head head;
93 drm_drawable_t drw_id;
94 unsigned int pipe;
95 unsigned int sequence;
96} drm_i915_vbl_swap_t;
97
98struct opregion_header; 91struct opregion_header;
99struct opregion_acpi; 92struct opregion_acpi;
100struct opregion_swsci; 93struct opregion_swsci;
@@ -146,10 +139,6 @@ typedef struct drm_i915_private {
146 unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds; 139 unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds;
147 int vblank_pipe; 140 int vblank_pipe;
148 141
149 spinlock_t swaps_lock;
150 drm_i915_vbl_swap_t vbl_swaps;
151 unsigned int swaps_pending;
152
153 struct intel_opregion opregion; 142 struct intel_opregion opregion;
154 143
155 /* Register state */ 144 /* Register state */
@@ -242,9 +231,6 @@ typedef struct drm_i915_private {
242 u8 saveDACDATA[256*3]; /* 256 3-byte colors */ 231 u8 saveDACDATA[256*3]; /* 256 3-byte colors */
243 u8 saveCR[37]; 232 u8 saveCR[37];
244 233
245 /** Work task for vblank-related ring access */
246 struct work_struct vblank_work;
247
248 struct { 234 struct {
249 struct drm_mm gtt_space; 235 struct drm_mm gtt_space;
250 236
@@ -445,7 +431,6 @@ extern int i915_irq_wait(struct drm_device *dev, void *data,
445void i915_user_irq_get(struct drm_device *dev); 431void i915_user_irq_get(struct drm_device *dev);
446void i915_user_irq_put(struct drm_device *dev); 432void i915_user_irq_put(struct drm_device *dev);
447 433
448extern void i915_vblank_work_handler(struct work_struct *work);
449extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS); 434extern irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS);
450extern void i915_driver_irq_preinstall(struct drm_device * dev); 435extern void i915_driver_irq_preinstall(struct drm_device * dev);
451extern int i915_driver_irq_postinstall(struct drm_device *dev); 436extern int i915_driver_irq_postinstall(struct drm_device *dev);