drm/ttm: Add new callbacks to ttm res mgr
authorArunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Sat, 20 Aug 2022 07:32:59 +0000 (00:32 -0700)
committerChristian König <christian.koenig@amd.com>
Mon, 22 Aug 2022 13:33:12 +0000 (15:33 +0200)
commit544432703b2fe73a07f387c0b883da03ffa5671e
treec30dcf33231d48109c5b9903fd40578c24040038
parent0a58d2ae572adaec8d046f8d35b40c2c32ac7468
drm/ttm: Add new callbacks to ttm res mgr

We are adding two new callbacks to ttm resource manager
function to handle intersection and compatibility of
placement and resources.

v2: move the amdgpu and ttm_range_manager changes to
    separate patches (Christian)
v3: rename "intersect" to "intersects" (Matthew)
v4: move !place check to the !res if and return false
    in ttm_resource_compatible() function (Christian)
v5: move bits of code from patch number 6 to avoid
    temporary driver breakup (Christian)

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220820073304.178444-1-Arunpravin.PaneerSelvam@amd.com
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_resource.c
include/drm/ttm/ttm_resource.h