drm/ttm: add resource iterator v4
authorChristian König <christian.koenig@amd.com>
Tue, 8 Jun 2021 09:13:21 +0000 (11:13 +0200)
committerChristian König <christian.koenig@amd.com>
Mon, 28 Mar 2022 18:05:32 +0000 (20:05 +0200)
commit5d05b988f1c0fddc4aaffa5fa3c3f5a9e7b84d5b
tree2f018edb9b2d7ef94ff04c7d36b527481d0d031b
parent6a9b028994025f5033f10d1da30b29dfdc713384
drm/ttm: add resource iterator v4

Instead of duplicating that at different places add an iterator over all
the resources in a resource manager.

v2: add lockdep annotation and kerneldoc
v3: fix various bugs pointed out by Felix
v4: simplify the code a bit more

Signed-off-by: Christian König <christian.koenig@amd.com>
Tested-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> (v2)
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220321132601.2161-2-christian.koenig@amd.com
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_device.c
drivers/gpu/drm/ttm/ttm_resource.c
include/drm/ttm/ttm_resource.h