Skip to content

Commit f4a7584

Browse files
rtauro1895gregkh
authored andcommitted
drm/xe: move disable_c6 call
[ Upstream commit 2470b14 ] disable c6 called in guc_pc_fini_hw is unreachable. GuC PC init returns earlier if skip_guc_pc is true and never registers the finish call thus making disable_c6 unreachable. move this call to gt idle. v2: rebase v3: add fixes tag (Himal) Fixes: 975e4a3 ("drm/xe: Manually setup C6 when skip_guc_pc is set") Signed-off-by: Riana Tauro <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit 6800e63) Signed-off-by: Thomas Hellström <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 6503743 commit f4a7584

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

drivers/gpu/drm/xe/xe_gt_idle.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ static const struct attribute *gt_idle_attrs[] = {
126126
static void gt_idle_sysfs_fini(struct drm_device *drm, void *arg)
127127
{
128128
struct kobject *kobj = arg;
129+
struct xe_gt *gt = kobj_to_gt(kobj->parent);
130+
131+
if (gt_to_xe(gt)->info.skip_guc_pc) {
132+
XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
133+
xe_gt_idle_disable_c6(gt);
134+
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
135+
}
129136

130137
sysfs_remove_files(kobj, gt_idle_attrs);
131138
kobject_put(kobj);

drivers/gpu/drm/xe/xe_guc_pc.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -920,12 +920,6 @@ int xe_guc_pc_stop(struct xe_guc_pc *pc)
920920
static void xe_guc_pc_fini(struct drm_device *drm, void *arg)
921921
{
922922
struct xe_guc_pc *pc = arg;
923-
struct xe_device *xe = pc_to_xe(pc);
924-
925-
if (xe->info.skip_guc_pc) {
926-
xe_gt_idle_disable_c6(pc_to_gt(pc));
927-
return;
928-
}
929923

930924
xe_force_wake_get(gt_to_fw(pc_to_gt(pc)), XE_FORCEWAKE_ALL);
931925
XE_WARN_ON(xe_guc_pc_gucrc_disable(pc));

0 commit comments

Comments
 (0)