[PATCH 2/3] drm/amd/powerplay: add mmhub powergating by smu in powerplay

Deucher, Alexander Alexander.Deucher at amd.com
Tue Feb 6 20:54:54 UTC 2018


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Eric Huang
> Sent: Tuesday, February 6, 2018 3:41 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Huang, JinHuiEric <JinHuiEric.Huang at amd.com>
> Subject: [PATCH 2/3] drm/amd/powerplay: add mmhub powergating by smu
> in powerplay
> 
> Signed-off-by: Eric Huang <JinHuiEric.Huang at amd.com>

Please add a basic patch description.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>


> ---
>  drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 22
> ++++++++++++++++++++++
>  drivers/gpu/drm/amd/powerplay/inc/hwmgr.h     |  1 +
>  2 files changed, 23 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> index c571f8e..7c4b88a 100644
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
> @@ -1475,6 +1475,27 @@ static int
> pp_get_display_mode_validation_clocks(void *handle,
>  	return ret;
>  }
> 
> +static int pp_set_mmhub_powergating_by_smu(void *handle) {
> +	struct pp_hwmgr *hwmgr;
> +	struct pp_instance *pp_handle = (struct pp_instance *)handle;
> +	int ret = 0;
> +
> +	ret = pp_check(pp_handle);
> +
> +	if (ret)
> +		return ret;
> +
> +	hwmgr = pp_handle->hwmgr;
> +
> +	if (hwmgr->hwmgr_func->set_mmhub_powergating_by_smu ==
> NULL) {
> +		pr_info("%s was not implemented.\n", __func__);
> +		return 0;
> +	}
> +
> +	return hwmgr->hwmgr_func-
> >set_mmhub_powergating_by_smu(hwmgr);
> +}
> +
>  const struct amd_pm_funcs pp_dpm_funcs = {
>  	.load_firmware = pp_dpm_load_fw,
>  	.wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,
> @@ -1521,4 +1542,5 @@ const struct amd_pm_funcs pp_dpm_funcs = {
>  	.set_watermarks_for_clocks_ranges =
> pp_set_watermarks_for_clocks_ranges,
>  	.display_clock_voltage_request =
> pp_display_clock_voltage_request,
>  	.get_display_mode_validation_clocks =
> pp_get_display_mode_validation_clocks,
> +	.set_mmhub_powergating_by_smu =
> pp_set_mmhub_powergating_by_smu,
>  };
> diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> index 5512dc2..47a1083 100644
> --- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> +++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
> @@ -347,6 +347,7 @@ struct pp_hwmgr_func {
>  	int (*odn_edit_dpm_table)(struct pp_hwmgr *hwmgr,
>  					enum
> PP_OD_DPM_TABLE_COMMAND type,
>  					long *input, uint32_t size);
> +	int (*set_mmhub_powergating_by_smu)(struct pp_hwmgr
> *hwmgr);
>  };
> 
>  struct pp_table_func {
> --
> 2.7.4
> 
> _______________________________________________
> 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