Skip to content

Commit 2470b14

Browse files
rtauro1895Thomas Hellström
authored andcommitted
drm/xe: move disable_c6 call
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 <riana.tauro@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240606100842.956072-3-riana.tauro@intel.com Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> (cherry picked from commit 6800e63) Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
1 parent b5e3a9b commit 2470b14

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
@@ -147,6 +147,13 @@ static const struct attribute *gt_idle_attrs[] = {
147147
static void gt_idle_sysfs_fini(struct drm_device *drm, void *arg)
148148
{
149149
struct kobject *kobj = arg;
150+
struct xe_gt *gt = kobj_to_gt(kobj->parent);
151+
152+
if (gt_to_xe(gt)->info.skip_guc_pc) {
153+
XE_WARN_ON(xe_force_wake_get(gt_to_fw(gt), XE_FW_GT));
154+
xe_gt_idle_disable_c6(gt);
155+
xe_force_wake_put(gt_to_fw(gt), XE_FW_GT);
156+
}
150157

151158
sysfs_remove_files(kobj, gt_idle_attrs);
152159
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
@@ -895,12 +895,6 @@ int xe_guc_pc_stop(struct xe_guc_pc *pc)
895895
static void xe_guc_pc_fini(struct drm_device *drm, void *arg)
896896
{
897897
struct xe_guc_pc *pc = arg;
898-
struct xe_device *xe = pc_to_xe(pc);
899-
900-
if (xe->info.skip_guc_pc) {
901-
xe_gt_idle_disable_c6(pc_to_gt(pc));
902-
return;
903-
}
904898

905899
XE_WARN_ON(xe_force_wake_get(gt_to_fw(pc_to_gt(pc)), XE_FORCEWAKE_ALL));
906900
XE_WARN_ON(xe_guc_pc_gucrc_disable(pc));

0 commit comments

Comments
 (0)