linux/include/drm/ttm
Daniel Vetter 72fec10c17 drm/ttm: WARN_ON non-empty lru when disabling a resource manager
ttm_resource_manager->use_type is only used for runtime changes by
vmwgfx. I think ideally we'd push this functionality into drivers -
ttm itself does not provide any locking to guarantee this is safe, so
the only way this can work at runtime is if the driver does provide
additional guarantees. vwmgfx does that through the
vmw_private->reservation_sem. Therefore supporting this feature in
shared code feels a bit misplaced.

As a first step add a WARN_ON to make sure the resource manager is
empty. This is just to make sure I actually understand correctly what
vmwgfx is doing, and to make sure an eventual subsequent refactor
doesn't break anything.

This check should also be useful for other drivers, to make sure they
haven't leaked anything.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201211162942.3399050-3-daniel.vetter@ffwll.ch
2021-01-18 14:15:20 +01:00
..
ttm_bo_api.h drm/ttm: cleanup LRU handling further 2020-12-15 17:01:55 +01:00
ttm_bo_driver.h drm/ttm: cleanup LRU handling further 2020-12-15 17:01:55 +01:00
ttm_caching.h drm/ttm: new TT backend allocation pool v3 2020-10-29 15:52:51 +01:00
ttm_execbuf_util.h drm/ttm: remove superflous extern attribute from funcs 2020-09-17 16:14:42 +02:00
ttm_memory.h drm/ttm: remove superflous extern attribute from funcs 2020-09-17 16:14:42 +02:00
ttm_placement.h drm/ttm: nuke caching placement flags 2020-10-15 12:51:35 +02:00
ttm_pool.h drm/ttm: new TT backend allocation pool v3 2020-10-29 15:52:51 +01:00
ttm_resource.h drm/ttm: WARN_ON non-empty lru when disabling a resource manager 2021-01-18 14:15:20 +01:00
ttm_tt.h drm/ttm: nuke ttm_dma_tt_init 2020-11-30 15:00:34 +01:00