From: Michal Wajdeczko Date: Mon, 18 May 2026 19:25:46 +0000 (+0200) Subject: drm/xe/memirq: Drop cached iosys_map for MEMIRQ mask X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=17e974818cd7313ed0d2697c0c5b9c600c9a939b;p=thirdparty%2Fkernel%2Flinux.git drm/xe/memirq: Drop cached iosys_map for MEMIRQ mask It is used occasionally and iosys_map_wr() helper takes an offset parameter anyway. There is no extra benefit to keep a separate map. Signed-off-by: Michal Wajdeczko Reviewed-by: Ilia Levi Link: https://patch.msgid.link/20260518192547.600-9-michal.wajdeczko@intel.com --- diff --git a/drivers/gpu/drm/xe/xe_memirq.c b/drivers/gpu/drm/xe/xe_memirq.c index 609e0f3220cc9..4909dafe182d6 100644 --- a/drivers/gpu/drm/xe/xe_memirq.c +++ b/drivers/gpu/drm/xe/xe_memirq.c @@ -220,12 +220,10 @@ static int memirq_alloc_pages(struct xe_memirq *memirq) memirq->bo = bo; memirq->source = IOSYS_MAP_INIT_OFFSET(&bo->vmap, XE_MEMIRQ_SOURCE_OFFSET(0)); memirq->status = IOSYS_MAP_INIT_OFFSET(&bo->vmap, XE_MEMIRQ_STATUS_OFFSET(0)); - memirq->mask = IOSYS_MAP_INIT_OFFSET(&bo->vmap, XE_MEMIRQ_ENABLE_OFFSET); memirq->num_pages = num_pages; memirq_assert(memirq, !memirq->source.is_iomem); memirq_assert(memirq, !memirq->status.is_iomem); - memirq_assert(memirq, !memirq->mask.is_iomem); memirq_debug(memirq, "pages: count %u size %zu\n", num_pages, bo_size); memirq_debug(memirq, "page0: source %#x status %#x mask %#x\n", @@ -246,7 +244,8 @@ static void memirq_set_enable(struct xe_memirq *memirq, bool enable) * We only care about the GT_MI_USER_INTERRUPT from the engines and * the GuC does not look at the ENABLE mask at all. */ - iosys_map_wr(&memirq->mask, 0, u32, enable ? GT_MI_USER_INTERRUPT : 0); + iosys_map_wr(&memirq->bo->vmap, XE_MEMIRQ_ENABLE_OFFSET, u32, + enable ? GT_MI_USER_INTERRUPT : 0); memirq->enabled = enable; } diff --git a/drivers/gpu/drm/xe/xe_memirq_types.h b/drivers/gpu/drm/xe/xe_memirq_types.h index eab3843428780..4ea3d1976d4fd 100644 --- a/drivers/gpu/drm/xe/xe_memirq_types.h +++ b/drivers/gpu/drm/xe/xe_memirq_types.h @@ -17,7 +17,6 @@ struct xe_bo; * @num_pages: number of per-instance source/status pages. * @source: iosys pointer to `Interrupt Source Report Page`_. * @status: iosys pointer to `Interrupt Status Report Page`_. - * @mask: iosys pointer to Interrupt Enable Mask. * @enabled: internal flag used to control processing of the interrupts. */ struct xe_memirq { @@ -25,7 +24,6 @@ struct xe_memirq { unsigned int num_pages; struct iosys_map source; struct iosys_map status; - struct iosys_map mask; bool enabled; };