@@ -1423,9 +1423,11 @@ static void soc15_common_get_clockgating_state(void *handle, u64 *flags)
1423
1423
if (amdgpu_sriov_vf (adev ))
1424
1424
* flags = 0 ;
1425
1425
1426
- adev -> nbio .funcs -> get_clockgating_state (adev , flags );
1426
+ if (adev -> nbio .funcs && adev -> nbio .funcs -> get_clockgating_state )
1427
+ adev -> nbio .funcs -> get_clockgating_state (adev , flags );
1427
1428
1428
- adev -> hdp .funcs -> get_clock_gating_state (adev , flags );
1429
+ if (adev -> hdp .funcs && adev -> hdp .funcs -> get_clock_gating_state )
1430
+ adev -> hdp .funcs -> get_clock_gating_state (adev , flags );
1429
1431
1430
1432
if (amdgpu_ip_version (adev , MP0_HWIP , 0 ) != IP_VERSION (13 , 0 , 2 )) {
1431
1433
/* AMD_CG_SUPPORT_DRM_MGCG */
@@ -1440,9 +1442,11 @@ static void soc15_common_get_clockgating_state(void *handle, u64 *flags)
1440
1442
}
1441
1443
1442
1444
/* AMD_CG_SUPPORT_ROM_MGCG */
1443
- adev -> smuio .funcs -> get_clock_gating_state (adev , flags );
1445
+ if (adev -> smuio .funcs && adev -> smuio .funcs -> get_clock_gating_state )
1446
+ adev -> smuio .funcs -> get_clock_gating_state (adev , flags );
1444
1447
1445
- adev -> df .funcs -> get_clockgating_state (adev , flags );
1448
+ if (adev -> df .funcs && adev -> df .funcs -> get_clockgating_state )
1449
+ adev -> df .funcs -> get_clockgating_state (adev , flags );
1446
1450
}
1447
1451
1448
1452
static int soc15_common_set_powergating_state (void * handle ,
0 commit comments