aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-11 01:42:43 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-09-12 05:08:54 -0400
commit9ec4e2ff3e269756a253282c784776e2166be7bc (patch)
tree44c3df83725d2aa175030174e77f4f940f09f7d9
parenta266162aef4f43307d18c88fb5ecaffd8e9303af (diff)
drm: Move sg functions into drm_legacy.h
Also sprinkle the drm_legacy_ prefix where missing. v2: Drop extern from function declarations and include "drm_legacy.h" in drm_scatter.c, spotted by David. Cc: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/drm_ioctl.c4
-rw-r--r--drivers/gpu/drm/drm_legacy.h7
-rw-r--r--drivers/gpu/drm/drm_scatter.c9
-rw-r--r--include/drm/drmP.h7
4 files changed, 14 insertions, 13 deletions
diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index 187dfaaeb491..4c0822973db4 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -107,8 +107,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
107 DRM_IOCTL_DEF(DRM_IOCTL_AGP_UNBIND, drm_agp_unbind_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 107 DRM_IOCTL_DEF(DRM_IOCTL_AGP_UNBIND, drm_agp_unbind_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
108#endif 108#endif
109 109
110 DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_sg_alloc, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 110 DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_legacy_sg_alloc, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
111 DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 111 DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_legacy_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
112 112
113 DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_UNLOCKED), 113 DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_UNLOCKED),
114 114
diff --git a/drivers/gpu/drm/drm_legacy.h b/drivers/gpu/drm/drm_legacy.h
index 0e0df225dec6..3cc0efa7304a 100644
--- a/drivers/gpu/drm/drm_legacy.h
+++ b/drivers/gpu/drm/drm_legacy.h
@@ -100,4 +100,11 @@ void drm_legacy_free_buffer(struct drm_device *dev,
100void drm_legacy_reclaim_buffers(struct drm_device *dev, 100void drm_legacy_reclaim_buffers(struct drm_device *dev,
101 struct drm_file *filp); 101 struct drm_file *filp);
102 102
103/* Scatter Gather Support */
104void drm_legacy_sg_cleanup(struct drm_device *dev);
105int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
106 struct drm_file *file_priv);
107int drm_legacy_sg_free(struct drm_device *dev, void *data,
108 struct drm_file *file_priv);
109
103#endif /* __DRM_LEGACY_H__ */ 110#endif /* __DRM_LEGACY_H__ */
diff --git a/drivers/gpu/drm/drm_scatter.c b/drivers/gpu/drm/drm_scatter.c
index 1c78406f6e71..4f0f3b36d537 100644
--- a/drivers/gpu/drm/drm_scatter.c
+++ b/drivers/gpu/drm/drm_scatter.c
@@ -34,6 +34,7 @@
34#include <linux/vmalloc.h> 34#include <linux/vmalloc.h>
35#include <linux/slab.h> 35#include <linux/slab.h>
36#include <drm/drmP.h> 36#include <drm/drmP.h>
37#include "drm_legacy.h"
37 38
38#define DEBUG_SCATTER 0 39#define DEBUG_SCATTER 0
39 40
@@ -78,8 +79,8 @@ void drm_legacy_sg_cleanup(struct drm_device *dev)
78# define ScatterHandle(x) (unsigned int)(x) 79# define ScatterHandle(x) (unsigned int)(x)
79#endif 80#endif
80 81
81int drm_sg_alloc(struct drm_device *dev, void *data, 82int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
82 struct drm_file *file_priv) 83 struct drm_file *file_priv)
83{ 84{
84 struct drm_scatter_gather *request = data; 85 struct drm_scatter_gather *request = data;
85 struct drm_sg_mem *entry; 86 struct drm_sg_mem *entry;
@@ -194,8 +195,8 @@ int drm_sg_alloc(struct drm_device *dev, void *data,
194 return -ENOMEM; 195 return -ENOMEM;
195} 196}
196 197
197int drm_sg_free(struct drm_device *dev, void *data, 198int drm_legacy_sg_free(struct drm_device *dev, void *data,
198 struct drm_file *file_priv) 199 struct drm_file *file_priv)
199{ 200{
200 struct drm_scatter_gather *request = data; 201 struct drm_scatter_gather *request = data;
201 struct drm_sg_mem *entry; 202 struct drm_sg_mem *entry;
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index caf29af2dd54..cd35bc902925 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1300,13 +1300,6 @@ void drm_prime_remove_buf_handle_locked(struct drm_prime_file_private *prime_fpr
1300 1300
1301extern int drm_vma_info(struct seq_file *m, void *data); 1301extern int drm_vma_info(struct seq_file *m, void *data);
1302 1302
1303 /* Scatter Gather Support (drm_scatter.h) */
1304extern void drm_legacy_sg_cleanup(struct drm_device *dev);
1305extern int drm_sg_alloc(struct drm_device *dev, void *data,
1306 struct drm_file *file_priv);
1307extern int drm_sg_free(struct drm_device *dev, void *data,
1308 struct drm_file *file_priv);
1309
1310 1303
1311extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, 1304extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
1312 size_t align); 1305 size_t align);