[PATCH] drm/amd/powerplay: implemnent force dpm level on Vega10.
Michel Dänzer
michel at daenzer.net
Tue Mar 28 01:23:36 UTC 2017
On 27/03/17 11:18 PM, Rex Zhu wrote:
This doesn't match the coding style.
> @@ -3393,16 +3393,31 @@ static int vega10_upload_dpm_bootup_level(struct pp_hwmgr *hwmgr)
>
> if (!data->registry_data.sclk_dpm_key_disabled) {
> if (data->smc_state_table.gfx_boot_level !=
> - data->dpm_table.gfx_table.dpm_state.soft_min_level)
> + data->dpm_table.gfx_table.dpm_state.soft_min_level) {
This line needs to line up with the opening parenthesis (2 tabs and 4
spaces of indentation).
> + PP_ASSERT_WITH_CODE(!smum_send_msg_to_smc_with_parameter(
This line needs 3 tabs of indentation.
> + hwmgr->smumgr,
> + PPSMC_MSG_SetSoftMinGfxclkByIndex,
> + data->smc_state_table.gfx_boot_level),
> + "Failed to set soft min sclk index!",
> + return -EINVAL);
These lines need to line up with opening parentheses. Assigning the
return value smum_send_msg_to_smc_with_parameter to a local variable
might allow making this cleaner.
> @@ -3463,6 +3491,12 @@ static int vega10_generate_dpm_level_enable_mask(
> PP_ASSERT_WITH_CODE(!vega10_upload_dpm_max_level(hwmgr),
> "Attempt to upload DPM Max Levels Failed!",
> return -1);
> + for(i = data->smc_state_table.gfx_boot_level; i < data->smc_state_table.gfx_max_level; i++)
> + data->dpm_table.gfx_table.dpm_levels[i].enabled = true;
> +
> +
> + for(i = data->smc_state_table.mem_boot_level; i < data->smc_state_table.mem_max_level; i++)
> + data->dpm_table.mem_table.dpm_levels[i].enabled = true;
Missing space between "for" and opening parentheses.
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the amd-gfx
mailing list