drm/amd/amdgpu: fix warining during suspend
Subsystems (2)
PATCH 1/1 drm/amd/amdgpu: fix warining during suspend
Freeing memory was warned during suspend.
Move the self test out of suspend.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -4270,6 +4270,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) } adev->in_suspend = false; +if (adev->enable_mes) +amdgpu_mes_self_test (adev); +if (amdgpu_acpi_smart_shift_update (dev,AMDGPU_SS_DEV_D0 ))DRM_WARN ("smart shift update failed\n" );
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1 -1
@@ -1284,7 +1284,7 @@ static int mes_v11_0_late_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* it's only intended for use in mes_self_test case, not for s0ix and reset */ -if (!amdgpu_in_reset (adev) && !adev->in_s0ix && +if (!amdgpu_in_reset (adev) && !adev->in_s0ix && !adev->in_suspend && (adev->ip_versions[GC_HWIP ][0 ] !=IP_VERSION (11 ,0 ,3 )))amdgpu_mes_self_test (adev);
Signature · 1 line
2.37.3
Am 13.02.23 um 11:52 schrieb Jack Xiao:
Quoted 6 lines
Freeing memory was warned during suspend.
Move the self test out of suspend.
Quoted 32 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-0@@ -4270,6 +4270,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) } adev->in_suspend = false; +if (adev->enable_mes) +amdgpu_mes_self_test (adev); +if (amdgpu_acpi_smart_shift_update (dev,AMDGPU_SS_DEV_D0 ))DRM_WARN ("smart shift update failed\n" );drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1
-1@@ -1284,7 +1284,7 @@ static int mes_v11_0_late_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* it's only intended for use in mes_self_test case, not for s0ix and reset */ -if (!amdgpu_in_reset (adev) && !adev->in_s0ix && +if (!amdgpu_in_reset (adev) && !adev->in_s0ix && !adev->in_suspend && (adev->ip_versions[GC_HWIP ][0 ] !=IP_VERSION (11 ,0 ,3 )))amdgpu_mes_self_test (adev);
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jack Xiao
Sent: Monday, February 13, 2023 6:52 PM
To: [email protected]
Cc: Xiao, Jack <[email protected]>; [email protected]
Subject: [PATCH] drm/amd/amdgpu: fix warining during suspend
Freeing memory was warned during suspend.
Move the self test out of suspend.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
@@ -4270,6 +4270,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) } adev->in_suspend = false; +if (adev->enable_mes) +amdgpu_mes_self_test (adev); +if (amdgpu_acpi_smart_shift_update (dev,AMDGPU_SS_DEV_D0 ))DRM_WARN ("smart shift update failed\n" );
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1 -1
@@ -1284,7 +1284,7 @@ static int mes_v11_0_late_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* it's only intended for use in mes_self_test case, not for s0ix and reset */ -if (!amdgpu_in_reset (adev) && !adev->in_s0ix && +if (!amdgpu_in_reset (adev) && !adev->in_s0ix && !adev->in_suspend && (adev->ip_versions[GC_HWIP ][0 ] !=IP_VERSION (11 ,0 ,3 )))amdgpu_mes_self_test (adev);
Signature · 1 line
2.37.3
[AMD Official Use Only - General]
Quoted 53 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jack Xiao
Sent: Monday, February 13, 2023 6:52 PM
To: [email protected]
Cc: Xiao, Jack <[email protected]>; [email protected]
Subject: [PATCH] drm/amd/amdgpu: fix warining during suspendFreeing memory was warned during suspend.
Move the self test out of suspend.Signed-off-by Jack Xiao <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3
-0@@ -4270,6 +4270,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) } adev->in_suspend = false; +if (adev->enable_mes) +amdgpu_mes_self_test (adev); +if (amdgpu_acpi_smart_shift_update (dev,AMDGPU_SS_DEV_D0 ))DRM_WARN ("smart shift update failed\n" );drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-0@@ -1284,7 +1284,7 @@ static int mes_v11_0_late_init(void *handle)struct amdgpu_device *adev = (struct amdgpu_device *)handle;/* it's only intended for use in mes_self_test case, not for s0ix and reset */
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +1
-1- if (!amdgpu_in_reset(adev) && !adev->in_s0ix && + if (!amdgpu_in_reset(adev) && !adev->in_s0ix && !adev-Quoted 1 line
in_suspend&&drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +0
-1(adev->ip_versions[GC_HWIP][0] != IP_VERSION(11, 0, 3)))amdgpu_mes_self_test (adev); --2.37.3
Quoted 2 lines · Jack Xiao
Freeing memory was warned during suspend.
Move the self test out of suspend.
Thanks a lot, this fixes the following warning during suspend/resume on v6.2-rc8
WARNING: CPU: 2 PID: 3980 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xf5/0x110 [amdgpu]
Signature · 1 line
Jocelyn