diff options
author | Dave Airlie <airlied@redhat.com> | 2020-08-04 12:56:29 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2020-08-06 13:12:40 +1000 |
commit | 3f48f938ad21a1ab1cec5631af3e468baabe41c8 (patch) | |
tree | d87c9eabc5e20c84070423ebac5ee0683ec34c55 /include/drm/ttm/ttm_bo_driver.h | |
parent | 90a0489a718b87bc0674792f9eafac007e0ea3d6 (diff) | |
download | lwn-3f48f938ad21a1ab1cec5631af3e468baabe41c8.tar.gz lwn-3f48f938ad21a1ab1cec5631af3e468baabe41c8.zip |
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
Diffstat (limited to 'include/drm/ttm/ttm_bo_driver.h')
-rw-r--r-- | include/drm/ttm/ttm_bo_driver.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h index a6076ab89a51..31264a09ec63 100644 --- a/include/drm/ttm/ttm_bo_driver.h +++ b/include/drm/ttm/ttm_bo_driver.h @@ -690,6 +690,20 @@ static inline void ttm_mem_type_manager_set_used(struct ttm_mem_type_manager *ma } /** + * ttm_mem_type_manager_used + * + * @man: Manager to get used state for + * + * Get the in use flag for a manager. + * Returns: + * true is used, false if not. + */ +static inline bool ttm_mem_type_manager_used(struct ttm_mem_type_manager *man) +{ + return man->use_type; +} + +/** * ttm_mem_type_manager_cleanup * * @man: A memory manager object. |