mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 01:22:07 +00:00
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>
This commit is contained in:
parent
a266162aef
commit
9ec4e2ff3e
@ -107,8 +107,8 @@ static const struct drm_ioctl_desc drm_ioctls[] = {
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_AGP_UNBIND, drm_agp_unbind_ioctl, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
#endif
|
||||
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_sg_alloc, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_SG_ALLOC, drm_legacy_sg_alloc, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_SG_FREE, drm_legacy_sg_free, DRM_AUTH|DRM_MASTER|DRM_ROOT_ONLY),
|
||||
|
||||
DRM_IOCTL_DEF(DRM_IOCTL_WAIT_VBLANK, drm_wait_vblank, DRM_UNLOCKED),
|
||||
|
||||
|
@ -100,4 +100,11 @@ void drm_legacy_free_buffer(struct drm_device *dev,
|
||||
void drm_legacy_reclaim_buffers(struct drm_device *dev,
|
||||
struct drm_file *filp);
|
||||
|
||||
/* Scatter Gather Support */
|
||||
void drm_legacy_sg_cleanup(struct drm_device *dev);
|
||||
int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
int drm_legacy_sg_free(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
#endif /* __DRM_LEGACY_H__ */
|
||||
|
@ -34,6 +34,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/slab.h>
|
||||
#include <drm/drmP.h>
|
||||
#include "drm_legacy.h"
|
||||
|
||||
#define DEBUG_SCATTER 0
|
||||
|
||||
@ -78,7 +79,7 @@ void drm_legacy_sg_cleanup(struct drm_device *dev)
|
||||
# define ScatterHandle(x) (unsigned int)(x)
|
||||
#endif
|
||||
|
||||
int drm_sg_alloc(struct drm_device *dev, void *data,
|
||||
int drm_legacy_sg_alloc(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
struct drm_scatter_gather *request = data;
|
||||
@ -194,7 +195,7 @@ int drm_sg_alloc(struct drm_device *dev, void *data,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
int drm_sg_free(struct drm_device *dev, void *data,
|
||||
int drm_legacy_sg_free(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv)
|
||||
{
|
||||
struct drm_scatter_gather *request = data;
|
||||
|
@ -1300,13 +1300,6 @@ void drm_prime_remove_buf_handle_locked(struct drm_prime_file_private *prime_fpr
|
||||
|
||||
extern int drm_vma_info(struct seq_file *m, void *data);
|
||||
|
||||
/* Scatter Gather Support (drm_scatter.h) */
|
||||
extern void drm_legacy_sg_cleanup(struct drm_device *dev);
|
||||
extern int drm_sg_alloc(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
extern int drm_sg_free(struct drm_device *dev, void *data,
|
||||
struct drm_file *file_priv);
|
||||
|
||||
|
||||
extern drm_dma_handle_t *drm_pci_alloc(struct drm_device *dev, size_t size,
|
||||
size_t align);
|
||||
|
Loading…
Reference in New Issue
Block a user