Commit 92172173 authored by Thomas Zimmermann's avatar Thomas Zimmermann

drm: Remove functions with kmap-object argument from GEM VRAM helpers

The GEM VRAM functions with kmap-object argument are not required any
longer. Remove them.
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarGerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190613073041.29350-10-tzimmermann@suse.de
parent 57c84d5c
...@@ -279,12 +279,11 @@ int drm_gem_vram_unpin(struct drm_gem_vram_object *gbo) ...@@ -279,12 +279,11 @@ int drm_gem_vram_unpin(struct drm_gem_vram_object *gbo)
EXPORT_SYMBOL(drm_gem_vram_unpin); EXPORT_SYMBOL(drm_gem_vram_unpin);
/** /**
* drm_gem_vram_kmap_at() - Maps a GEM VRAM object into kernel address space * drm_gem_vram_kmap() - Maps a GEM VRAM object into kernel address space
* @gbo: the GEM VRAM object * @gbo: the GEM VRAM object
* @map: establish a mapping if necessary * @map: establish a mapping if necessary
* @is_iomem: returns true if the mapped memory is I/O memory, or false \ * @is_iomem: returns true if the mapped memory is I/O memory, or false \
otherwise; can be NULL otherwise; can be NULL
* @kmap: the mapping's kmap object
* *
* This function maps the buffer object into the kernel's address space * This function maps the buffer object into the kernel's address space
* or returns the current mapping. If the parameter map is false, the * or returns the current mapping. If the parameter map is false, the
...@@ -296,10 +295,11 @@ EXPORT_SYMBOL(drm_gem_vram_unpin); ...@@ -296,10 +295,11 @@ EXPORT_SYMBOL(drm_gem_vram_unpin);
* NULL if not mapped, or * NULL if not mapped, or
* an ERR_PTR()-encoded error code otherwise. * an ERR_PTR()-encoded error code otherwise.
*/ */
void *drm_gem_vram_kmap_at(struct drm_gem_vram_object *gbo, bool map, void *drm_gem_vram_kmap(struct drm_gem_vram_object *gbo, bool map,
bool *is_iomem, struct ttm_bo_kmap_obj *kmap) bool *is_iomem)
{ {
int ret; int ret;
struct ttm_bo_kmap_obj *kmap = &gbo->kmap;
if (kmap->virtual || !map) if (kmap->virtual || !map)
goto out; goto out;
...@@ -317,56 +317,22 @@ void *drm_gem_vram_kmap_at(struct drm_gem_vram_object *gbo, bool map, ...@@ -317,56 +317,22 @@ void *drm_gem_vram_kmap_at(struct drm_gem_vram_object *gbo, bool map,
} }
return ttm_kmap_obj_virtual(kmap, is_iomem); return ttm_kmap_obj_virtual(kmap, is_iomem);
} }
EXPORT_SYMBOL(drm_gem_vram_kmap_at);
/**
* drm_gem_vram_kmap() - Maps a GEM VRAM object into kernel address space
* @gbo: the GEM VRAM object
* @map: establish a mapping if necessary
* @is_iomem: returns true if the mapped memory is I/O memory, or false \
otherwise; can be NULL
*
* This function maps the buffer object into the kernel's address space
* or returns the current mapping. If the parameter map is false, the
* function only queries the current mapping, but does not establish a
* new one.
*
* Returns:
* The buffers virtual address if mapped, or
* NULL if not mapped, or
* an ERR_PTR()-encoded error code otherwise.
*/
void *drm_gem_vram_kmap(struct drm_gem_vram_object *gbo, bool map,
bool *is_iomem)
{
return drm_gem_vram_kmap_at(gbo, map, is_iomem, &gbo->kmap);
}
EXPORT_SYMBOL(drm_gem_vram_kmap); EXPORT_SYMBOL(drm_gem_vram_kmap);
/** /**
* drm_gem_vram_kunmap_at() - Unmaps a GEM VRAM object * drm_gem_vram_kunmap() - Unmaps a GEM VRAM object
* @gbo: the GEM VRAM object * @gbo: the GEM VRAM object
* @kmap: the mapping's kmap object
*/ */
void drm_gem_vram_kunmap_at(struct drm_gem_vram_object *gbo, void drm_gem_vram_kunmap(struct drm_gem_vram_object *gbo)
struct ttm_bo_kmap_obj *kmap)
{ {
struct ttm_bo_kmap_obj *kmap = &gbo->kmap;
if (!kmap->virtual) if (!kmap->virtual)
return; return;
ttm_bo_kunmap(kmap); ttm_bo_kunmap(kmap);
kmap->virtual = NULL; kmap->virtual = NULL;
} }
EXPORT_SYMBOL(drm_gem_vram_kunmap_at);
/**
* drm_gem_vram_kunmap() - Unmaps a GEM VRAM object
* @gbo: the GEM VRAM object
*/
void drm_gem_vram_kunmap(struct drm_gem_vram_object *gbo)
{
drm_gem_vram_kunmap_at(gbo, &gbo->kmap);
}
EXPORT_SYMBOL(drm_gem_vram_kunmap); EXPORT_SYMBOL(drm_gem_vram_kunmap);
/** /**
......
...@@ -81,12 +81,8 @@ u64 drm_gem_vram_mmap_offset(struct drm_gem_vram_object *gbo); ...@@ -81,12 +81,8 @@ u64 drm_gem_vram_mmap_offset(struct drm_gem_vram_object *gbo);
s64 drm_gem_vram_offset(struct drm_gem_vram_object *gbo); s64 drm_gem_vram_offset(struct drm_gem_vram_object *gbo);
int drm_gem_vram_pin(struct drm_gem_vram_object *gbo, unsigned long pl_flag); int drm_gem_vram_pin(struct drm_gem_vram_object *gbo, unsigned long pl_flag);
int drm_gem_vram_unpin(struct drm_gem_vram_object *gbo); int drm_gem_vram_unpin(struct drm_gem_vram_object *gbo);
void *drm_gem_vram_kmap_at(struct drm_gem_vram_object *gbo, bool map,
bool *is_iomem, struct ttm_bo_kmap_obj *kmap);
void *drm_gem_vram_kmap(struct drm_gem_vram_object *gbo, bool map, void *drm_gem_vram_kmap(struct drm_gem_vram_object *gbo, bool map,
bool *is_iomem); bool *is_iomem);
void drm_gem_vram_kunmap_at(struct drm_gem_vram_object *gbo,
struct ttm_bo_kmap_obj *kmap);
void drm_gem_vram_kunmap(struct drm_gem_vram_object *gbo); void drm_gem_vram_kunmap(struct drm_gem_vram_object *gbo);
int drm_gem_vram_fill_create_dumb(struct drm_file *file, int drm_gem_vram_fill_create_dumb(struct drm_file *file,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment