[PATCH 1/3] drm/amdgpu: add mmhub powergating set by smu

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

 



Yes. SMU only provides enabling message.

Thanks,
Eric

On 2018-02-06 03:50 PM, Deucher, Alexander wrote:
>> -----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 1/3] drm/amdgpu: add mmhub powergating set by smu
>>
>> PSP will disable legacy mmhub PG setting that is programming registers, and
>> drive will use SMC message to set it up.
> Split this into two patches, one to add the new dpm interface, and one to add the change to mmhub_v1_0.c.  I guess presumably there's no way to disable it once it's been enabled?
>
> With the above addressed:
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
>
>> Signed-off-by: Eric Huang <JinHuiEric.Huang at amd.com>
>> ---
>>   drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h        | 4 ++++
>>   drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c        | 3 +++
>>   drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +
>>   3 files changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
>> index c489c69..bd745a4 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h
>> @@ -375,6 +375,10 @@ enum amdgpu_pcie_gen {
>>   		((adev)->powerplay.pp_funcs->odn_edit_dpm_table(\
>>   			(adev)->powerplay.pp_handle, type, parameter,
>> size))
>>
>> +#define amdgpu_dpm_set_mmhub_powergating_by_smu(adev) \
>> +		((adev)->powerplay.pp_funcs-
>>> set_mmhub_powergating_by_smu( \
>> +		(adev)->powerplay.pp_handle))
>> +
>>   struct amdgpu_dpm {
>>   	struct amdgpu_ps        *ps;
>>   	/* number of valid power states */
>> diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
>> b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
>> index 82f8bc8..d0ade9f 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c
>> @@ -471,6 +471,9 @@ void mmhub_v1_0_update_power_gating(struct
>> amdgpu_device *adev,
>>
>> 	RENG_EXECUTE_ON_REG_UPDATE, 1);
>>   		WREG32_SOC15(MMHUB, 0, mmPCTL1_RENG_EXECUTE,
>> pctl1_reng_execute);
>>
>> +		if (adev->powerplay.pp_funcs-
>>> set_mmhub_powergating_by_smu)
>> +
>> 	amdgpu_dpm_set_mmhub_powergating_by_smu(adev);
>> +
>>   	} else {
>>   		pctl0_reng_execute = REG_SET_FIELD(pctl0_reng_execute,
>>   						PCTL0_RENG_EXECUTE,
>> diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> index 1fc995b..4f69fe8 100644
>> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h
>> @@ -310,6 +310,7 @@ struct amd_pm_funcs {
>>   	int (*get_power_profile_mode)(void *handle, char *buf);
>>   	int (*set_power_profile_mode)(void *handle, long *input, uint32_t
>> size);
>>   	int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input,
>> uint32_t size);
>> +	int (*set_mmhub_powergating_by_smu)(void *handle);
>>   };
>>
>>   #endif
>> --
>> 2.7.4
>>
>> _______________________________________________
>> 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