drm/ttm: add a wrapper for checking if manager is in use

This converts vmwgfx over to using an interface to set the
in use and check the in use flag.

Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804025632.3868079-57-airlied@gmail.com
This commit is contained in:
Dave Airlie
2020-08-04 12:56:29 +10:00
parent 90a0489a71
commit 3f48f938ad
4 changed files with 22 additions and 9 deletions

View File

@@ -1000,7 +1000,7 @@ static int ttm_bo_mem_placement(struct ttm_buffer_object *bo,
return ret;
man = ttm_manager_type(bdev, mem_type);
if (!man || !man->use_type)
if (!man || !ttm_mem_type_manager_used(man))
return -EBUSY;
if (!ttm_bo_mt_compatible(man, mem_type, place, &cur_flags))