summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorYang Wang <kevinyang.wang@amd.com>2026-04-27 15:09:37 +0800
committerAlex Deucher <alexander.deucher@amd.com>2026-05-11 16:06:24 -0400
commit359cf7b42f87acc1ddd6b974fabe0ed6722f97ff (patch)
treecfebc23b39cea1e477ee8533191becbddfea5331 /drivers/gpu/drm
parente426674e908ec0ca600e4a41284cf267fd6b077b (diff)
drm/amd/pm: use the SMU multi-msgs helper in smu_v15_0
Convert the SMU15 table address messages to smu_cmn_send_smc_msg_with_params() so they use the common SMU multi-msgs helper instead of open-coding struct smu_msg_args. No functional change intended. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Kenneth Feng <kenneth.feng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c47
1 files changed, 21 insertions, 26 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
index c3cb36813806..cc3a265700a5 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0.c
@@ -589,52 +589,47 @@ int smu_v15_0_notify_memory_pool_location(struct smu_context *smu)
{
struct smu_table_context *smu_table = &smu->smu_table;
struct smu_table *memory_pool = &smu_table->memory_pool;
- struct smu_msg_args args = {
- .msg = SMU_MSG_DramLogSetDramAddr,
- .num_args = 3,
- .num_out_args = 0,
- };
+ uint32_t params[3];
if (memory_pool->size == 0 || memory_pool->cpu_addr == NULL)
return 0;
/* SMU_MSG_DramLogSetDramAddr: ARG0=low, ARG1=high, ARG2=size */
- args.args[0] = lower_32_bits(memory_pool->mc_address);
- args.args[1] = upper_32_bits(memory_pool->mc_address);
- args.args[2] = (u32)memory_pool->size;
-
- return smu->msg_ctl.ops->send_msg(&smu->msg_ctl, &args);
+ params[0] = lower_32_bits(memory_pool->mc_address);
+ params[1] = upper_32_bits(memory_pool->mc_address);
+ params[2] = (u32)memory_pool->size;
+
+ return smu_cmn_send_smc_msg_with_params(smu,
+ SMU_MSG_DramLogSetDramAddr,
+ params, ARRAY_SIZE(params),
+ NULL, 0);
}
int smu_v15_0_set_driver_table_location(struct smu_context *smu)
{
struct smu_table *driver_table = &smu->smu_table.driver_table;
- struct smu_msg_args args = {
- .msg = SMU_MSG_SetDriverDramAddr,
- .num_args = 2,
- .num_out_args = 0,
+ const uint32_t params[] = {
+ lower_32_bits(driver_table->mc_address),
+ upper_32_bits(driver_table->mc_address),
};
- args.args[0] = lower_32_bits(driver_table->mc_address);
- args.args[1] = upper_32_bits(driver_table->mc_address);
-
- return smu->msg_ctl.ops->send_msg(&smu->msg_ctl, &args);
+ return smu_cmn_send_smc_msg_with_params(smu, SMU_MSG_SetDriverDramAddr,
+ params, ARRAY_SIZE(params),
+ NULL, 0);
}
int smu_v15_0_set_tool_table_location(struct smu_context *smu)
{
struct smu_table *tool_table = &smu->smu_table.tables[SMU_TABLE_PMSTATUSLOG];
- struct smu_msg_args args = {
- .msg = SMU_MSG_SetToolsDramAddr,
- .num_args = 2,
- .num_out_args = 0,
+ const uint32_t params[] = {
+ lower_32_bits(tool_table->mc_address),
+ upper_32_bits(tool_table->mc_address),
};
/* SMU_MSG_SetToolsDramAddr: ARG0=low, ARG1=high */
- args.args[0] = lower_32_bits(tool_table->mc_address);
- args.args[1] = upper_32_bits(tool_table->mc_address);
-
- return smu->msg_ctl.ops->send_msg(&smu->msg_ctl, &args);
+ return smu_cmn_send_smc_msg_with_params(smu, SMU_MSG_SetToolsDramAddr,
+ params, ARRAY_SIZE(params),
+ NULL, 0);
}
int smu_v15_0_set_allowed_mask(struct smu_context *smu)