summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2009-02-09 06:14:51 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2009-02-09 06:14:51 +0000
commitf474dca557e0be2c18280356f2f8403628838e11 (patch)
tree22ad56844f26e310d1d9625ece0ae2106b78098b /sys/dev
parent7729d2d20c432cc6874364635b2448dadadcbffd (diff)
Remove the inteldrm pageflipping code.
Deprecated and broken. Sanity checked by a few people, no problems caused.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/i915_dma.c82
-rw-r--r--sys/dev/pci/drm/i915_drv.c8
-rw-r--r--sys/dev/pci/drm/i915_drv.h10
3 files changed, 0 insertions, 100 deletions
diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c
index e3cd3022165..74c436016c0 100644
--- a/sys/dev/pci/drm/i915_dma.c
+++ b/sys/dev/pci/drm/i915_dma.c
@@ -189,13 +189,6 @@ static int i915_initialize(struct drm_device * dev, drm_i915_init_t * init)
dev_priv->ring.virtual_start = dev_priv->ring.map.handle;
- dev_priv->cpp = init->cpp;
- dev_priv->back_offset = init->back_offset;
- dev_priv->front_offset = init->front_offset;
- dev_priv->current_page = 0;
- if (dev_priv->sarea_priv)
- dev_priv->sarea_priv->pf_current_page = 0;
-
/* Allow hardware batchbuffers unless told otherwise.
*/
dev_priv->allow_batchbuffer = 1;
@@ -440,28 +433,6 @@ void i915_emit_breadcrumb(struct drm_device *dev)
ADVANCE_LP_RING();
}
-
-int i915_emit_mi_flush(struct drm_device *dev, uint32_t flush)
-{
- drm_i915_private_t *dev_priv = dev->dev_private;
- uint32_t flush_cmd = MI_FLUSH;
- RING_LOCALS;
-
- flush_cmd |= flush;
-
- i915_kernel_lost_context(dev);
-
- BEGIN_LP_RING(4);
- OUT_RING(flush_cmd);
- OUT_RING(0);
- OUT_RING(0);
- OUT_RING(0);
- ADVANCE_LP_RING();
-
- return 0;
-}
-
-
static int i915_dispatch_cmdbuffer(struct drm_device * dev,
drm_i915_cmdbuffer_t * cmd)
{
@@ -545,43 +516,6 @@ int i915_dispatch_batchbuffer(struct drm_device * dev,
return 0;
}
-int i915_dispatch_flip(struct drm_device * dev)
-{
- drm_i915_private_t *dev_priv = dev->dev_private;
- RING_LOCALS;
-
- if (dev_priv->sarea_priv == NULL)
- return EINVAL;
-
- DRM_DEBUG("page=%d pfCurrentPage=%d\n", dev_priv->current_page,
- dev_priv->sarea_priv->pf_current_page);
-
- i915_emit_mi_flush(dev, MI_READ_FLUSH | MI_EXE_FLUSH);
-
- BEGIN_LP_RING(6);
- OUT_RING(CMD_OP_DISPLAYBUFFER_INFO | ASYNC_FLIP);
- OUT_RING(0);
- if (dev_priv->current_page == 0) {
- OUT_RING(dev_priv->back_offset);
- dev_priv->current_page = 1;
- } else {
- OUT_RING(dev_priv->front_offset);
- dev_priv->current_page = 0;
- }
- OUT_RING(0);
- ADVANCE_LP_RING();
-
- BEGIN_LP_RING(2);
- OUT_RING(MI_WAIT_FOR_EVENT | MI_WAIT_FOR_PLANE_A_FLIP);
- OUT_RING(0);
- ADVANCE_LP_RING();
-
- i915_emit_breadcrumb(dev);
-
- dev_priv->sarea_priv->pf_current_page = dev_priv->current_page;
- return (0);
-}
-
int i915_quiescent(struct drm_device *dev)
{
drm_i915_private_t *dev_priv = dev->dev_private;
@@ -673,22 +607,6 @@ int i915_cmdbuffer(struct drm_device *dev, void *data,
return 0;
}
-int i915_flip_bufs(struct drm_device *dev, void *data, struct drm_file *file_priv)
-{
- int ret;
-
- DRM_DEBUG("\n");
-
- LOCK_TEST_WITH_RETURN(dev, file_priv);
-
- DRM_LOCK();
- ret = i915_dispatch_flip(dev);
- DRM_UNLOCK();
-
- return (ret);
-}
-
-
int i915_getparam(struct drm_device *dev, void *data,
struct drm_file *file_priv)
{
diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c
index a711a999857..3a63b4d29e9 100644
--- a/sys/dev/pci/drm/i915_drv.c
+++ b/sys/dev/pci/drm/i915_drv.c
@@ -207,8 +207,6 @@ inteldrm_ioctl(struct drm_device *dev, u_long cmd, caddr_t data,
switch (cmd) {
case DRM_IOCTL_I915_FLUSH:
return (i915_flush_ioctl(dev, data, file_priv));
- case DRM_IOCTL_I915_FLIP:
- return (i915_flip_bufs(dev, data, file_priv));
case DRM_IOCTL_I915_BATCHBUFFER:
return (i915_batchbuffer(dev, data, file_priv));
case DRM_IOCTL_I915_IRQ_EMIT:
@@ -225,12 +223,6 @@ inteldrm_ioctl(struct drm_device *dev, u_long cmd, caddr_t data,
return (i915_cmdbuffer(dev, data, file_priv));
case DRM_IOCTL_I915_GET_VBLANK_PIPE:
return (i915_vblank_pipe_get(dev, data, file_priv));
- case DRM_IOCTL_I915_VBLANK_SWAP:
- /*
- * 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 469457256c4..54154de5aa6 100644
--- a/sys/dev/pci/drm/i915_drv.h
+++ b/sys/dev/pci/drm/i915_drv.h
@@ -92,12 +92,6 @@ typedef struct drm_i915_private {
unsigned int status_gfx_addr;
drm_local_map_t hws_map;
- unsigned int cpp;
- int back_offset;
- int front_offset;
- int current_page;
- int page_flipping;
-
atomic_t irq_received;
/* Protects user_irq_refcount and irq_mask reg */
DRM_SPINTYPE user_irq_lock;
@@ -110,7 +104,6 @@ typedef struct drm_i915_private {
int tex_lru_log_granularity;
int allow_batchbuffer;
struct drm_heap agp_heap;
- unsigned int sr01, adpa, ppcr, dvob, dvoc, lvds;
/* Register state */
u8 saveLBB;
@@ -229,8 +222,6 @@ extern int i915_driver_device_is_agp(struct drm_device * dev);
extern long i915_compat_ioctl(struct file *filp, unsigned int cmd,
unsigned long arg);
extern void i915_emit_breadcrumb(struct drm_device *dev);
-extern int i915_dispatch_flip(struct drm_device *);
-extern int i915_emit_mi_flush(struct drm_device *dev, uint32_t flush);
extern int i915_driver_firstopen(struct drm_device *dev);
extern int i915_dispatch_batchbuffer(struct drm_device * dev,
drm_i915_batchbuffer_t * batch);
@@ -279,7 +270,6 @@ extern int i915_restore_state(struct drm_device *dev);
extern int i915_dma_init(struct drm_device *, void *, struct drm_file *);
extern int i915_flush_ioctl(struct drm_device *, void *, struct drm_file *);
extern int i915_batchbuffer(struct drm_device *, void *, struct drm_file *);
-extern int i915_flip_bufs(struct drm_device *, void *, struct drm_file *);
extern int i915_getparam(struct drm_device *, void *, struct drm_file *);
extern int i915_setparam(struct drm_device *, void *, struct drm_file *);
extern int i915_cmdbuffer(struct drm_device *, void *, struct drm_file *);