Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Fix is_dpm_running

Use multi args for get_enabled_mask to fix is_dpm_running

Signed-off-by: Pratik Vishwakarma <Pratik.Vishwakarma@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Pratik Vishwakarma and committed by
Alex Deucher
4d632161 f4011253

+26 -2
+26 -2
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_0_ppt.c
··· 479 479 return ret; 480 480 } 481 481 482 + static int smu_v15_0_0_get_enabled_mask(struct smu_context *smu, 483 + struct smu_feature_bits *feature_mask) 484 + { 485 + int ret; 486 + struct smu_msg_ctl *ctl = &smu->msg_ctl; 487 + 488 + if (!feature_mask) 489 + return -EINVAL; 490 + 491 + struct smu_msg_args args = { 492 + .msg = SMU_MSG_GetEnabledSmuFeatures, 493 + .num_args = 0, 494 + .num_out_args = 2, 495 + }; 496 + 497 + ret = ctl->ops->send_msg(ctl, &args); 498 + 499 + if (!ret) 500 + smu_feature_bits_from_arr32(feature_mask, args.out_args, 501 + SMU_FEATURE_NUM_DEFAULT); 502 + 503 + return ret; 504 + } 505 + 482 506 static bool smu_v15_0_0_is_dpm_running(struct smu_context *smu) 483 507 { 484 508 int ret = 0; 485 509 struct smu_feature_bits feature_enabled; 486 510 487 - ret = smu_cmn_get_enabled_mask(smu, &feature_enabled); 511 + ret = smu_v15_0_0_get_enabled_mask(smu, &feature_enabled); 488 512 489 513 if (ret) 490 514 return false; ··· 1380 1356 .is_dpm_running = smu_v15_0_0_is_dpm_running, 1381 1357 .set_watermarks_table = smu_v15_0_0_set_watermarks_table, 1382 1358 .get_gpu_metrics = smu_v15_0_0_get_gpu_metrics, 1383 - .get_enabled_mask = smu_cmn_get_enabled_mask, 1359 + .get_enabled_mask = smu_v15_0_0_get_enabled_mask, 1384 1360 .get_pp_feature_mask = smu_cmn_get_pp_feature_mask, 1385 1361 .set_driver_table_location = smu_v15_0_set_driver_table_location, 1386 1362 .gfx_off_control = smu_v15_0_gfx_off_control,