aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/drm_bufs.c2
-rw-r--r--drivers/gpu/drm/drm_dma.c10
-rw-r--r--drivers/gpu/drm/drm_fops.c2
-rw-r--r--drivers/gpu/drm/drm_legacy.h8
-rw-r--r--include/drm/drmP.h7
5 files changed, 14 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c
index 9e04d6a43fa4..70ba89f66199 100644
--- a/drivers/gpu/drm/drm_bufs.c
+++ b/drivers/gpu/drm/drm_bufs.c
@@ -1338,7 +1338,7 @@ int drm_legacy_freebufs(struct drm_device *dev, void *data,
1338 task_pid_nr(current)); 1338 task_pid_nr(current));
1339 return -EINVAL; 1339 return -EINVAL;
1340 } 1340 }
1341 drm_free_buffer(dev, buf); 1341 drm_legacy_free_buffer(dev, buf);
1342 } 1342 }
1343 1343
1344 return 0; 1344 return 0;
diff --git a/drivers/gpu/drm/drm_dma.c b/drivers/gpu/drm/drm_dma.c
index 8a140a953754..1b1dd356a1e4 100644
--- a/drivers/gpu/drm/drm_dma.c
+++ b/drivers/gpu/drm/drm_dma.c
@@ -124,7 +124,7 @@ void drm_legacy_dma_takedown(struct drm_device *dev)
124 * 124 *
125 * Resets the fields of \p buf. 125 * Resets the fields of \p buf.
126 */ 126 */
127void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf) 127void drm_legacy_free_buffer(struct drm_device *dev, struct drm_buf * buf)
128{ 128{
129 if (!buf) 129 if (!buf)
130 return; 130 return;
@@ -142,8 +142,8 @@ void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf)
142 * 142 *
143 * Frees each buffer associated with \p file_priv not already on the hardware. 143 * Frees each buffer associated with \p file_priv not already on the hardware.
144 */ 144 */
145void drm_core_reclaim_buffers(struct drm_device *dev, 145void drm_legacy_reclaim_buffers(struct drm_device *dev,
146 struct drm_file *file_priv) 146 struct drm_file *file_priv)
147{ 147{
148 struct drm_device_dma *dma = dev->dma; 148 struct drm_device_dma *dma = dev->dma;
149 int i; 149 int i;
@@ -154,7 +154,7 @@ void drm_core_reclaim_buffers(struct drm_device *dev,
154 if (dma->buflist[i]->file_priv == file_priv) { 154 if (dma->buflist[i]->file_priv == file_priv) {
155 switch (dma->buflist[i]->list) { 155 switch (dma->buflist[i]->list) {
156 case DRM_LIST_NONE: 156 case DRM_LIST_NONE:
157 drm_free_buffer(dev, dma->buflist[i]); 157 drm_legacy_free_buffer(dev, dma->buflist[i]);
158 break; 158 break;
159 case DRM_LIST_WAIT: 159 case DRM_LIST_WAIT:
160 dma->buflist[i]->list = DRM_LIST_RECLAIM; 160 dma->buflist[i]->list = DRM_LIST_RECLAIM;
@@ -166,5 +166,3 @@ void drm_core_reclaim_buffers(struct drm_device *dev,
166 } 166 }
167 } 167 }
168} 168}
169
170EXPORT_SYMBOL(drm_core_reclaim_buffers);
diff --git a/drivers/gpu/drm/drm_fops.c b/drivers/gpu/drm/drm_fops.c
index b419990042b0..3bb6234d072a 100644
--- a/drivers/gpu/drm/drm_fops.c
+++ b/drivers/gpu/drm/drm_fops.c
@@ -404,7 +404,7 @@ int drm_release(struct inode *inode, struct file *filp)
404 drm_master_release(dev, filp); 404 drm_master_release(dev, filp);
405 405
406 if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) 406 if (drm_core_check_feature(dev, DRIVER_HAVE_DMA))
407 drm_core_reclaim_buffers(dev, file_priv); 407 drm_legacy_reclaim_buffers(dev, file_priv);
408 408
409 drm_events_release(file_priv); 409 drm_events_release(file_priv);
410 410
diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h
index 3049af5a01b3..0e0df225dec6 100644
--- a/drivers/gpu/drm/drm_legacy.h
+++ b/drivers/gpu/drm/drm_legacy.h
@@ -92,4 +92,12 @@ int drm_legacy_lock(struct drm_device *d, void *v, struct drm_file *f);
92int drm_legacy_unlock(struct drm_device *d, void *v, struct drm_file *f); 92int drm_legacy_unlock(struct drm_device *d, void *v, struct drm_file *f);
93int drm_legacy_lock_free(struct drm_lock_data *lock, unsigned int ctx); 93int drm_legacy_lock_free(struct drm_lock_data *lock, unsigned int ctx);
94 94
95/* DMA support */
96int drm_legacy_dma_setup(struct drm_device *dev);
97void drm_legacy_dma_takedown(struct drm_device *dev);
98void drm_legacy_free_buffer(struct drm_device *dev,
99 struct drm_buf * buf);
100void drm_legacy_reclaim_buffers(struct drm_device *dev,
101 struct drm_file *filp);
102
95#endif /* __DRM_LEGACY_H__ */ 103#endif /* __DRM_LEGACY_H__ */
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 027e4c5dbf03..caf29af2dd54 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1140,13 +1140,6 @@ void drm_clflush_virt_range(void *addr, unsigned long length);
1140 * DMA quiscent + idle. DMA quiescent usually requires the hardware lock. 1140 * DMA quiscent + idle. DMA quiescent usually requires the hardware lock.
1141 */ 1141 */
1142 1142
1143 /* DMA support (drm_dma.h) */
1144extern int drm_legacy_dma_setup(struct drm_device *dev);
1145extern void drm_legacy_dma_takedown(struct drm_device *dev);
1146extern void drm_free_buffer(struct drm_device *dev, struct drm_buf * buf);
1147extern void drm_core_reclaim_buffers(struct drm_device *dev,
1148 struct drm_file *filp);
1149
1150 /* IRQ support (drm_irq.h) */ 1143 /* IRQ support (drm_irq.h) */
1151extern int drm_control(struct drm_device *dev, void *data, 1144extern int drm_control(struct drm_device *dev, void *data,
1152 struct drm_file *file_priv); 1145 struct drm_file *file_priv);