Commit 69cac0a8 authored by Vinay Belgaumkar's avatar Vinay Belgaumkar Committed by Rodrigo Vivi

drm/xe: Check skip_guc_pc before setting SLPC flag

Don't set SLPC GuC feature ctl flag if skip_guc_pc is true.

v2: Skip the freq related sysfs creation as well (Badal)
v3: Remove unnecessary parenthesis (Lucas)

Fixes: 975e4a37 ("drm/xe: Manually setup C6 when skip_guc_pc is set")
Fixes: bef52b5c ("drm/xe: Create a xe_gt_freq component for raw management and sysfs")
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: default avatarVinay Belgaumkar <vinay.belgaumkar@intel.com>
Link: https://lore.kernel.org/r/20240108225842.966066-1-vinay.belgaumkar@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 4ae3aeab
...@@ -196,6 +196,9 @@ void xe_gt_freq_init(struct xe_gt *gt) ...@@ -196,6 +196,9 @@ void xe_gt_freq_init(struct xe_gt *gt)
struct xe_device *xe = gt_to_xe(gt); struct xe_device *xe = gt_to_xe(gt);
int err; int err;
if (xe->info.skip_guc_pc)
return;
gt->freq = kobject_create_and_add("freq0", gt->sysfs); gt->freq = kobject_create_and_add("freq0", gt->sysfs);
if (!gt->freq) { if (!gt->freq) {
drm_warn(&xe->drm, "failed to add freq0 directory to %s\n", drm_warn(&xe->drm, "failed to add freq0 directory to %s\n",
......
...@@ -63,7 +63,12 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc) ...@@ -63,7 +63,12 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
static u32 guc_ctl_feature_flags(struct xe_guc *guc) static u32 guc_ctl_feature_flags(struct xe_guc *guc)
{ {
return GUC_CTL_ENABLE_SLPC; u32 flags = 0;
if (!guc_to_xe(guc)->info.skip_guc_pc)
flags |= GUC_CTL_ENABLE_SLPC;
return flags;
} }
static u32 guc_ctl_log_params_flags(struct xe_guc *guc) static u32 guc_ctl_log_params_flags(struct xe_guc *guc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment