[PATCH 3/3] drm/amdgpu: set Vega20 LBPW as disabled at default

Alex Deucher alexdeucher at gmail.com
Wed Nov 7 14:30:51 UTC 2018


On Tue, Nov 6, 2018 at 8:37 PM Evan Quan <evan.quan at amd.com> wrote:
>
> For Vega20, LBPW feature is disabled at default.
>
> Change-Id: I184520cbb03ab8cba9321cd94d1deb0ce38b7e17
> Signed-off-by: Evan Quan <evan.quan at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index dcf1f79ab347..5bb0cca5b71f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -2503,6 +2503,20 @@ static int gfx_v9_0_rlc_resume(struct amdgpu_device *adev)
>                         return r;
>         }
>
> +       if (amdgpu_lbpw == -1) {
> +               switch (adev->asic_type) {
> +               case CHIP_RAVEN:
> +                       amdgpu_lbpw = 1;
> +                       break;
> +               case CHIP_VEGA20:
> +                       amdgpu_lbpw = 0;
> +                       break;
> +               default:
> +                       amdgpu_lbpw = 0;
> +                       break;
> +               }
> +       }

I'd suggest using a local variable rather than changing the global one
since there may be multiple GPUs in the system.

Alex

> +
>         if (adev->asic_type == CHIP_RAVEN ||
>             adev->asic_type == CHIP_VEGA20) {
>                 if (amdgpu_lbpw != 0)
> --
> 2.19.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list