summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-11-17 00:58:31 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-11-17 00:58:31 +0000
commita8837e2e92ee0b42eb0e4d94177a7d1e54f6dc32 (patch)
tree94899657ad05f745c353168a2b0d4a70e72840a2 /sys
parent910685533a1d55e2a187592f58e84ef752a9c90e (diff)
garbage collect i915_vblank_swap.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/i915_drv.c6
-rw-r--r--sys/dev/pci/drm/i915_drv.h2
-rw-r--r--sys/dev/pci/drm/i915_irq.c23
3 files changed, 5 insertions, 26 deletions
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index 0e6d416519a..fba0392c0b3 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -123,7 +123,11 @@ inteldrm_ioctl(struct drm_device *dev, u_long cmd, caddr_t data,
case DRM_IOCTL_I915_GET_VBLANK_PIPE:
return (i915_vblank_pipe_get(dev, data, file_priv));
case DRM_IOCTL_I915_VBLANK_SWAP:
- return (i915_vblank_swap(dev, data, file_priv));
+ /*
+ * removed due to being racy. Userland falls back
+ * correctly when it errors out
+ */
+ return (EINVAL);
}
}
diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h
index 99616d9d682..f3d97659c33 100644
--- a/sys/dev/pci/drm/i915_drv.h
+++ b/sys/dev/pci/drm/i915_drv.h
@@ -242,8 +242,6 @@ extern int i915_emit_irq(struct drm_device * dev);
extern int i915_enable_vblank(struct drm_device *dev, int crtc);
extern void i915_disable_vblank(struct drm_device *dev, int crtc);
extern u32 i915_get_vblank_counter(struct drm_device *dev, int crtc);
-extern int i915_vblank_swap(struct drm_device *dev, void *data,
- struct drm_file *file_priv);
extern void i915_user_irq_get(struct drm_device *dev);
extern void i915_user_irq_put(struct drm_device *dev);
diff --git a/sys/dev/pci/drm/i915_irq.c b/sys/dev/pci/drm/i915_irq.c
index 379f8e1e9b3..e1f4d5119c9 100644
--- a/sys/dev/pci/drm/i915_irq.c
+++ b/sys/dev/pci/drm/i915_irq.c
@@ -398,29 +398,6 @@ int i915_vblank_pipe_get(struct drm_device *dev, void *data,
return 0;
}
-/*
- * Schedule buffer swap at given vertical blank.
- */
-int i915_vblank_swap(struct drm_device *dev, void *data,
- struct drm_file *file_priv)
-{
- /* The delayed swap mechanism was fundamentally racy, and has been
- * removed. The model was that the client requested a delayed flip/swap
- * from the kernel, then waited for vblank before continuing to perform
- * rendering. The problem was that the kernel might wake the client
- * up before it dispatched the vblank swap (since the lock has to be
- * held while touching the ringbuffer), in which case the client would
- * clear and start the next frame before the swap occurred, and
- * flicker would occur in addition to likely missing the vblank.
- *
- * In the absence of this ioctl, userland falls back to a correct path
- * of waiting for a vblank, then dispatching the swap on its own.
- * Context switching to userland and back is plenty fast enough for
- * meeting the requirements of vblank swapping.
- */
- return (EINVAL);
-}
-
/* drm_dma.h hooks
*/
void i915_driver_irq_preinstall(struct drm_device * dev)