diff options
author | Vinay Belgaumkar <vinay.belgaumkar@intel.com> | 2023-12-01 12:25:14 -0800 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:45:55 -0500 |
commit | 68661c69e9fa86e78b8b6509aebeada5a15dada5 (patch) | |
tree | 2bf1774b3410cd045aa0d98d29561ac209981df0 /drivers | |
parent | 06951c2ee72df2f53b71e7cf2b504d4fa6bba453 (diff) |
drm/xe: Check skip_guc_pc before disabling gucrc
Also, use the new C6 helper instead of duplicating that code.
v2: Check skip flag at the beginning of the function (Rodrigo)
Fixes: 975e4a3795d4 ("drm/xe: Manually setup C6 when skip_guc_pc is set")
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/xe/xe_guc_pc.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/xe_guc_pc.c b/drivers/gpu/drm/xe/xe_guc_pc.c index 2b627ea950f1..f71085228cb3 100644 --- a/drivers/gpu/drm/xe/xe_guc_pc.c +++ b/drivers/gpu/drm/xe/xe_guc_pc.c @@ -794,9 +794,13 @@ 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; + if (xe->info.skip_guc_pc) + return 0; + xe_device_mem_access_get(pc_to_xe(pc)); ret = pc_action_setup_gucrc(pc, XE_GUCRC_HOST_CONTROL); @@ -807,9 +811,7 @@ int xe_guc_pc_gucrc_disable(struct xe_guc_pc *pc) 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)); |