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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user