[Patch v1 1/5] drm/amdgpu: always enable runtime power management

Alex Deucher alexdeucher at gmail.com
Tue Jan 28 20:14:29 UTC 2020


On Mon, Jan 27, 2020 at 8:30 PM Rajneesh Bhardwaj
<rajneesh.bhardwaj at amd.com> wrote:
>
> This allows runtime power management to kick in on amdgpu driver when
> the underlying hardware supports either BOCO or BACO. This can still be
> avoided if boot arg amdgpu.runpm = 0 is supplied.
>
>         BOCO: Bus Off, Chip Off
>         BACO: Bus Alive, Chip Off
>
> Signed-off-by: Rajneesh Bhardwaj <rajneesh.bhardwaj at amd.com>

This patch should be the last one in the series, otherwise we'll
enable runpm on BACO capable devices before the KFD code is in place.
Also, it's only supported on VI and newer asics, so we should use this
patch instead:
https://patchwork.freedesktop.org/patch/335402/

Alex

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 9 ++++-----
>  1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> index 3a0ea9096498..7958d508486e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
> @@ -169,11 +169,10 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
>                 goto out;
>         }
>
> -       if (amdgpu_device_supports_boco(dev) &&
> -           (amdgpu_runtime_pm != 0)) /* enable runpm by default */
> -               adev->runpm = true;
> -       else if (amdgpu_device_supports_baco(dev) &&
> -                (amdgpu_runtime_pm > 0)) /* enable runpm if runpm=1 */
> +       /* always enable runtime power management except when amdgpu.runpm=0 */
> +       if ((amdgpu_device_supports_boco(dev) ||
> +                       amdgpu_device_supports_baco(dev))
> +                       && (amdgpu_runtime_pm != 0))
>                 adev->runpm = true;
>
>         /* Call ACPI methods: require modeset init
> --
> 2.17.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