Commit e3f38248 authored by Evan Quan's avatar Evan Quan Committed by Alex Deucher

drm/amd/pm: fix some OEM SKU specific stability issues

Add a quirk in sienna_cichlid_ppt.c to fix some OEM SKU
specific stability issues.
Signed-off-by: default avatarEvan Quan <evan.quan@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent f626dd0f
...@@ -421,6 +421,36 @@ static int sienna_cichlid_store_powerplay_table(struct smu_context *smu) ...@@ -421,6 +421,36 @@ static int sienna_cichlid_store_powerplay_table(struct smu_context *smu)
return 0; return 0;
} }
static int sienna_cichlid_patch_pptable_quirk(struct smu_context *smu)
{
struct amdgpu_device *adev = smu->adev;
uint32_t *board_reserved;
uint16_t *freq_table_gfx;
uint32_t i;
/* Fix some OEM SKU specific stability issues */
GET_PPTABLE_MEMBER(BoardReserved, &board_reserved);
if ((adev->pdev->device == 0x73DF) &&
(adev->pdev->revision == 0XC3) &&
(adev->pdev->subsystem_device == 0x16C2) &&
(adev->pdev->subsystem_vendor == 0x1043))
board_reserved[0] = 1387;
GET_PPTABLE_MEMBER(FreqTableGfx, &freq_table_gfx);
if ((adev->pdev->device == 0x73DF) &&
(adev->pdev->revision == 0XC3) &&
((adev->pdev->subsystem_device == 0x16C2) ||
(adev->pdev->subsystem_device == 0x133C)) &&
(adev->pdev->subsystem_vendor == 0x1043)) {
for (i = 0; i < NUM_GFXCLK_DPM_LEVELS; i++) {
if (freq_table_gfx[i] > 2500)
freq_table_gfx[i] = 2500;
}
}
return 0;
}
static int sienna_cichlid_setup_pptable(struct smu_context *smu) static int sienna_cichlid_setup_pptable(struct smu_context *smu)
{ {
int ret = 0; int ret = 0;
...@@ -441,7 +471,7 @@ static int sienna_cichlid_setup_pptable(struct smu_context *smu) ...@@ -441,7 +471,7 @@ static int sienna_cichlid_setup_pptable(struct smu_context *smu)
if (ret) if (ret)
return ret; return ret;
return ret; return sienna_cichlid_patch_pptable_quirk(smu);
} }
static int sienna_cichlid_tables_init(struct smu_context *smu) static int sienna_cichlid_tables_init(struct smu_context *smu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment