aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2010-08-23 16:53:28 -0400
committerDave Airlie <airlied@redhat.com>2010-08-29 19:44:56 -0400
commitcbc60ca04b342a4e1f2a1086a7277c077f07dbed (patch)
tree3979a1304b20cc90a7ec1dce593657435aa48c8d
parentdf8fcb09667c1b2c9dcf65de23f0bfa851e8138e (diff)
drm: kill get_reg_ofs callback
Every driver used the default implementation. Fold that one into the only callsite and drop the callback. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_vm.c6
-rw-r--r--drivers/gpu/drm/i810/i810_drv.c1
-rw-r--r--drivers/gpu/drm/i830/i830_drv.c1
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c1
-rw-r--r--drivers/gpu/drm/mga/mga_drv.c1
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_drv.c1
-rw-r--r--drivers/gpu/drm/r128/r128_drv.c1
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c2
-rw-r--r--drivers/gpu/drm/savage/savage_drv.c1
-rw-r--r--drivers/gpu/drm/sis/sis_drv.c1
-rw-r--r--drivers/gpu/drm/tdfx/tdfx_drv.c1
-rw-r--r--drivers/gpu/drm/via/via_drv.c1
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_drv.c1
-rw-r--r--include/drm/drmP.h2
14 files changed, 2 insertions, 19 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 2fea2e63a313..ee879d6bb522 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -515,7 +515,7 @@ static int drm_mmap_dma(struct file *filp, struct vm_area_struct *vma)
515 return 0; 515 return 0;
516} 516}
517 517
518resource_size_t drm_core_get_reg_ofs(struct drm_device *dev) 518static resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)
519{ 519{
520#ifdef __alpha__ 520#ifdef __alpha__
521 return dev->hose->dense_mem_base - dev->hose->mem_space->start; 521 return dev->hose->dense_mem_base - dev->hose->mem_space->start;
@@ -524,8 +524,6 @@ resource_size_t drm_core_get_reg_ofs(struct drm_device *dev)
524#endif 524#endif
525} 525}
526 526
527EXPORT_SYMBOL(drm_core_get_reg_ofs);
528
529/** 527/**
530 * mmap DMA memory. 528 * mmap DMA memory.
531 * 529 *
@@ -612,7 +610,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
612#endif 610#endif
613 case _DRM_FRAME_BUFFER: 611 case _DRM_FRAME_BUFFER:
614 case _DRM_REGISTERS: 612 case _DRM_REGISTERS:
615 offset = dev->driver->get_reg_ofs(dev); 613 offset = drm_core_get_reg_ofs(dev);
616 vma->vm_flags |= VM_IO; /* not in core dump */ 614 vma->vm_flags |= VM_IO; /* not in core dump */
617 vma->vm_page_prot = drm_io_prot(map->type, vma); 615 vma->vm_page_prot = drm_io_prot(map->type, vma);
618#if !defined(__arm__) 616#if !defined(__arm__)
diff --git a/drivers/gpu/drm/i810/i810_drv.c b/drivers/gpu/drm/i810/i810_drv.c
index 084a85c3d5d5..1c73b0c43c1e 100644
--- a/drivers/gpu/drm/i810/i810_drv.c
+++ b/drivers/gpu/drm/i810/i810_drv.c
@@ -52,7 +52,6 @@ static struct drm_driver driver = {
52 .device_is_agp = i810_driver_device_is_agp, 52 .device_is_agp = i810_driver_device_is_agp,
53 .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked, 53 .reclaim_buffers_locked = i810_driver_reclaim_buffers_locked,
54 .dma_quiescent = i810_driver_dma_quiescent, 54 .dma_quiescent = i810_driver_dma_quiescent,
55 .get_reg_ofs = drm_core_get_reg_ofs,
56 .ioctls = i810_ioctls, 55 .ioctls = i810_ioctls,
57 .fops = { 56 .fops = {
58 .owner = THIS_MODULE, 57 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/i830/i830_drv.c b/drivers/gpu/drm/i830/i830_drv.c
index 16352954311c..7140ffc12eee 100644
--- a/drivers/gpu/drm/i830/i830_drv.c
+++ b/drivers/gpu/drm/i830/i830_drv.c
@@ -57,7 +57,6 @@ static struct drm_driver driver = {
57 .device_is_agp = i830_driver_device_is_agp, 57 .device_is_agp = i830_driver_device_is_agp,
58 .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked, 58 .reclaim_buffers_locked = i830_driver_reclaim_buffers_locked,
59 .dma_quiescent = i830_driver_dma_quiescent, 59 .dma_quiescent = i830_driver_dma_quiescent,
60 .get_reg_ofs = drm_core_get_reg_ofs,
61#if USE_IRQS 60#if USE_IRQS
62 .irq_preinstall = i830_driver_irq_preinstall, 61 .irq_preinstall = i830_driver_irq_preinstall,
63 .irq_postinstall = i830_driver_irq_postinstall, 62 .irq_postinstall = i830_driver_irq_postinstall,
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index d079f7b86cca..e6afa68775b0 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -524,7 +524,6 @@ static struct drm_driver driver = {
524 .irq_uninstall = i915_driver_irq_uninstall, 524 .irq_uninstall = i915_driver_irq_uninstall,
525 .irq_handler = i915_driver_irq_handler, 525 .irq_handler = i915_driver_irq_handler,
526 .reclaim_buffers = drm_core_reclaim_buffers, 526 .reclaim_buffers = drm_core_reclaim_buffers,
527 .get_reg_ofs = drm_core_get_reg_ofs,
528 .master_create = i915_master_create, 527 .master_create = i915_master_create,
529 .master_destroy = i915_master_destroy, 528 .master_destroy = i915_master_destroy,
530#if defined(CONFIG_DEBUG_FS) 529#if defined(CONFIG_DEBUG_FS)
diff --git a/drivers/gpu/drm/mga/mga_drv.c b/drivers/gpu/drm/mga/mga_drv.c
index e9c0cbc21fe2..65ea42cf1795 100644
--- a/drivers/gpu/drm/mga/mga_drv.c
+++ b/drivers/gpu/drm/mga/mga_drv.c
@@ -60,7 +60,6 @@ static struct drm_driver driver = {
60 .irq_uninstall = mga_driver_irq_uninstall, 60 .irq_uninstall = mga_driver_irq_uninstall,
61 .irq_handler = mga_driver_irq_handler, 61 .irq_handler = mga_driver_irq_handler,
62 .reclaim_buffers = drm_core_reclaim_buffers, 62 .reclaim_buffers = drm_core_reclaim_buffers,
63 .get_reg_ofs = drm_core_get_reg_ofs,
64 .ioctls = mga_ioctls, 63 .ioctls = mga_ioctls,
65 .dma_ioctl = mga_dma_buffers, 64 .dma_ioctl = mga_dma_buffers,
66 .fops = { 65 .fops = {
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.c b/drivers/gpu/drm/nouveau/nouveau_drv.c
index 0d64259b21cc..209912a1b7a5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_drv.c
+++ b/drivers/gpu/drm/nouveau/nouveau_drv.c
@@ -379,7 +379,6 @@ static struct drm_driver driver = {
379 .irq_uninstall = nouveau_irq_uninstall, 379 .irq_uninstall = nouveau_irq_uninstall,
380 .irq_handler = nouveau_irq_handler, 380 .irq_handler = nouveau_irq_handler,
381 .reclaim_buffers = drm_core_reclaim_buffers, 381 .reclaim_buffers = drm_core_reclaim_buffers,
382 .get_reg_ofs = drm_core_get_reg_ofs,
383 .ioctls = nouveau_ioctls, 382 .ioctls = nouveau_ioctls,
384 .fops = { 383 .fops = {
385 .owner = THIS_MODULE, 384 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/r128/r128_drv.c b/drivers/gpu/drm/r128/r128_drv.c
index 42ec20a10eed..67309f84f16d 100644
--- a/drivers/gpu/drm/r128/r128_drv.c
+++ b/drivers/gpu/drm/r128/r128_drv.c
@@ -56,7 +56,6 @@ static struct drm_driver driver = {
56 .irq_uninstall = r128_driver_irq_uninstall, 56 .irq_uninstall = r128_driver_irq_uninstall,
57 .irq_handler = r128_driver_irq_handler, 57 .irq_handler = r128_driver_irq_handler,
58 .reclaim_buffers = drm_core_reclaim_buffers, 58 .reclaim_buffers = drm_core_reclaim_buffers,
59 .get_reg_ofs = drm_core_get_reg_ofs,
60 .ioctls = r128_ioctls, 59 .ioctls = r128_ioctls,
61 .dma_ioctl = r128_cce_buffers, 60 .dma_ioctl = r128_cce_buffers,
62 .fops = { 61 .fops = {
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 8fd89bb8e610..663cdc10a5c2 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -203,7 +203,6 @@ static struct drm_driver driver_old = {
203 .irq_uninstall = radeon_driver_irq_uninstall, 203 .irq_uninstall = radeon_driver_irq_uninstall,
204 .irq_handler = radeon_driver_irq_handler, 204 .irq_handler = radeon_driver_irq_handler,
205 .reclaim_buffers = drm_core_reclaim_buffers, 205 .reclaim_buffers = drm_core_reclaim_buffers,
206 .get_reg_ofs = drm_core_get_reg_ofs,
207 .ioctls = radeon_ioctls, 206 .ioctls = radeon_ioctls,
208 .dma_ioctl = radeon_cp_buffers, 207 .dma_ioctl = radeon_cp_buffers,
209 .fops = { 208 .fops = {
@@ -289,7 +288,6 @@ static struct drm_driver kms_driver = {
289 .irq_uninstall = radeon_driver_irq_uninstall_kms, 288 .irq_uninstall = radeon_driver_irq_uninstall_kms,
290 .irq_handler = radeon_driver_irq_handler_kms, 289 .irq_handler = radeon_driver_irq_handler_kms,
291 .reclaim_buffers = drm_core_reclaim_buffers, 290 .reclaim_buffers = drm_core_reclaim_buffers,
292 .get_reg_ofs = drm_core_get_reg_ofs,
293 .ioctls = radeon_ioctls_kms, 291 .ioctls = radeon_ioctls_kms,
294 .gem_init_object = radeon_gem_object_init, 292 .gem_init_object = radeon_gem_object_init,
295 .gem_free_object = radeon_gem_object_free, 293 .gem_free_object = radeon_gem_object_free,
diff --git a/drivers/gpu/drm/savage/savage_drv.c b/drivers/gpu/drm/savage/savage_drv.c
index f539996ba230..c0385633667d 100644
--- a/drivers/gpu/drm/savage/savage_drv.c
+++ b/drivers/gpu/drm/savage/savage_drv.c
@@ -42,7 +42,6 @@ static struct drm_driver driver = {
42 .lastclose = savage_driver_lastclose, 42 .lastclose = savage_driver_lastclose,
43 .unload = savage_driver_unload, 43 .unload = savage_driver_unload,
44 .reclaim_buffers = savage_reclaim_buffers, 44 .reclaim_buffers = savage_reclaim_buffers,
45 .get_reg_ofs = drm_core_get_reg_ofs,
46 .ioctls = savage_ioctls, 45 .ioctls = savage_ioctls,
47 .dma_ioctl = savage_bci_buffers, 46 .dma_ioctl = savage_bci_buffers,
48 .fops = { 47 .fops = {
diff --git a/drivers/gpu/drm/sis/sis_drv.c b/drivers/gpu/drm/sis/sis_drv.c
index 72b0a74f265f..4d9f311d249d 100644
--- a/drivers/gpu/drm/sis/sis_drv.c
+++ b/drivers/gpu/drm/sis/sis_drv.c
@@ -71,7 +71,6 @@ static struct drm_driver driver = {
71 .reclaim_buffers = NULL, 71 .reclaim_buffers = NULL,
72 .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked, 72 .reclaim_buffers_idlelocked = sis_reclaim_buffers_locked,
73 .lastclose = sis_lastclose, 73 .lastclose = sis_lastclose,
74 .get_reg_ofs = drm_core_get_reg_ofs,
75 .ioctls = sis_ioctls, 74 .ioctls = sis_ioctls,
76 .fops = { 75 .fops = {
77 .owner = THIS_MODULE, 76 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/tdfx/tdfx_drv.c b/drivers/gpu/drm/tdfx/tdfx_drv.c
index 38a562647d6f..e0768adbeccd 100644
--- a/drivers/gpu/drm/tdfx/tdfx_drv.c
+++ b/drivers/gpu/drm/tdfx/tdfx_drv.c
@@ -42,7 +42,6 @@ static struct pci_device_id pciidlist[] = {
42static struct drm_driver driver = { 42static struct drm_driver driver = {
43 .driver_features = DRIVER_USE_MTRR, 43 .driver_features = DRIVER_USE_MTRR,
44 .reclaim_buffers = drm_core_reclaim_buffers, 44 .reclaim_buffers = drm_core_reclaim_buffers,
45 .get_reg_ofs = drm_core_get_reg_ofs,
46 .fops = { 45 .fops = {
47 .owner = THIS_MODULE, 46 .owner = THIS_MODULE,
48 .open = drm_open, 47 .open = drm_open,
diff --git a/drivers/gpu/drm/via/via_drv.c b/drivers/gpu/drm/via/via_drv.c
index 0b9ad8bbb031..02f733db61c1 100644
--- a/drivers/gpu/drm/via/via_drv.c
+++ b/drivers/gpu/drm/via/via_drv.c
@@ -51,7 +51,6 @@ static struct drm_driver driver = {
51 .reclaim_buffers_locked = NULL, 51 .reclaim_buffers_locked = NULL,
52 .reclaim_buffers_idlelocked = via_reclaim_buffers_locked, 52 .reclaim_buffers_idlelocked = via_reclaim_buffers_locked,
53 .lastclose = via_lastclose, 53 .lastclose = via_lastclose,
54 .get_reg_ofs = drm_core_get_reg_ofs,
55 .ioctls = via_ioctls, 54 .ioctls = via_ioctls,
56 .fops = { 55 .fops = {
57 .owner = THIS_MODULE, 56 .owner = THIS_MODULE,
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 4a832de43dd5..e645f44e4302 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -723,7 +723,6 @@ static struct drm_driver driver = {
723 .irq_uninstall = vmw_irq_uninstall, 723 .irq_uninstall = vmw_irq_uninstall,
724 .irq_handler = vmw_irq_handler, 724 .irq_handler = vmw_irq_handler,
725 .reclaim_buffers_locked = NULL, 725 .reclaim_buffers_locked = NULL,
726 .get_reg_ofs = drm_core_get_reg_ofs,
727 .ioctls = vmw_ioctls, 726 .ioctls = vmw_ioctls,
728 .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls), 727 .num_ioctls = DRM_ARRAY_SIZE(vmw_ioctls),
729 .dma_quiescent = NULL, /*vmw_dma_quiescent, */ 728 .dma_quiescent = NULL, /*vmw_dma_quiescent, */
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 757b63a23b14..30e827aeba02 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -772,7 +772,6 @@ struct drm_driver {
772 struct drm_file *file_priv); 772 struct drm_file *file_priv);
773 void (*reclaim_buffers_idlelocked) (struct drm_device *dev, 773 void (*reclaim_buffers_idlelocked) (struct drm_device *dev,
774 struct drm_file *file_priv); 774 struct drm_file *file_priv);
775 resource_size_t (*get_reg_ofs) (struct drm_device *dev);
776 void (*set_version) (struct drm_device *dev, 775 void (*set_version) (struct drm_device *dev,
777 struct drm_set_version *sv); 776 struct drm_set_version *sv);
778 777
@@ -1159,7 +1158,6 @@ extern int drm_release(struct inode *inode, struct file *filp);
1159extern int drm_mmap(struct file *filp, struct vm_area_struct *vma); 1158extern int drm_mmap(struct file *filp, struct vm_area_struct *vma);
1160extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma); 1159extern int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma);
1161extern void drm_vm_open_locked(struct vm_area_struct *vma); 1160extern void drm_vm_open_locked(struct vm_area_struct *vma);
1162extern resource_size_t drm_core_get_reg_ofs(struct drm_device *dev);
1163extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait); 1161extern unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait);
1164 1162
1165 /* Memory management support (drm_memory.h) */ 1163 /* Memory management support (drm_memory.h) */