Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd: Invert APU check for amdgpu_device_evict_resources()

Resource eviction isn't needed for s3 or s2idle on APUs, but should
be run for S4. As amdgpu_device_evict_resources() will be called
by prepare notifier adjust logic so that APUs only cover S4.

Suggested-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Link: https://lore.kernel.org/r/20241128032656.2090059-1-superm1@kernel.org
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Mario Limonciello and committed by
Alex Deucher
c2ee5c2f 86fa54f3

+2 -2
+2 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
··· 4778 4778 { 4779 4779 int ret; 4780 4780 4781 - /* No need to evict vram on APUs for suspend to ram or s2idle */ 4782 - if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU)) 4781 + /* No need to evict vram on APUs unless going to S4 */ 4782 + if (!adev->in_s4 && (adev->flags & AMD_IS_APU)) 4783 4783 return 0; 4784 4784 4785 4785 ret = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM);