RE: Patch "drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series" has been added to the 5.15-stable tree

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

 



[Public]

> -----Original Message-----
> From: Sasha Levin <sashal@xxxxxxxxxx>
> Sent: Monday, March 18, 2024 7:08 PM
> To: stable-commits@xxxxxxxxxxxxxxx; Liang, Prike <Prike.Liang@xxxxxxx>
> Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx>; Koenig, Christian
> <Christian.Koenig@xxxxxxx>; Pan, Xinhui <Xinhui.Pan@xxxxxxx>; David
> Airlie <airlied@xxxxxxxxx>; Daniel Vetter <daniel@xxxxxxxx>
> Subject: Patch "drm/amdgpu: Enable gpu reset for S3 abort cases on Raven
> series" has been added to the 5.15-stable tree
>
> This is a note to let you know that I've just added the patch titled
>
>     drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series
>
> to the 5.15-stable tree which can be found at:
>     http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-
> queue.git;a=summary
>
> The filename of the patch is:
>      drm-amdgpu-enable-gpu-reset-for-s3-abort-cases-on-ra.patch
> and it can be found in the queue-5.15 subdirectory.
>
> If you, or anyone else, feels it should not be added to the stable tree, please let
> <stable@xxxxxxxxxxxxxxx> know about it.
>

Per Prike's previous feedback, I don't think we want this in stable until it's gotten more validation with the state of the older code.

Alex


>
>
> commit 8523d794b66b9497ac922c44614881c62cca8116
> Author: Prike Liang <Prike.Liang@xxxxxxx>
> Date:   Thu Feb 22 20:56:59 2024 +0800
>
>     drm/amdgpu: Enable gpu reset for S3 abort cases on Raven series
>
>     [ Upstream commit c671ec01311b4744b377f98b0b4c6d033fe569b3 ]
>
>     Currently, GPU resets can now be performed successfully on the Raven
>     series. While GPU reset is required for the S3 suspend abort case.
>     So now can enable gpu reset for S3 abort cases on the Raven series.
>
>     Signed-off-by: Prike Liang <Prike.Liang@xxxxxxx>
>     Acked-by: Alex Deucher <alexander.deucher@xxxxxxx>
>     Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
>     Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
> b/drivers/gpu/drm/amd/amdgpu/soc15.c
> index 6a3486f52d698..ef5b3eedc8615 100644
> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
> @@ -605,11 +605,34 @@ soc15_asic_reset_method(struct amdgpu_device
> *adev)
>               return AMD_RESET_METHOD_MODE1;
>  }
>
> +static bool soc15_need_reset_on_resume(struct amdgpu_device *adev) {
> +     u32 sol_reg;
> +
> +     sol_reg = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_81);
> +
> +     /* Will reset for the following suspend abort cases.
> +      * 1) Only reset limit on APU side, dGPU hasn't checked yet.
> +      * 2) S3 suspend abort and TOS already launched.
> +      */
> +     if (adev->flags & AMD_IS_APU && adev->in_s3 &&
> +                     !adev->suspend_complete &&
> +                     sol_reg)
> +             return true;
> +
> +     return false;
> +}
> +
>  static int soc15_asic_reset(struct amdgpu_device *adev)  {
>       /* original raven doesn't have full asic reset */
> -     if ((adev->apu_flags & AMD_APU_IS_RAVEN) ||
> -         (adev->apu_flags & AMD_APU_IS_RAVEN2))
> +     /* On the latest Raven, the GPU reset can be performed
> +      * successfully. So now, temporarily enable it for the
> +      * S3 suspend abort case.
> +      */
> +     if (((adev->apu_flags & AMD_APU_IS_RAVEN) ||
> +         (adev->apu_flags & AMD_APU_IS_RAVEN2)) &&
> +             !soc15_need_reset_on_resume(adev))
>               return 0;
>
>       switch (soc15_asic_reset_method(adev)) { @@ -1490,24 +1513,6
> @@ static int soc15_common_suspend(void *handle)
>       return soc15_common_hw_fini(adev);
>  }
>
> -static bool soc15_need_reset_on_resume(struct amdgpu_device *adev) -{
> -     u32 sol_reg;
> -
> -     sol_reg = RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_81);
> -
> -     /* Will reset for the following suspend abort cases.
> -      * 1) Only reset limit on APU side, dGPU hasn't checked yet.
> -      * 2) S3 suspend abort and TOS already launched.
> -      */
> -     if (adev->flags & AMD_IS_APU && adev->in_s3 &&
> -                     !adev->suspend_complete &&
> -                     sol_reg)
> -             return true;
> -
> -     return false;
> -}
> -
>  static int soc15_common_resume(void *handle)  {
>       struct amdgpu_device *adev = (struct amdgpu_device *)handle;





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux