[PATCH 09/10] drm/amd/powerplay: add vega12 SMU gfxoff support

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

 



On Thu, Jul 05, 2018 at 05:09:34PM +0800, Evan Quan wrote:
> Export apis for enabling/disabling SMU gfxoff support.
> 
> Change-Id: Idcea1db9f3dbe15edda1b76e1ff05435865af2a1
> Signed-off-by: Evan Quan <evan.quan at amd.com>

Reviewed-by: Huang Rui <ray.huang at amd.com>

> ---
>  .../drm/amd/powerplay/hwmgr/vega12_hwmgr.c    | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
> index 57492878874f..8efa983c41de 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c
> @@ -2329,6 +2329,24 @@ static int vega12_get_thermal_temperature_range(struct pp_hwmgr *hwmgr,
>  	return 0;
>  }
>  
> +static int vega12_enable_gfx_off(struct pp_hwmgr *hwmgr)
> +{
> +	return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_AllowGfxOff);
> +}
> +
> +static int vega12_disable_gfx_off(struct pp_hwmgr *hwmgr)
> +{
> +	return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_DisallowGfxOff);
> +}
> +
> +static int vega12_gfx_off_control(struct pp_hwmgr *hwmgr, bool enable)
> +{
> +	if (enable)
> +		return vega12_enable_gfx_off(hwmgr);
> +	else
> +		return vega12_disable_gfx_off(hwmgr);
> +}
> +
>  static const struct pp_hwmgr_func vega12_hwmgr_funcs = {
>  	.backend_init = vega12_hwmgr_backend_init,
>  	.backend_fini = vega12_hwmgr_backend_fini,
> @@ -2378,6 +2396,7 @@ static const struct pp_hwmgr_func vega12_hwmgr_funcs = {
>  	.get_thermal_temperature_range = vega12_get_thermal_temperature_range,
>  	.register_irq_handlers = smu9_register_irq_handlers,
>  	.start_thermal_controller = vega12_start_thermal_controller,
> +	.gfx_off_control = vega12_gfx_off_control,
>  };
>  
>  int vega12_hwmgr_init(struct pp_hwmgr *hwmgr)
> -- 
> 2.18.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux