drm/amdgpu: fix pm notifier handling
authorAlex Deucher <alexander.deucher@amd.com>
Thu, 1 May 2025 17:46:46 +0000 (13:46 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 7 May 2025 21:43:18 +0000 (17:43 -0400)
commit06f2dcc241e7e5c681f81fbc46cacdf4bfd7d6d7
treee4de648a1cd55a73f97dd3cca6c900142b578aad
parent086809c82c96116aed78f762e4f1d61a4e0210a7
drm/amdgpu: fix pm notifier handling

Set the s3/s0ix and s4 flags in the pm notifier so that we can skip
the resource evictions properly in pm prepare based on whether
we are suspending or hibernating.  Drop the eviction as processes
are not frozen at this time, we we can end up getting stuck trying
to evict VRAM while applications continue to submit work which
causes the buffers to get pulled back into VRAM.

v2: Move suspend flags out of pm notifier (Mario)

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4178
Fixes: 2965e6355dcd ("drm/amd: Add Suspend/Hibernate notification callback support")
Cc: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c