drm/vmwgfx: switch over to the new pin interface v2

Stop using TTM_PL_FLAG_NO_EVICT.

v2: fix unconditional pinning

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Link: https://patchwork.freedesktop.org/patch/391601/?series=81973&rev=1
This commit is contained in:
Christian König
2020-09-21 14:37:25 +02:00
parent b254557cb2
commit fbe86ca567
11 changed files with 39 additions and 85 deletions

View File

@@ -459,9 +459,9 @@ int vmw_bo_cpu_blit(struct ttm_buffer_object *dst,
int ret = 0;
/* Buffer objects need to be either pinned or reserved: */
if (!(dst->mem.placement & TTM_PL_FLAG_NO_EVICT))
if (!(dst->pin_count))
dma_resv_assert_held(dst->base.resv);
if (!(src->mem.placement & TTM_PL_FLAG_NO_EVICT))
if (!(src->pin_count))
dma_resv_assert_held(src->base.resv);
if (!ttm_tt_is_populated(dst->ttm)) {