drm/ttm: replace busy placement with flags v6
authorSomalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Mon, 13 Nov 2023 10:48:44 +0000 (16:18 +0530)
committerChristian König <christian.koenig@amd.com>
Thu, 25 Jan 2024 08:59:44 +0000 (09:59 +0100)
commita78a8da51b36c7a0c0c16233f91d60aac03a5a49
treea1c15ac5b3b95761ce648b8a58d169f24a1601e0
parent28e5126718c7b306b8c29d2ae8f48417e9303aa1
drm/ttm: replace busy placement with flags v6

Instead of a list of separate busy placement add flags which indicate
that a placement should only be used when there is room or if we need to
evict.

v2: add missing TTM_PL_FLAG_IDLE for i915
v3: fix auto build test ERROR on drm-tip/drm-tip
v4: fix some typos pointed out by checkpatch
v5: cleanup some rebase problems with VMWGFX
v6: implement some missing VMWGFX functionality pointed out by Zack,
    rename the flags as suggested by Michel, rebase on drm-tip and
    adjust XE as well

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Somalapuram Amaranath <Amaranath.Somalapuram@amd.com>
Reviewed-by: Zack Rusin <zack.rusin@broadcom.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240112125158.2748-4-christian.koenig@amd.com
18 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/drm_gem_vram_helper.c
drivers/gpu/drm/i915/gem/i915_gem_ttm.c
drivers/gpu/drm/loongson/lsdc_ttm.c
drivers/gpu/drm/nouveau/nouveau_bo.c
drivers/gpu/drm/nouveau/nouveau_bo.h
drivers/gpu/drm/qxl/qxl_object.c
drivers/gpu/drm/qxl/qxl_ttm.c
drivers/gpu/drm/radeon/radeon_object.c
drivers/gpu/drm/radeon/radeon_ttm.c
drivers/gpu/drm/radeon/radeon_uvd.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_resource.c
drivers/gpu/drm/vmwgfx/vmwgfx_bo.c
drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
include/drm/ttm/ttm_placement.h
include/drm/ttm/ttm_resource.h