@@ -457,8 +457,8 @@ int xe_guc_pc_get_cur_freq(struct xe_guc_pc *pc, u32 *freq)
457
457
* GuC SLPC plays with cur freq request when GuCRC is enabled
458
458
* Block RC6 for a more reliable read.
459
459
*/
460
- fw_ref = xe_force_wake_get (gt_to_fw (gt ), XE_FORCEWAKE_ALL );
461
- if (!xe_force_wake_ref_has_domain (fw_ref , XE_FORCEWAKE_ALL )) {
460
+ fw_ref = xe_force_wake_get (gt_to_fw (gt ), XE_FW_GT );
461
+ if (!xe_force_wake_ref_has_domain (fw_ref , XE_FW_GT )) {
462
462
xe_force_wake_put (gt_to_fw (gt ), fw_ref );
463
463
return - ETIMEDOUT ;
464
464
}
@@ -530,35 +530,23 @@ u32 xe_guc_pc_get_rpn_freq(struct xe_guc_pc *pc)
530
530
*/
531
531
int xe_guc_pc_get_min_freq (struct xe_guc_pc * pc , u32 * freq )
532
532
{
533
- struct xe_gt * gt = pc_to_gt (pc );
534
- unsigned int fw_ref ;
535
533
int ret ;
536
534
535
+ xe_device_assert_mem_access (pc_to_xe (pc ));
536
+
537
537
mutex_lock (& pc -> freq_lock );
538
538
if (!pc -> freq_ready ) {
539
539
/* Might be in the middle of a gt reset */
540
540
ret = - EAGAIN ;
541
541
goto out ;
542
542
}
543
543
544
- /*
545
- * GuC SLPC plays with min freq request when GuCRC is enabled
546
- * Block RC6 for a more reliable read.
547
- */
548
- fw_ref = xe_force_wake_get (gt_to_fw (gt ), XE_FORCEWAKE_ALL );
549
- if (!xe_force_wake_ref_has_domain (fw_ref , XE_FORCEWAKE_ALL )) {
550
- ret = - ETIMEDOUT ;
551
- goto fw ;
552
- }
553
-
554
544
ret = pc_action_query_task_state (pc );
555
545
if (ret )
556
- goto fw ;
546
+ goto out ;
557
547
558
548
* freq = pc_get_min_freq (pc );
559
549
560
- fw :
561
- xe_force_wake_put (gt_to_fw (gt ), fw_ref );
562
550
out :
563
551
mutex_unlock (& pc -> freq_lock );
564
552
return ret ;
@@ -1018,8 +1006,8 @@ int xe_guc_pc_start(struct xe_guc_pc *pc)
1018
1006
1019
1007
xe_gt_assert (gt , xe_device_uc_enabled (xe ));
1020
1008
1021
- fw_ref = xe_force_wake_get (gt_to_fw (gt ), XE_FORCEWAKE_ALL );
1022
- if (!xe_force_wake_ref_has_domain (fw_ref , XE_FORCEWAKE_ALL )) {
1009
+ fw_ref = xe_force_wake_get (gt_to_fw (gt ), XE_FW_GT );
1010
+ if (!xe_force_wake_ref_has_domain (fw_ref , XE_FW_GT )) {
1023
1011
xe_force_wake_put (gt_to_fw (gt ), fw_ref );
1024
1012
return - ETIMEDOUT ;
1025
1013
}
0 commit comments