mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-11 13:03:51 -04:00
drm/amd/pm: add support for IP version 11.5.2
This initializes drm/amd/pm version 11.5.2 Signed-off-by: YING LI <yingli12@amd.com> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -694,6 +694,7 @@ static int smu_set_funcs(struct amdgpu_device *adev)
|
||||
renoir_set_ppt_funcs(smu);
|
||||
break;
|
||||
case IP_VERSION(11, 5, 0):
|
||||
case IP_VERSION(11, 5, 2):
|
||||
vangogh_set_ppt_funcs(smu);
|
||||
break;
|
||||
case IP_VERSION(13, 0, 1):
|
||||
@@ -1566,6 +1567,7 @@ static int smu_smc_hw_setup(struct smu_context *smu)
|
||||
case IP_VERSION(11, 0, 7):
|
||||
case IP_VERSION(11, 0, 11):
|
||||
case IP_VERSION(11, 5, 0):
|
||||
case IP_VERSION(11, 5, 2):
|
||||
case IP_VERSION(11, 0, 12):
|
||||
if (adev->in_suspend && smu_is_dpm_running(smu)) {
|
||||
dev_info(adev->dev, "dpm has been enabled\n");
|
||||
@@ -1919,6 +1921,7 @@ static int smu_disable_dpms(struct smu_context *smu)
|
||||
case IP_VERSION(11, 0, 7):
|
||||
case IP_VERSION(11, 0, 11):
|
||||
case IP_VERSION(11, 5, 0):
|
||||
case IP_VERSION(11, 5, 2):
|
||||
case IP_VERSION(11, 0, 12):
|
||||
case IP_VERSION(11, 0, 13):
|
||||
return 0;
|
||||
|
||||
@@ -227,6 +227,7 @@ int smu_v11_0_check_fw_version(struct smu_context *smu)
|
||||
smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_Navy_Flounder;
|
||||
break;
|
||||
case IP_VERSION(11, 5, 0):
|
||||
case IP_VERSION(11, 5, 2):
|
||||
smu->smc_driver_if_version = SMU11_DRIVER_IF_VERSION_VANGOGH;
|
||||
break;
|
||||
case IP_VERSION(11, 0, 12):
|
||||
@@ -471,10 +472,11 @@ int smu_v11_0_init_power(struct smu_context *smu)
|
||||
{
|
||||
struct amdgpu_device *adev = smu->adev;
|
||||
struct smu_power_context *smu_power = &smu->smu_power;
|
||||
size_t size = amdgpu_ip_version(adev, MP1_HWIP, 0) ==
|
||||
IP_VERSION(11, 5, 0) ?
|
||||
sizeof(struct smu_11_5_power_context) :
|
||||
sizeof(struct smu_11_0_power_context);
|
||||
u32 ip_version = amdgpu_ip_version(adev, MP1_HWIP, 0);
|
||||
size_t size = ((ip_version == IP_VERSION(11, 5, 0)) ||
|
||||
(ip_version == IP_VERSION(11, 5, 2))) ?
|
||||
sizeof(struct smu_11_5_power_context) :
|
||||
sizeof(struct smu_11_0_power_context);
|
||||
|
||||
smu_power->power_context = kzalloc(size, GFP_KERNEL);
|
||||
if (!smu_power->power_context)
|
||||
@@ -731,6 +733,7 @@ int smu_v11_0_init_display_count(struct smu_context *smu, uint32_t count)
|
||||
*/
|
||||
if (amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 0, 11) ||
|
||||
amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 0) ||
|
||||
amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 5, 2) ||
|
||||
amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 0, 12) ||
|
||||
amdgpu_ip_version(adev, MP1_HWIP, 0) == IP_VERSION(11, 0, 13))
|
||||
return 0;
|
||||
@@ -1110,6 +1113,7 @@ int smu_v11_0_gfx_off_control(struct smu_context *smu, bool enable)
|
||||
case IP_VERSION(11, 0, 12):
|
||||
case IP_VERSION(11, 0, 13):
|
||||
case IP_VERSION(11, 5, 0):
|
||||
case IP_VERSION(11, 5, 2):
|
||||
if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
|
||||
return 0;
|
||||
if (enable)
|
||||
|
||||
Reference in New Issue
Block a user