mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 22:50:57 +07:00
drm: move drm_getsarea into drm_bufs.c
It fiddles the sarea out of the maps which are also handled in drm_bufs.c With this drm_drv.c is a notch more legacy free. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@gmail.com>
This commit is contained in:
parent
da5cbe361c
commit
bd0c0ceef6
@ -1600,6 +1600,20 @@ int drm_mapbufs(struct drm_device *dev, void *data,
|
|||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct drm_local_map *drm_getsarea(struct drm_device *dev)
|
||||||
|
{
|
||||||
|
struct drm_map_list *entry;
|
||||||
|
|
||||||
|
list_for_each_entry(entry, &dev->maplist, head) {
|
||||||
|
if (entry->map && entry->map->type == _DRM_SHM &&
|
||||||
|
(entry->map->flags & _DRM_CONTAINS_LOCK)) {
|
||||||
|
return entry->map;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(drm_getsarea);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compute size order. Returns the exponent of the smaller power of two which
|
* Compute size order. Returns the exponent of the smaller power of two which
|
||||||
* is greater or equal to given number.
|
* is greater or equal to given number.
|
||||||
|
@ -485,19 +485,4 @@ long drm_ioctl(struct file *filp,
|
|||||||
DRM_DEBUG("ret = %d\n", retcode);
|
DRM_DEBUG("ret = %d\n", retcode);
|
||||||
return retcode;
|
return retcode;
|
||||||
}
|
}
|
||||||
|
|
||||||
EXPORT_SYMBOL(drm_ioctl);
|
EXPORT_SYMBOL(drm_ioctl);
|
||||||
|
|
||||||
struct drm_local_map *drm_getsarea(struct drm_device *dev)
|
|
||||||
{
|
|
||||||
struct drm_map_list *entry;
|
|
||||||
|
|
||||||
list_for_each_entry(entry, &dev->maplist, head) {
|
|
||||||
if (entry->map && entry->map->type == _DRM_SHM &&
|
|
||||||
(entry->map->flags & _DRM_CONTAINS_LOCK)) {
|
|
||||||
return entry->map;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(drm_getsarea);
|
|
||||||
|
Loading…
Reference in New Issue
Block a user