Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+14 -13
+2 -2
drivers/gpu/drm/drm_ioctl.c
··· 107 107 DRM_IOCTL_DEF(DRM_IOCTL_AGP_UNBIND, drm_agp_unbind_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 108 108 #endif 109 109 110 - DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_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), 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_legacy_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY), 112 112 113 113 DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_UNLOCKED), 114 114
+7
drivers/gpu/drm/drm_legacy.h
··· 100 100 void drm_legacy_reclaim_buffers(struct drm_device *dev, 101 101 struct drm_file *filp); 102 102 103 + /* Scatter Gather Support */ 104 + void drm_legacy_sg_cleanup(struct drm_device *dev); 105 + int drm_legacy_sg_alloc(struct drm_device *dev, void *data, 106 + struct drm_file *file_priv); 107 + int drm_legacy_sg_free(struct drm_device *dev, void *data, 108 + struct drm_file *file_priv); 109 + 103 110 #endif /* __DRM_LEGACY_H__ */
+5 -4
drivers/gpu/drm/drm_scatter.c
··· 34 34 #include <linux/vmalloc.h> 35 35 #include <linux/slab.h> 36 36 #include <drm/drmP.h> 37 + #include "drm_legacy.h" 37 38 38 39 #define DEBUG_SCATTER 0 39 40 ··· 79 78 # define ScatterHandle(x) (unsigned int)(x) 80 79 #endif 81 80 82 - int drm_sg_alloc(struct drm_device *dev, void *data, 83 - struct drm_file *file_priv) 81 + int drm_legacy_sg_alloc(struct drm_device *dev, void *data, 82 + struct drm_file *file_priv) 84 83 { 85 84 struct drm_scatter_gather *request = data; 86 85 struct drm_sg_mem *entry; ··· 195 194 return -ENOMEM; 196 195 } 197 196 198 - int drm_sg_free(struct drm_device *dev, void *data, 199 - struct drm_file *file_priv) 197 + int drm_legacy_sg_free(struct drm_device *dev, void *data, 198 + struct drm_file *file_priv) 200 199 { 201 200 struct drm_scatter_gather *request = data; 202 201 struct drm_sg_mem *entry;
-7
include/drm/drmP.h
··· 1300 1300 1301 1301 extern int drm_vma_info(struct seq_file *m, void *data); 1302 1302 1303 - /* Scatter Gather Support (drm_scatter.h) */ 1304 - extern void drm_legacy_sg_cleanup(struct drm_device *dev); 1305 - extern int drm_sg_alloc(struct drm_device *dev, void *data, 1306 - struct drm_file *file_priv); 1307 - extern int drm_sg_free(struct drm_device *dev, void *data, 1308 - struct drm_file *file_priv); 1309 - 1310 1303 1311 1304 extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size, 1312 1305 size_t align);