Skip to content

Commit 8f32378

Browse files
Jack Xiaoalexdeucher
authored andcommitted
drm/amd/amdgpu: fix warning during suspend
Freeing memory was warned during suspend. Move the self test out of suspend. Link: https://bugzilla.redhat.com/show_bug.cgi?id=2151825 Cc: [email protected] Signed-off-by: Jack Xiao <[email protected]> Reviewed-by: Christian König <[email protected]> Reviewed-by: Feifei Xu <[email protected]> Reviewed-and-tested-by: Evan Quan <[email protected]> Tested-by: Jocelyn Falempe <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected] # 6.1.x
1 parent ceaa837 commit 8f32378

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4268,6 +4268,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
42684268
}
42694269
adev->in_suspend = false;
42704270

4271+
if (adev->enable_mes)
4272+
amdgpu_mes_self_test(adev);
4273+
42714274
if (amdgpu_acpi_smart_shift_update(dev, AMDGPU_SS_DEV_D0))
42724275
DRM_WARN("smart shift update failed\n");
42734276

drivers/gpu/drm/amd/amdgpu/mes_v11_0.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ static int mes_v11_0_late_init(void *handle)
13441344
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
13451345

13461346
/* it's only intended for use in mes_self_test case, not for s0ix and reset */
1347-
if (!amdgpu_in_reset(adev) && !adev->in_s0ix &&
1347+
if (!amdgpu_in_reset(adev) && !adev->in_s0ix && !adev->in_suspend &&
13481348
(adev->ip_versions[GC_HWIP][0] != IP_VERSION(11, 0, 3)))
13491349
amdgpu_mes_self_test(adev);
13501350

0 commit comments

Comments
 (0)