[Intel-xe] [PATCH 8/8] drm/xe/irq: Don't clobber display interrupts on multi-tile platforms

Lucas De Marchi lucas.demarchi at intel.com
Fri Mar 31 22:30:57 UTC 2023


On Thu, Mar 30, 2023 at 11:24:05AM -0700, Matt Roper wrote:
>Although our only multi-tile platform today (PVC) doesn't support
>display, it's possible that some future multi-tile platform will.
>If/when this happens, display interrupts (both traditional display and
>ASLE backlight interrupts raised as a Gunit interrupt) should be
>delivered to the primary tile.  Save away tile0's master_ctl value so
>that it can still be used for display interrupt handling after the GT
>loop.
>
>Signed-off-by: Matt Roper <matthew.d.roper at intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi at intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/xe/xe_irq.c | 14 +++++++++++---
> 1 file changed, 11 insertions(+), 3 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
>index 02292e60e52c..636653f4e7ad 100644
>--- a/drivers/gpu/drm/xe/xe_irq.c
>+++ b/drivers/gpu/drm/xe/xe_irq.c
>@@ -347,7 +347,7 @@ static irqreturn_t dg1_irq_handler(int irq, void *arg)
> {
> 	struct xe_device *xe = arg;
> 	struct xe_gt *gt;
>-	u32 master_tile_ctl, master_ctl = 0, gu_misc_iir;
>+	u32 master_tile_ctl, master_ctl = 0, tile0_master_ctl = 0, gu_misc_iir;
> 	long unsigned int intr_dw[2];
> 	u32 identity[32];
> 	u8 id;
>@@ -381,11 +381,19 @@ static irqreturn_t dg1_irq_handler(int irq, void *arg)
> 		if (!xe_gt_is_media_type(gt))
> 			xe_mmio_write32(gt, GFX_MSTR_IRQ.reg, master_ctl);
> 		gt_irq_handler(xe, gt, master_ctl, intr_dw, identity);
>+
>+		/*
>+		 * Save primary tile's master interrupt register for display
>+		 * processing below.
>+		 */
>+		if (id == 0)
>+			tile0_master_ctl = master_ctl;
> 	}
>
>-	xe_display_irq_handler(xe, master_ctl);
>+	xe_display_irq_handler(xe, tile0_master_ctl);
>
>-	gu_misc_iir = gu_misc_irq_ack(gt, master_ctl);
>+	/* Gunit GSE interrupts can trigger display backlight operations */
>+	gu_misc_iir = gu_misc_irq_ack(gt, tile0_master_ctl);
>
> 	dg1_intr_enable(xe, false);
>
>-- 
>2.39.2
>


More information about the Intel-xe mailing list