[Intel-xe] [PATCH] drm/xe: Check skip_guc_pc before disabling gucrc
Vinay Belgaumkar
vinay.belgaumkar at intel.com
Fri Dec 1 20:33:44 UTC 2023
Also, use the new C6 helper instead of duplicating that code.
Fixes: ff1db4de1e40 ("drm/xe: Manually setup C6 when skip_guc_pc is set")
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar at intel.com>
---
drivers/gpu/drm/xe/xe_guc_pc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c
index 1943893a3fd7..8c559ff57e3d 100644
--- a/drivers/gpu/drm/xe/xe_guc_pc.c
+++ b/drivers/gpu/drm/xe/xe_guc_pc.c
@@ -794,22 +794,23 @@ static int pc_adjust_requested_freq(struct xe_guc_pc *pc)
*/
int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc)
{
+ struct xe_device *xe = pc_to_xe(pc);
struct xe_gt *gt = pc_to_gt(pc);
int ret = 0;
xe_device_mem_access_get(pc_to_xe(pc));
- ret = pc_action_setup_gucrc(pc, XE_GUCRC_HOST_CONTROL);
- if (ret)
- goto out;
+ if (!xe->info.skip_guc_pc) {
+ ret = pc_action_setup_gucrc(pc, XE_GUCRC_HOST_CONTROL);
+ if (ret)
+ goto out;
+ }
ret = xe_force_wake_get(gt_to_fw(gt), XE_FORCEWAKE_ALL);
if (ret)
goto out;
- xe_mmio_write32(gt, PG_ENABLE, 0);
- xe_mmio_write32(gt, RC_CONTROL, 0);
- xe_mmio_write32(gt, RC_STATE, 0);
+ xe_gt_idle_disable_c6(gt);
XE_WARN_ON(xe_force_wake_put(gt_to_fw(gt), XE_FORCEWAKE_ALL));
--
2.38.1
More information about the Intel-xe
mailing list