Skip to content

Commit 8bb9fbc

Browse files
dceraolodanvet
authored andcommitted
drm/i915/guc: enable only the user interrupt when using GuC submission
In GuC submission mode the CS is owned by the GuC FW, so all CS status interrupts are handled by it. We only need the user interrupt as that signals request completion. Since we're now starting the engines directly in GuC submission mode when selected, we can stop switching back and forth between the execlists and the GuC programming and select directly the correct interrupt mask. Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Signed-off-by: Matthew Brost <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Cc: John Harrison <[email protected]> Cc: Michal Wajdeczko <[email protected]> Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 6fb086e commit 8bb9fbc

File tree

2 files changed

+11
-38
lines changed

2 files changed

+11
-38
lines changed

drivers/gpu/drm/i915/gt/intel_gt_irq.c

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,18 @@ void gen11_gt_irq_reset(struct intel_gt *gt)
194194

195195
void gen11_gt_irq_postinstall(struct intel_gt *gt)
196196
{
197-
const u32 irqs =
198-
GT_CS_MASTER_ERROR_INTERRUPT |
199-
GT_RENDER_USER_INTERRUPT |
200-
GT_CONTEXT_SWITCH_INTERRUPT |
201-
GT_WAIT_SEMAPHORE_INTERRUPT;
202197
struct intel_uncore *uncore = gt->uncore;
203-
const u32 dmask = irqs << 16 | irqs;
204-
const u32 smask = irqs << 16;
198+
u32 irqs = GT_RENDER_USER_INTERRUPT;
199+
u32 dmask;
200+
u32 smask;
201+
202+
if (!intel_uc_wants_guc_submission(&gt->uc))
203+
irqs |= GT_CS_MASTER_ERROR_INTERRUPT |
204+
GT_CONTEXT_SWITCH_INTERRUPT |
205+
GT_WAIT_SEMAPHORE_INTERRUPT;
206+
207+
dmask = irqs << 16 | irqs;
208+
smask = irqs << 16;
205209

206210
BUILD_BUG_ON(irqs & 0xffff0000);
207211

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

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -432,32 +432,6 @@ void intel_guc_submission_fini(struct intel_guc *guc)
432432
}
433433
}
434434

435-
static void guc_interrupts_capture(struct intel_gt *gt)
436-
{
437-
struct intel_uncore *uncore = gt->uncore;
438-
u32 irqs = GT_CONTEXT_SWITCH_INTERRUPT;
439-
u32 dmask = irqs << 16 | irqs;
440-
441-
GEM_BUG_ON(INTEL_GEN(gt->i915) < 11);
442-
443-
/* Don't handle the ctx switch interrupt in GuC submission mode */
444-
intel_uncore_rmw(uncore, GEN11_RENDER_COPY_INTR_ENABLE, dmask, 0);
445-
intel_uncore_rmw(uncore, GEN11_VCS_VECS_INTR_ENABLE, dmask, 0);
446-
}
447-
448-
static void guc_interrupts_release(struct intel_gt *gt)
449-
{
450-
struct intel_uncore *uncore = gt->uncore;
451-
u32 irqs = GT_CONTEXT_SWITCH_INTERRUPT;
452-
u32 dmask = irqs << 16 | irqs;
453-
454-
GEM_BUG_ON(INTEL_GEN(gt->i915) < 11);
455-
456-
/* Handle ctx switch interrupts again */
457-
intel_uncore_rmw(uncore, GEN11_RENDER_COPY_INTR_ENABLE, 0, dmask);
458-
intel_uncore_rmw(uncore, GEN11_VCS_VECS_INTR_ENABLE, 0, dmask);
459-
}
460-
461435
static int guc_context_alloc(struct intel_context *ce)
462436
{
463437
return lrc_alloc(ce, ce->engine);
@@ -722,9 +696,6 @@ int intel_guc_submission_setup(struct intel_engine_cs *engine)
722696
void intel_guc_submission_enable(struct intel_guc *guc)
723697
{
724698
guc_stage_desc_init(guc);
725-
726-
/* Take over from manual control of ELSP (execlists) */
727-
guc_interrupts_capture(guc_to_gt(guc));
728699
}
729700

730701
void intel_guc_submission_disable(struct intel_guc *guc)
@@ -735,8 +706,6 @@ void intel_guc_submission_disable(struct intel_guc *guc)
735706

736707
/* Note: By the time we're here, GuC may have already been reset */
737708

738-
guc_interrupts_release(gt);
739-
740709
guc_stage_desc_fini(guc);
741710
}
742711

0 commit comments

Comments
 (0)