diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-06 20:56:26 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-06 20:56:26 +0000 |
commit | 9d40610744f18bfa09e38c60503022ca7ebfb673 (patch) | |
tree | 9ba5404d2e3f97185b3d245fb517ef58bf8411cf /sys/dev/pci | |
parent | 46990b14d260e53f3cc5476531b07d43c6381cf9 (diff) |
Turns out that the intel version of the heap interface isn't used
anywhere. And hasn't been for a long time.
The ddx sets up the heap (so just always pass that call and do nothing),
but nothing that touches inteldrm actually uses the other ioctls. So
just kill them and have one lese thing to worry about. Still got sis and
radeon using the common code though.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/drm/files.drm | 5 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_dma.c | 10 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.c | 16 | ||||
-rw-r--r-- | sys/dev/pci/drm/i915_drv.h | 4 |
4 files changed, 9 insertions, 26 deletions
diff --git a/sys/dev/pci/drm/files.drm b/sys/dev/pci/drm/files.drm index e194cd27f78..38dc1a9ef21 100644 --- a/sys/dev/pci/drm/files.drm +++ b/sys/dev/pci/drm/files.drm @@ -1,5 +1,5 @@ # $NetBSD: files.drm,v 1.2 2007/03/28 11:29:37 jmcneill Exp $ -# $OpenBSD: files.drm,v 1.16 2009/04/06 04:58:09 oga Exp $ +# $OpenBSD: files.drm,v 1.17 2009/04/06 20:56:25 oga Exp $ # direct rendering modules define drmbase {} @@ -9,7 +9,7 @@ file dev/pci/drm/drm_agpsupport.c drm file dev/pci/drm/drm_bufs.c drm file dev/pci/drm/drm_context.c drm file dev/pci/drm/drm_drv.c drm needs-flag -file dev/pci/drm/drm_heap.c inteldrm | radeondrm | sisdrm +file dev/pci/drm/drm_heap.c radeondrm | sisdrm file dev/pci/drm/drm_irq.c drm file dev/pci/drm/drm_lock.c drm file dev/pci/drm/drm_memory.c drm @@ -20,7 +20,6 @@ attach inteldrm at drmdev file dev/pci/drm/i915_drv.c inteldrm file dev/pci/drm/i915_dma.c inteldrm file dev/pci/drm/i915_irq.c inteldrm -file dev/pci/drm/i915_mem.c inteldrm device machdrm: drmbase attach machdrm at drmdev diff --git a/sys/dev/pci/drm/i915_dma.c b/sys/dev/pci/drm/i915_dma.c index 0133277d755..bf6694256f0 100644 --- a/sys/dev/pci/drm/i915_dma.c +++ b/sys/dev/pci/drm/i915_dma.c @@ -573,7 +573,7 @@ int i915_setparam(struct drm_device *dev, void *data, case I915_SETPARAM_USE_MI_BATCHBUFFER_START: break; case I915_SETPARAM_TEX_LRU_LOG_GRANULARITY: - dev_priv->tex_lru_log_granularity = param->value; + /* We really don't care anymore */ break; case I915_SETPARAM_ALLOW_BATCHBUFFER: dev_priv->allow_batchbuffer = param->value; @@ -640,13 +640,5 @@ void i915_driver_lastclose(struct drm_device * dev) dev_priv->sarea_priv = NULL; - i915_mem_takedown(&dev_priv->agp_heap); - i915_dma_cleanup(dev); } - -void i915_driver_close(struct drm_device * dev, struct drm_file *file_priv) -{ - drm_i915_private_t *dev_priv = dev->dev_private; - i915_mem_release(dev, file_priv, &dev_priv->agp_heap); -} diff --git a/sys/dev/pci/drm/i915_drv.c b/sys/dev/pci/drm/i915_drv.c index a6bf6537e1d..e43ee8d5380 100644 --- a/sys/dev/pci/drm/i915_drv.c +++ b/sys/dev/pci/drm/i915_drv.c @@ -93,7 +93,6 @@ const static struct drm_pcidev inteldrm_pciidlist[] = { static const struct drm_driver_info inteldrm_driver = { .buf_priv_size = 1, /* No dev_priv */ .ioctl = inteldrm_ioctl, - .close = i915_driver_close, .lastclose = i915_driver_lastclose, .vblank_pipes = 2, .get_vblank_counter = i915_get_vblank_counter, @@ -116,7 +115,8 @@ static const struct drm_driver_info inteldrm_driver = { int inteldrm_probe(struct device *parent, void *match, void *aux) { - return drm_pciprobe((struct pci_attach_args *)aux, inteldrm_pciidlist); + return (drm_pciprobe((struct pci_attach_args *)aux, + inteldrm_pciidlist)); } void @@ -167,7 +167,6 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux) printf(": %s\n", pci_intr_string(pa->pa_pc, dev_priv->ih)); mtx_init(&dev_priv->user_irq_lock, IPL_BIO); - TAILQ_INIT(&dev_priv->agp_heap); /* All intel chipsets need to be treated as agp, so just pass one */ dev_priv->drmdev = drm_attach_pci(&inteldrm_driver, pa, 1, self); @@ -216,10 +215,6 @@ inteldrm_ioctl(struct drm_device *dev, u_long cmd, caddr_t data, return (i915_irq_wait(dev, data, file_priv)); case DRM_IOCTL_I915_GETPARAM: return (i915_getparam(dev, data, file_priv)); - case DRM_IOCTL_I915_ALLOC: - return (i915_mem_alloc(dev, data, file_priv)); - case DRM_IOCTL_I915_FREE: - return (i915_mem_free(dev, data, file_priv)); case DRM_IOCTL_I915_CMDBUFFER: return (i915_cmdbuffer(dev, data, file_priv)); case DRM_IOCTL_I915_GET_VBLANK_PIPE: @@ -233,12 +228,11 @@ inteldrm_ioctl(struct drm_device *dev, u_long cmd, caddr_t data, return (i915_setparam(dev, data, file_priv)); case DRM_IOCTL_I915_INIT: return (i915_dma_init(dev, data, file_priv)); - case DRM_IOCTL_I915_INIT_HEAP: - return (i915_mem_init_heap(dev, data, file_priv)); - case DRM_IOCTL_I915_DESTROY_HEAP: - return (i915_mem_destroy_heap(dev, data, file_priv)); case DRM_IOCTL_I915_HWS_ADDR: return (i915_set_status_page(dev, data, file_priv)); + /* Removed, but still used by userland, so just say `fine' */ + case DRM_IOCTL_I915_INIT_HEAP: + case DRM_IOCTL_I915_DESTROY_HEAP: case DRM_IOCTL_I915_SET_VBLANK_PIPE: return (0); } diff --git a/sys/dev/pci/drm/i915_drv.h b/sys/dev/pci/drm/i915_drv.h index 2a7dfd13d04..e3647d6c87a 100644 --- a/sys/dev/pci/drm/i915_drv.h +++ b/sys/dev/pci/drm/i915_drv.h @@ -103,9 +103,7 @@ typedef struct drm_i915_private { u_int32_t irq_mask_reg; u_int32_t pipestat[2]; - int tex_lru_log_granularity; - int allow_batchbuffer; - struct drm_heap agp_heap; + int allow_batchbuffer; /* Register state */ u8 saveLBB; |