[PATCH] drm/amdgpu: wait till Gfxoff allow signal completes during suspend

Quan, Evan Evan.Quan at amd.com
Fri Nov 4 08:00:55 UTC 2022


[AMD Official Use Only - General]



> -----Original Message-----
> From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of
> Harsh Jain
> Sent: Friday, November 4, 2022 12:17 PM
> To: Deucher, Alexander <Alexander.Deucher at amd.com>
> Cc: Jain, Harsh <Harsh.Jain at amd.com>; amd-gfx at lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu: wait till Gfxoff allow signal completes during
> suspend
> 
> change guarantees that gfxoff is allowed before moving further in
> s2idle sequence to add more reliablity about gfxoff in amdgpu IP's
> suspend flow
> 
> Signed-off-by: Harsh Jain <harsh.jain at amd.com>
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index 222d3d7ea076..5b2afe348c23 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -581,11 +581,11 @@ void amdgpu_gfx_off_ctrl(struct amdgpu_device
> *adev, bool enable)
> 
>  		if (adev->gfx.gfx_off_req_count == 0 &&
>  		    !adev->gfx.gfx_off_state) {
> -			/* If going to s2idle, no need to wait */
> -			if (adev->in_s0ix)
> -				delay = GFX_OFF_NO_DELAY;
>  			schedule_delayed_work(&adev-
> >gfx.gfx_off_delay_work,
>  					      delay);
> +			/* If going to s2idle, no need to wait */
> +			if (adev->in_s0ix)
> +				flush_delayed_work(&adev-
> >gfx.gfx_off_delay_work);
[Quan, Evan] This seems a little weird. Can you just call amdgpu_device_delay_enable_gfx_off directly for s0ix case?

Evan
>  		}
>  	} else {
>  		if (adev->gfx.gfx_off_req_count == 0) {
> --
> 2.25.1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: winmail.dat
Type: application/ms-tnef
Size: 16103 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20221104/1945eeec/attachment-0001.bin>


More information about the amd-gfx mailing list