linux-stable/drivers/gpu
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
..
drm drm/ttm, drm/amdgpu: Allow the driver some control over swapping 2021-06-07 16:07:09 +02:00
host1x gpu: host1x: Add early init and late exit callbacks 2021-03-31 17:42:14 +02:00
ipu-v3 gpu: ipu-v3: Add Rec.709 limited range support to DP 2021-05-10 17:20:29 +02:00
trace
vga vgaarb: Use ACPI HID name to find integrated GPU 2021-05-20 14:55:56 -04:00
Makefile