[PATCH 06/11] drm/xe: Defer memirq init until needed

Lucas De Marchi lucas.demarchi at intel.com
Tue Dec 10 14:30:14 UTC 2024


On Tue, Dec 10, 2024 at 09:31:06AM +0100, Maarten Lankhorst wrote:
>memirqs require allocations into GGTT, which we cannot use until
>after display is enabled.
>
>Now that the initialisation of interrupts is postponed, move memirq
>init too.
>
>Signed-off-by: Maarten Lankhorst <dev at lankhorst.se>

Cc: Ilia Levi <ilia.levi at intel.com>

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

assuming the first patches are applied first.

Lucas De Marchi

>---
> drivers/gpu/drm/xe/xe_device.c | 4 ----
> drivers/gpu/drm/xe/xe_tile.c   | 7 +++++++
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
>index c9c0b74c74ddb..4c46809472ae4 100644
>--- a/drivers/gpu/drm/xe/xe_device.c
>+++ b/drivers/gpu/drm/xe/xe_device.c
>@@ -41,7 +41,6 @@
> #include "xe_hw_engine_group.h"
> #include "xe_hwmon.h"
> #include "xe_irq.h"
>-#include "xe_memirq.h"
> #include "xe_mmio.h"
> #include "xe_module.h"
> #include "xe_oa.h"
>@@ -675,9 +674,6 @@ int xe_device_probe(struct xe_device *xe)
> 		err = xe_ggtt_init_early(tile->mem.ggtt);
> 		if (err)
> 			return err;
>-		err = xe_memirq_init(&tile->memirq);
>-		if (err)
>-			return err;
> 	}
>
> 	for_each_gt(gt, xe, id) {
>diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
>index 2825553b568f7..d07c1fba793ca 100644
>--- a/drivers/gpu/drm/xe/xe_tile.c
>+++ b/drivers/gpu/drm/xe/xe_tile.c
>@@ -10,6 +10,7 @@
> #include "xe_device.h"
> #include "xe_ggtt.h"
> #include "xe_gt.h"
>+#include "xe_memirq.h"
> #include "xe_migrate.h"
> #include "xe_pcode.h"
> #include "xe_sa.h"
>@@ -179,6 +180,12 @@ int xe_tile_init_noalloc(struct xe_tile *tile)
>
> int xe_tile_init(struct xe_tile *tile)
> {
>+	int err;
>+
>+	err = xe_memirq_init(&tile->memirq);
>+	if (err)
>+		return err;
>+
> 	tile->mem.kernel_bb_pool = xe_sa_bo_manager_init(tile, SZ_1M, 16);
> 	if (IS_ERR(tile->mem.kernel_bb_pool))
> 		return PTR_ERR(tile->mem.kernel_bb_pool);
>-- 
>2.45.2
>


More information about the Intel-xe mailing list