drm/shmem-helper: Removed drm_gem_shmem_create_object_cached()
Cached page mappings are now the default for SHMEM GEM objects. Remove the obsolete create function for cached mappings. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20201117133156.26822-3-tzimmermann@suse.de
This commit is contained in:
Родитель
0cf2ef46c6
Коммит
2f04636f49
|
@ -479,32 +479,6 @@ bool drm_gem_shmem_purge(struct drm_gem_object *obj)
|
|||
}
|
||||
EXPORT_SYMBOL(drm_gem_shmem_purge);
|
||||
|
||||
/**
|
||||
* drm_gem_shmem_create_object_cached - Create a shmem buffer object with
|
||||
* cached mappings
|
||||
* @dev: DRM device
|
||||
* @size: Size of the object to allocate
|
||||
*
|
||||
* By default, shmem buffer objects use writecombine mappings. This
|
||||
* function implements struct drm_driver.gem_create_object for shmem
|
||||
* buffer objects with cached mappings.
|
||||
*
|
||||
* Returns:
|
||||
* A struct drm_gem_shmem_object * on success or NULL negative on failure.
|
||||
*/
|
||||
struct drm_gem_object *
|
||||
drm_gem_shmem_create_object_cached(struct drm_device *dev, size_t size)
|
||||
{
|
||||
struct drm_gem_shmem_object *shmem;
|
||||
|
||||
shmem = kzalloc(sizeof(*shmem), GFP_KERNEL);
|
||||
if (!shmem)
|
||||
return NULL;
|
||||
|
||||
return &shmem->base;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_gem_shmem_create_object_cached);
|
||||
|
||||
/**
|
||||
* drm_gem_shmem_dumb_create - Create a dumb shmem buffer object
|
||||
* @file: DRM file structure to create the dumb buffer for
|
||||
|
|
|
@ -37,7 +37,6 @@ static const struct drm_driver mgag200_driver = {
|
|||
.major = DRIVER_MAJOR,
|
||||
.minor = DRIVER_MINOR,
|
||||
.patchlevel = DRIVER_PATCHLEVEL,
|
||||
.gem_create_object = drm_gem_shmem_create_object_cached,
|
||||
DRM_GEM_SHMEM_DRIVER_OPS,
|
||||
};
|
||||
|
||||
|
|
|
@ -38,8 +38,6 @@ static const struct drm_driver driver = {
|
|||
.driver_features = DRIVER_ATOMIC | DRIVER_GEM | DRIVER_MODESET,
|
||||
|
||||
/* GEM hooks */
|
||||
.gem_create_object = drm_gem_shmem_create_object_cached,
|
||||
|
||||
.fops = &udl_driver_fops,
|
||||
DRM_GEM_SHMEM_DRIVER_OPS,
|
||||
|
||||
|
|
|
@ -82,7 +82,6 @@ static const struct drm_driver vkms_driver = {
|
|||
.driver_features = DRIVER_MODESET | DRIVER_ATOMIC | DRIVER_GEM,
|
||||
.release = vkms_release,
|
||||
.fops = &vkms_driver_fops,
|
||||
.gem_create_object = drm_gem_shmem_create_object_cached,
|
||||
DRM_GEM_SHMEM_DRIVER_OPS,
|
||||
|
||||
.name = DRIVER_NAME,
|
||||
|
|
|
@ -133,9 +133,6 @@ drm_gem_shmem_create_with_handle(struct drm_file *file_priv,
|
|||
struct drm_device *dev, size_t size,
|
||||
uint32_t *handle);
|
||||
|
||||
struct drm_gem_object *
|
||||
drm_gem_shmem_create_object_cached(struct drm_device *dev, size_t size);
|
||||
|
||||
int drm_gem_shmem_dumb_create(struct drm_file *file, struct drm_device *dev,
|
||||
struct drm_mode_create_dumb *args);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче