File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
drivers/gpu/drm/amd/powerplay/hwmgr Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -3478,18 +3478,31 @@ static int smu7_get_pp_table_entry(struct pp_hwmgr *hwmgr,
3478
3478
3479
3479
static int smu7_get_gpu_power (struct pp_hwmgr * hwmgr , u32 * query )
3480
3480
{
3481
+ struct amdgpu_device * adev = hwmgr -> adev ;
3481
3482
int i ;
3482
3483
u32 tmp = 0 ;
3483
3484
3484
3485
if (!query )
3485
3486
return - EINVAL ;
3486
3487
3487
- smum_send_msg_to_smc_with_parameter (hwmgr , PPSMC_MSG_GetCurrPkgPwr , 0 );
3488
- tmp = cgs_read_register (hwmgr -> device , mmSMC_MSG_ARG_0 );
3489
- * query = tmp ;
3488
+ /*
3489
+ * PPSMC_MSG_GetCurrPkgPwr is not supported on:
3490
+ * - Hawaii
3491
+ * - Bonaire
3492
+ * - Fiji
3493
+ * - Tonga
3494
+ */
3495
+ if ((adev -> asic_type != CHIP_HAWAII ) &&
3496
+ (adev -> asic_type != CHIP_BONAIRE ) &&
3497
+ (adev -> asic_type != CHIP_FIJI ) &&
3498
+ (adev -> asic_type != CHIP_TONGA )) {
3499
+ smum_send_msg_to_smc_with_parameter (hwmgr , PPSMC_MSG_GetCurrPkgPwr , 0 );
3500
+ tmp = cgs_read_register (hwmgr -> device , mmSMC_MSG_ARG_0 );
3501
+ * query = tmp ;
3490
3502
3491
- if (tmp != 0 )
3492
- return 0 ;
3503
+ if (tmp != 0 )
3504
+ return 0 ;
3505
+ }
3493
3506
3494
3507
smum_send_msg_to_smc (hwmgr , PPSMC_MSG_PmStatusLogStart );
3495
3508
cgs_write_ind_register (hwmgr -> device , CGS_IND_REG__SMC ,
You can’t perform that action at this time.
0 commit comments