[PATCH 2/2] drm/amdgpu: Power down acp if board uses AZ

Zhu, Rex Rex.Zhu at amd.com
Thu Jul 19 15:14:43 UTC 2018


>We also need to power it back up in hw_fini and suspend and then power
>it back down in resume.

Yes, this logic will be added in acp block.
In this patch, we only power down acp when it was not used and have no inpact wen s3.

Best Regards
Rex

________________________________
From: Alex Deucher <alexdeucher at gmail.com>
Sent: Thursday, July 19, 2018 9:56 PM
To: Zhu, Rex
Cc: amd-gfx list
Subject: Re: [PATCH 2/2] drm/amdgpu: Power down acp if board uses AZ

On Thu, Jul 19, 2018 at 4:46 AM, Rex Zhu <rex.zhu at amd.com> wrote:
> if board uses AZ rather than ACP, we power down acp
> through smu to save power.
>

We also need to power it back up in hw_fini and suspend and then power
it back down in resume.

Alex

> Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> index 71efcf3..4e18a88 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
> @@ -35,6 +35,7 @@
>
>  #include "acp_gfx_if.h"
>
> +
>  #define ACP_TILE_ON_MASK                       0x03
>  #define ACP_TILE_OFF_MASK                      0x02
>  #define ACP_TILE_ON_RETAIN_REG_MASK            0x1f
> @@ -289,11 +290,12 @@ static int acp_hw_init(void *handle)
>         r = amd_acp_hw_init(adev->acp.cgs_device,
>                             ip_block->version->major, ip_block->version->minor);
>         /* -ENODEV means board uses AZ rather than ACP */
> -       if (r == -ENODEV)
> +       if (r == -ENODEV) {
> +               amdgpu_dpm_set_powergating_by_smu(adev, AMD_IP_BLOCK_TYPE_ACP, true);
>                 return 0;
> -       else if (r)
> +       } else if (r) {
>                 return r;
> -
> +       }
>         if (adev->rmmio_size == 0 || adev->rmmio_size < 0x5289)
>                 return -EINVAL;
>
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
amd-gfx Info Page - freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
lists.freedesktop.org
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180719/a07ed2c0/attachment-0001.html>


More information about the amd-gfx mailing list