diff options
author | 2008-11-17 00:58:30 +0000 | |
---|---|---|
committer | 2008-11-17 00:58:30 +0000 | |
commit | f3d2ef5c4b2ae7e916b6d72d650c5bb92e94f165 (patch) | |
tree | 7f7463a0a71ad982746f46614c92f36f5e6253fb | |
parent | Manage vblank interrupts using the PIPESTAT register. (diff) | |
download | wireguard-openbsd-f3d2ef5c4b2ae7e916b6d72d650c5bb92e94f165.tar.xz wireguard-openbsd-f3d2ef5c4b2ae7e916b6d72d650c5bb92e94f165.zip |
garbage collect i915_vblank_swap.
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.h | 2 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_irq.c | 23 |
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) |