Re: [PATCH] drm/amdgpu: delete duplicate condition in gfx_v11_0_soft_reset()

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

 



Applied.  Thanks!

Alex

On Mon, May 30, 2022 at 7:42 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote:
>
> We know that "grbm_soft_reset" is true because we're already inside an
> if (grbm_soft_reset) condition.  No need to test again.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 24 +++++++++++-------------
>  1 file changed, 11 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> index 8c0a3fc7aaa6..4bca63a346b4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c
> @@ -4780,19 +4780,17 @@ static int gfx_v11_0_soft_reset(void *handle)
>                 /* Disable MEC parsing/prefetching */
>                 gfx_v11_0_cp_compute_enable(adev, false);
>
> -               if (grbm_soft_reset) {
> -                       tmp = RREG32_SOC15(GC, 0, regGRBM_SOFT_RESET);
> -                       tmp |= grbm_soft_reset;
> -                       dev_info(adev->dev, "GRBM_SOFT_RESET=0x%08X\n", tmp);
> -                       WREG32_SOC15(GC, 0, regGRBM_SOFT_RESET, tmp);
> -                       tmp = RREG32_SOC15(GC, 0, regGRBM_SOFT_RESET);
> -
> -                       udelay(50);
> -
> -                       tmp &= ~grbm_soft_reset;
> -                       WREG32_SOC15(GC, 0, regGRBM_SOFT_RESET, tmp);
> -                       tmp = RREG32_SOC15(GC, 0, regGRBM_SOFT_RESET);
> -               }
> +               tmp = RREG32_SOC15(GC, 0, regGRBM_SOFT_RESET);
> +               tmp |= grbm_soft_reset;
> +               dev_info(adev->dev, "GRBM_SOFT_RESET=0x%08X\n", tmp);
> +               WREG32_SOC15(GC, 0, regGRBM_SOFT_RESET, tmp);
> +               tmp = RREG32_SOC15(GC, 0, regGRBM_SOFT_RESET);
> +
> +               udelay(50);
> +
> +               tmp &= ~grbm_soft_reset;
> +               WREG32_SOC15(GC, 0, regGRBM_SOFT_RESET, tmp);
> +               tmp = RREG32_SOC15(GC, 0, regGRBM_SOFT_RESET);
>
>                 /* Wait a little for things to settle down */
>                 udelay(50);
> --
> 2.35.1
>



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux