Skip to content

Commit dbe3529

Browse files
Jack Xiaogregkh
authored andcommitted
drm/amd/amdgpu: fix warning during suspend
commit 8f32378 upstream. 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 Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 8da6df0 commit dbe3529

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
@@ -4248,6 +4248,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon)
42484248
#endif
42494249
adev->in_suspend = false;
42504250

4251+
if (adev->enable_mes)
4252+
amdgpu_mes_self_test(adev);
4253+
42514254
if (amdgpu_acpi_smart_shift_update(dev, AMDGPU_SS_DEV_D0))
42524255
DRM_WARN("smart shift update failed\n");
42534256

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

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

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

0 commit comments

Comments
 (0)