RE: [PATCH 2/3] drm/amdgpu: Power up uvd block when hw_fini

2018-08-23 Thread Zhu, Rex


> -Original Message-
> From: amd-gfx  On Behalf Of
> Michel Dänzer
> Sent: Thursday, August 23, 2018 6:58 PM
> To: Zhu, Rex 
> Cc: amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH 2/3] drm/amdgpu: Power up uvd block when hw_fini
> 
> On 2018-08-23 11:24 a.m., Rex Zhu wrote:
> > when hw_fini/suspend, smu only need to power up uvd block if uvd pg is
> > supported, don't need to call vce to do hw_init.
> 
> Do you really mean VCE here, not UVD?

Yes, thanks for reminding me.


> > diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> > b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> > index a713c8b..8f625d6 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> > @@ -65,7 +65,6 @@ static int kv_set_thermal_temperature_range(struct
> amdgpu_device *adev,
> > int min_temp, int max_temp);
> static int
> > kv_init_fps_limits(struct amdgpu_device *adev);
> >
> > -static void kv_dpm_powergate_uvd(void *handle, bool gate);  static
> > void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate);
> > static void kv_dpm_powergate_acp(struct amdgpu_device *adev, bool
> > gate);
> >
> > @@ -1390,7 +1389,8 @@ static void kv_dpm_disable(struct
> amdgpu_device *adev)
> > kv_dpm_powergate_samu(adev, false);
> > if (pi->caps_vce_pg) /* power on the VCE block */
> > amdgpu_kv_notify_message_to_smu(adev,
> PPSMC_MSG_VCEPowerON);
> > -   kv_dpm_powergate_uvd(adev, false);
> > +   if (pi->caps_uvd_pg) /* power off the UVD block */
> > +   amdgpu_kv_notify_message_to_smu(adev,
> PPSMC_MSG_UVDPowerON);
> 
> The comment should say "power on", shouldn't it?

Maybe. For keep consistent with the smu message.
Will change the comment in v2.

Thanks.
rex


> --
> Earthling Michel Dänzer   |   http://www.amd.com
> Libre software enthusiast | Mesa and X developer
> ___
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx


Re: [PATCH 2/3] drm/amdgpu: Power up uvd block when hw_fini

2018-08-23 Thread Michel Dänzer
On 2018-08-23 11:24 a.m., Rex Zhu wrote:
> when hw_fini/suspend, smu only need to power up uvd block
> if uvd pg is supported, don't need to call vce to do hw_init.

Do you really mean VCE here, not UVD?


> diff --git a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c 
> b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> index a713c8b..8f625d6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/kv_dpm.c
> @@ -65,7 +65,6 @@ static int kv_set_thermal_temperature_range(struct 
> amdgpu_device *adev,
>   int min_temp, int max_temp);
>  static int kv_init_fps_limits(struct amdgpu_device *adev);
>  
> -static void kv_dpm_powergate_uvd(void *handle, bool gate);
>  static void kv_dpm_powergate_samu(struct amdgpu_device *adev, bool gate);
>  static void kv_dpm_powergate_acp(struct amdgpu_device *adev, bool gate);
>  
> @@ -1390,7 +1389,8 @@ static void kv_dpm_disable(struct amdgpu_device *adev)
>   kv_dpm_powergate_samu(adev, false);
>   if (pi->caps_vce_pg) /* power on the VCE block */
>   amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_VCEPowerON);
> - kv_dpm_powergate_uvd(adev, false);
> + if (pi->caps_uvd_pg) /* power off the UVD block */
> + amdgpu_kv_notify_message_to_smu(adev, PPSMC_MSG_UVDPowerON);

The comment should say "power on", shouldn't it?


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx