summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLijo Lazar <lijo.lazar@amd.com>2020-11-28 17:31:08 +0800
committerAlex Deucher <alexander.deucher@amd.com>2021-03-23 22:56:17 -0400
commitf1adbe0367914e64065a5f00b04f555ae138f4ae (patch)
tree16b1b6d7073f05166e9a7620603a521e5b35aaa8
parent8738a82b37d32a816eb5874a65e218e7ef2a777a (diff)
drm/amd/pm: Add support to override pptable id for aldebaran
Temporarily force to use BU PPTable defined in VBIOS. Add support to override PPTable defined by module parameter.Add FW reported version to kernel log. Signed-off-by: Lijo Lazar <Lijo.Lazar@amd.com> Reviewed-by: Kenneth Feng <Kenneth.Feng@amd.com> Reviewed-by: Kevin Wang <kevin1.wang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 7589cfe86f54..e6c25a5814e8 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -216,6 +216,9 @@ int smu_v13_0_check_fw_version(struct smu_context *smu)
break;
}
+ dev_info(smu->adev->dev, "smu fw reported version = 0x%08x (%d.%d.%d)\n",
+ smu_version, smu_major, smu_minor, smu_debug);
+
/*
* 1. if_version mismatch is not critical as our fw is designed
* to be backward compatible.
@@ -273,8 +276,13 @@ int smu_v13_0_setup_pptable(struct smu_context *smu)
void *table;
uint16_t version_major, version_minor;
- /* temporarily hardcode */
- smu->smu_table.boot_values.pp_table_id = 3000;
+ /* temporarily hardcode to use vbios pptable */
+ smu->smu_table.boot_values.pp_table_id = 0;
+
+ if (amdgpu_smu_pptable_id >= 0) {
+ smu->smu_table.boot_values.pp_table_id = amdgpu_smu_pptable_id;
+ dev_info(adev->dev, "override pptable id %d\n", amdgpu_smu_pptable_id);
+ }
hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data;
version_major = le16_to_cpu(hdr->header.header_version_major);
@@ -564,6 +572,7 @@ int smu_v13_0_get_vbios_bootup_values(struct smu_context *smu)
return 0;
}
+
int smu_v13_0_notify_memory_pool_location(struct smu_context *smu)
{
struct smu_table_context *smu_table = &smu->smu_table;