Skip to content

Commit b05f984

Browse files
Juston Lijohnharr-intel
authored andcommitted
drm/i915/guc: Enable PXP GuC autoteardown flow
This feature flag enables GuC autoteardown which allows for a grace period before session teardown. Also add a HAS_PXP() helper to share with the other place that wants to check. Signed-off-by: Juston Li <[email protected]> Signed-off-by: John Harrison <[email protected]> Reviewed-by: Alan Previn <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent aa94428 commit b05f984

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,8 +239,16 @@ static u32 guc_ctl_debug_flags(struct intel_guc *guc)
239239

240240
static u32 guc_ctl_feature_flags(struct intel_guc *guc)
241241
{
242+
struct intel_gt *gt = guc_to_gt(guc);
242243
u32 flags = 0;
243244

245+
/*
246+
* Enable PXP GuC autoteardown flow.
247+
* NB: MTL does things differently.
248+
*/
249+
if (HAS_PXP(gt->i915) && !IS_METEORLAKE(gt->i915))
250+
flags |= GUC_CTL_ENABLE_GUC_PXP_CTL;
251+
244252
if (!intel_guc_submission_is_used(guc))
245253
flags |= GUC_CTL_DISABLE_SCHEDULER;
246254

drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
#define GUC_WA_ENABLE_TSC_CHECK_ON_RC6 BIT(22)
106106

107107
#define GUC_CTL_FEATURE 2
108+
#define GUC_CTL_ENABLE_GUC_PXP_CTL BIT(1)
108109
#define GUC_CTL_ENABLE_SLPC BIT(2)
109110
#define GUC_CTL_DISABLE_SCHEDULER BIT(14)
110111

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -691,6 +691,9 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915,
691691

692692
#define HAS_RPS(i915) (INTEL_INFO(i915)->has_rps)
693693

694+
#define HAS_PXP(i915) \
695+
(IS_ENABLED(CONFIG_DRM_I915_PXP) && INTEL_INFO(i915)->has_pxp)
696+
694697
#define HAS_HECI_PXP(i915) \
695698
(INTEL_INFO(i915)->has_heci_pxp)
696699

drivers/gpu/drm/i915/pxp/intel_pxp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static struct intel_gt *find_gt_for_required_teelink(struct drm_i915_private *i9
170170

171171
static struct intel_gt *find_gt_for_required_protected_content(struct drm_i915_private *i915)
172172
{
173-
if (!IS_ENABLED(CONFIG_DRM_I915_PXP) || !INTEL_INFO(i915)->has_pxp)
173+
if (!HAS_PXP(i915))
174174
return NULL;
175175

176176
/*

0 commit comments

Comments
 (0)