drm/ttm: use per BO cleanup workers
authorChristian König <christian.koenig@amd.com>
Wed, 23 Nov 2022 09:14:56 +0000 (10:14 +0100)
committerChristian König <christian.koenig@amd.com>
Tue, 6 Dec 2022 09:53:20 +0000 (10:53 +0100)
commit9bff18d13473a9fdf81d5158248472a9d8ecf2bd
treecf5f20f51436fa8368357dfde8608982d17b9e06
parentcd3a8a596214e6a338a22104936c40e62bdea2b6
drm/ttm: use per BO cleanup workers

Instead of a single worker going over the list of delete BOs in regular
intervals use a per BO worker which blocks for the resv object and
locking of the BO.

This not only simplifies the handling massively, but also results in
much better response time when cleaning up buffers.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221125102137.1801-3-christian.koenig@amd.com
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_region_ttm.c
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo_util.c
drivers/gpu/drm/ttm/ttm_device.c
include/drm/ttm/ttm_bo_api.h
include/drm/ttm/ttm_device.h