Files
linux/drivers/gpu/drm/amd/amdgpu
Thomas Hellström abb50d67ad drm/ttm, drm/amdgpu: Allow the driver some control over swapping
We are calling the eviction_valuable driver callback at eviction time to
determine whether we actually can evict a buffer object.
The upcoming i915 TTM backend needs the same functionality for swapout,
and that might actually be beneficial to other drivers as well.

Add an eviction_valuable call also in the swapout path. Try to keep the
current behaviour for all drivers by returning true if the buffer object
is already in the TTM_PL_SYSTEM placement. We change behaviour for the
case where a buffer object is in a TT backed placement when swapped out,
in which case the drivers normal eviction_valuable path is run.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Acked-by: Christian König <christian.koenig@amd.com>
Link: https://lore.kernel.org/r/20210602083818.241793-8-thomas.hellstrom@linux.intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20210602083818.241793-8-thomas.hellstrom@linux.intel.com
2021-06-07 16:07:09 +02:00
..
2021-04-09 16:46:32 -04:00
2021-05-19 22:43:43 -04:00
2021-04-09 16:46:32 -04:00
2021-03-23 23:31:17 -04:00
2021-03-23 23:31:17 -04:00
2021-05-19 23:50:27 -04:00
2021-05-19 23:50:27 -04:00
2020-07-02 12:02:50 -04:00
2020-08-14 16:22:39 -04:00
2020-07-01 01:59:24 -04:00
2021-05-19 22:29:30 -04:00
2020-07-02 12:02:50 -04:00