summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_gem_vram_helper.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2020-10-20 11:03:18 +1000
committerDave Airlie <airlied@redhat.com>2020-10-21 13:44:28 +1000
commit6d820003295977f865257f1845bcdebc5dab4fb5 (patch)
treeefc350a2cdc7df99d2ac7c1a17fce656d2333c5a /drivers/gpu/drm/drm_gem_vram_helper.c
parent28ee846e83782e61d86075444c5848ab4a329241 (diff)
downloadlinux-6d820003295977f865257f1845bcdebc5dab4fb5.tar.bz2
drm/ttm: drop move notify around move.
The drivers now do this in the move callback. move_notify is still needed in the destroy path. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20201020010319.1692445-7-airlied@gmail.com
Diffstat (limited to 'drivers/gpu/drm/drm_gem_vram_helper.c')
-rw-r--r--drivers/gpu/drm/drm_gem_vram_helper.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_gem_vram_helper.c b/drivers/gpu/drm/drm_gem_vram_helper.c
index 7aeb5daf2805..19087b22bdbb 100644
--- a/drivers/gpu/drm/drm_gem_vram_helper.c
+++ b/drivers/gpu/drm/drm_gem_vram_helper.c
@@ -590,7 +590,16 @@ static int drm_gem_vram_bo_driver_move(struct drm_gem_vram_object *gbo,
struct ttm_operation_ctx *ctx,
struct ttm_resource *new_mem)
{
- return ttm_bo_move_memcpy(&gbo->bo, ctx, new_mem);
+ int ret;
+
+ drm_gem_vram_bo_driver_move_notify(gbo, evict, new_mem);
+ ret = ttm_bo_move_memcpy(&gbo->bo, ctx, new_mem);
+ if (ret) {
+ swap(*new_mem, gbo->bo.mem);
+ drm_gem_vram_bo_driver_move_notify(gbo, false, new_mem);
+ swap(*new_mem, gbo->bo.mem);
+ }
+ return ret;
}
/*