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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 4, 2022 at 12:17 AM Harsh Jain <harsh.jain@xxxxxxx> wrote:
>
> 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@xxxxxxx>
>
> 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;

I think we can leave this hunk.  The 0 delay is still fine even if if flush.

>                         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);
>                 }
>         } else {
>                 if (adev->gfx.gfx_off_req_count == 0) {
> --
> 2.25.1
>



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux