Skip to content

Commit 23ca3d2

Browse files
vsbelgaumThomas Hellström
authored andcommitted
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: 975e4a3 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Fixes: bef52b5 ("drm/xe: Create a xe_gt_freq component for raw management and sysfs") Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com> Link: https://lore.kernel.org/r/20240108225842.966066-1-vinay.belgaumkar@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit 69cac0a) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent 19c0222 commit 23ca3d2

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

drivers/gpu/drm/xe/xe_gt_freq.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ void xe_gt_freq_init(struct xe_gt *gt)
196196
struct xe_device *xe = gt_to_xe(gt);
197197
int err;
198198

199+
if (xe->info.skip_guc_pc)
200+
return;
201+
199202
gt->freq = kobject_create_and_add("freq0", gt->sysfs);
200203
if (!gt->freq) {
201204
drm_warn(&xe->drm, "failed to add freq0 directory to %s\n",

drivers/gpu/drm/xe/xe_guc.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ static u32 guc_ctl_debug_flags(struct xe_guc *guc)
6060

6161
static u32 guc_ctl_feature_flags(struct xe_guc *guc)
6262
{
63-
return GUC_CTL_ENABLE_SLPC;
63+
u32 flags = 0;
64+
65+
if (!guc_to_xe(guc)->info.skip_guc_pc)
66+
flags |= GUC_CTL_ENABLE_SLPC;
67+
68+
return flags;
6469
}
6570

6671
static u32 guc_ctl_log_params_flags(struct xe_guc *guc)

0 commit comments

Comments
 (0)