drm: Rename reserve/unreserve to lock/unlock in GEM VRAM helpers
To align with the rest of DRM terminology, the GEM VRAM helpers now use lock and unlock in places where reserve and unreserve where used before. All callers have been adapted. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20190521110831.20200-3-tzimmermann@suse.de Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:

committed by
Gerd Hoffmann

parent
81da87f63a
commit
cb1f8814bb
@@ -62,13 +62,12 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
|
||||
obj = afbdev->afb.obj;
|
||||
gbo = drm_gem_vram_of_gem(obj);
|
||||
|
||||
/*
|
||||
* try and reserve the BO, if we fail with busy
|
||||
* then the BO is being moved and we should
|
||||
* store up the damage until later.
|
||||
/* Try to lock the BO. If we fail with -EBUSY then
|
||||
* the BO is being moved and we should store up the
|
||||
* damage until later.
|
||||
*/
|
||||
if (drm_can_sleep())
|
||||
ret = drm_gem_vram_reserve(gbo, true);
|
||||
ret = drm_gem_vram_lock(gbo, true);
|
||||
if (ret) {
|
||||
if (ret != -EBUSY)
|
||||
return;
|
||||
@@ -127,7 +126,7 @@ static void ast_dirty_update(struct ast_fbdev *afbdev,
|
||||
drm_gem_vram_kunmap(gbo);
|
||||
|
||||
out:
|
||||
drm_gem_vram_unreserve(gbo);
|
||||
drm_gem_vram_unlock(gbo);
|
||||
}
|
||||
|
||||
static void ast_fillrect(struct fb_info *info,
|
||||
|
@@ -1201,7 +1201,7 @@ static int ast_cursor_set(struct drm_crtc *crtc,
|
||||
}
|
||||
gbo = drm_gem_vram_of_gem(obj);
|
||||
|
||||
ret = drm_gem_vram_reserve(gbo, false);
|
||||
ret = drm_gem_vram_lock(gbo, false);
|
||||
if (ret)
|
||||
goto fail;
|
||||
|
||||
@@ -1209,7 +1209,7 @@ static int ast_cursor_set(struct drm_crtc *crtc,
|
||||
src = drm_gem_vram_kmap_at(gbo, true, &src_isiomem, &uobj_map);
|
||||
if (IS_ERR(src)) {
|
||||
ret = PTR_ERR(src);
|
||||
goto fail_unreserve;
|
||||
goto fail_unlock;
|
||||
}
|
||||
if (src_isiomem == true)
|
||||
DRM_ERROR("src cursor bo should be in main memory\n");
|
||||
@@ -1218,7 +1218,7 @@ static int ast_cursor_set(struct drm_crtc *crtc,
|
||||
false, &dst_isiomem, &ast->cache_kmap);
|
||||
if (IS_ERR(dst)) {
|
||||
ret = PTR_ERR(dst);
|
||||
goto fail_unreserve;
|
||||
goto fail_unlock;
|
||||
}
|
||||
if (dst_isiomem == false)
|
||||
DRM_ERROR("dst bo should be in VRAM\n");
|
||||
@@ -1229,7 +1229,7 @@ static int ast_cursor_set(struct drm_crtc *crtc,
|
||||
csum = copy_cursor_image(src, dst, width, height);
|
||||
|
||||
drm_gem_vram_kunmap_at(gbo, &uobj_map);
|
||||
drm_gem_vram_unreserve(gbo);
|
||||
drm_gem_vram_unlock(gbo);
|
||||
|
||||
/* write checksum + signature */
|
||||
{
|
||||
@@ -1262,8 +1262,8 @@ static int ast_cursor_set(struct drm_crtc *crtc,
|
||||
drm_gem_object_put_unlocked(obj);
|
||||
return 0;
|
||||
|
||||
fail_unreserve:
|
||||
drm_gem_vram_unreserve(gbo);
|
||||
fail_unlock:
|
||||
drm_gem_vram_unlock(gbo);
|
||||
fail:
|
||||
drm_gem_object_put_unlocked(obj);
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user