Skip to content

Commit e367925

Browse files
Don Hiattjlahtine-intel
authored andcommitted
drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
On some platforms (e.g. KBL) that do not support GuC submission, but the user enabled the GuC communication (e.g for HuC authentication) calling the GuC EXIT_S_STATE action results in lose of ability to enter RC6. We can remove the GuC suspend/resume entirely as we do not need to save the GuC submission status. Add intel_guc_submission_is_enabled() function to determine if GuC submission is active. v2: Do not suspend/resume the GuC on platforms that do not support Guc Submission. v3: Fix typo, move suspend logic to remove goto. v4: Use intel_guc_submission_is_enabled() to check GuC submission status. v5: No need to look at engine to determine if submission is enabled. Squash fix + intel_guc_submission_is_enabled() patch into one. v6: Move resume check into intel_guc_resume() for symmetry. Fix commit Fixes tag. Reported-by: KiteStramuort <[email protected]> Reported-by: S. Zharkoff <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111594 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111623 Fixes: ffd5ce2 ("drm/i915/guc: Updates for GuC 32.0.3 firmware") Cc: Michal Wajdeczko <[email protected]> Cc: Daniele Ceralo Spurio <[email protected]> Cc: Stuart Summers <[email protected]> Cc: Chris Wilson <[email protected]> Tested-by: Tomas Janousek <[email protected]> Signed-off-by: Don Hiatt <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 82e0c5b) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent a46bfdc commit e367925

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

drivers/gpu/drm/i915/gt/uc/intel_guc.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,13 @@ int intel_guc_suspend(struct intel_guc *guc)
553553
GUC_POWER_D1, /* any value greater than GUC_POWER_D0 */
554554
};
555555

556+
/*
557+
* If GuC communication is enabled but submission is not supported,
558+
* we do not need to suspend the GuC.
559+
*/
560+
if (!intel_guc_submission_is_enabled(guc))
561+
return 0;
562+
556563
/*
557564
* The ENTER_S_STATE action queues the save/restore operation in GuC FW
558565
* and then returns, so waiting on the H2G is not enough to guarantee
@@ -610,6 +617,14 @@ int intel_guc_resume(struct intel_guc *guc)
610617
GUC_POWER_D0,
611618
};
612619

620+
/*
621+
* If GuC communication is enabled but submission is not supported,
622+
* we do not need to resume the GuC but we do need to enable the
623+
* GuC communication on resume (above).
624+
*/
625+
if (!intel_guc_submission_is_enabled(guc))
626+
return 0;
627+
613628
return intel_guc_send(guc, action, ARRAY_SIZE(action));
614629
}
615630

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2045,4 +2045,10 @@ i915_coherent_map_type(struct drm_i915_private *i915)
20452045
return HAS_LLC(i915) ? I915_MAP_WB : I915_MAP_WC;
20462046
}
20472047

2048+
static inline bool intel_guc_submission_is_enabled(struct intel_guc *guc)
2049+
{
2050+
return intel_guc_is_submission_supported(guc) &&
2051+
intel_guc_is_running(guc);
2052+
}
2053+
20482054
#endif

0 commit comments

Comments
 (0)