[Intel-xe] [PATCH 16/26] drm/xe/irq: Handle ASLE backlight interrupts at same time as display

Lucas De Marchi lucas.demarchi at intel.com
Thu May 18 18:33:41 UTC 2023


On Wed, May 10, 2023 at 08:47:12PM -0700, Matt Roper wrote:
>Our only use of GUnit interrupts is to handle ASLE backlight operations
>that are reported as GUnit GSE interrupts.  Move the enable/disable of
>these interrupts adjacent to display interrupts.
>
>In the future we may want to even move these inside the
>xe_display_irq_*() functions.  But since these rely on xe_irq static
>functions like mask_and_disable() it's easier to keep them separate for
>now.
>
>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 | 15 +++++++++------
> 1 file changed, 9 insertions(+), 6 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_irq.c b/drivers/gpu/drm/xe/xe_irq.c
>index fa7d04ba23c0..02f44b58ce3e 100644
>--- a/drivers/gpu/drm/xe/xe_irq.c
>+++ b/drivers/gpu/drm/xe/xe_irq.c
>@@ -187,8 +187,6 @@ static void xelp_irq_postinstall(struct xe_device *xe, struct xe_tile *tile)
>
> 	gt_irq_postinstall(tile);
>
>-	unmask_and_enable(tile, GU_MISC_IRQ_OFFSET, GU_MISC_GSE);
>-
> 	xelp_intr_enable(xe, true);
> }
>
>@@ -372,8 +370,6 @@ static void dg1_irq_postinstall(struct xe_device *xe, struct xe_tile *tile)
> {
> 	gt_irq_postinstall(tile);
>
>-	unmask_and_enable(tile, GU_MISC_IRQ_OFFSET, GU_MISC_GSE);
>-
> 	if (tile->id == 0)
> 		dg1_intr_enable(xe, true);
> }
>@@ -486,7 +482,6 @@ static void xelp_irq_reset(struct xe_tile *tile)
>
> 	gt_irq_reset(tile);
>
>-	mask_and_disable(tile, GU_MISC_IRQ_OFFSET);
> 	mask_and_disable(tile, PCU_IRQ_OFFSET);
> }
>
>@@ -497,7 +492,6 @@ static void dg1_irq_reset(struct xe_tile *tile)
>
> 	gt_irq_reset(tile);
>
>-	mask_and_disable(tile, GU_MISC_IRQ_OFFSET);
> 	mask_and_disable(tile, PCU_IRQ_OFFSET);
> }
>
>@@ -513,6 +507,8 @@ static void xe_irq_reset(struct xe_device *xe)
> 			xelp_irq_reset(tile);
> 	}
>
>+	tile = xe_device_get_root_tile(xe);
>+	mask_and_disable(tile, GU_MISC_IRQ_OFFSET);
> 	xe_display_irq_reset(xe);
> }
>
>@@ -535,6 +531,13 @@ static void xe_irq_postinstall(struct xe_device *xe)
> 		xe_gt_irq_postinstall(tile);
>
> 	xe_display_irq_postinstall(xe, xe_primary_mmio_gt(xe));
>+
>+	/*
>+	 * ASLE backlight operations are reported via GUnit GSE interrupts
>+	 * on the root tile.
>+	 */
>+	unmask_and_enable(xe_device_get_root_tile(xe),
>+			  GU_MISC_IRQ_OFFSET, GU_MISC_GSE);
> }
>
> static irq_handler_t xe_irq_handler(struct xe_device *xe)
>-- 
>2.40.0
>


More information about the Intel-xe mailing list