]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/memirq: Drop cached iosys_map for MEMIRQ mask
authorMichal Wajdeczko <michal.wajdeczko@intel.com>
Mon, 18 May 2026 19:25:46 +0000 (21:25 +0200)
committerMichal Wajdeczko <michal.wajdeczko@intel.com>
Tue, 19 May 2026 08:50:31 +0000 (10:50 +0200)
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 <michal.wajdeczko@intel.com>
Reviewed-by: Ilia Levi <ilia.levi@intel.com>
Link: https://patch.msgid.link/20260518192547.600-9-michal.wajdeczko@intel.com
drivers/gpu/drm/xe/xe_memirq.c
drivers/gpu/drm/xe/xe_memirq_types.h

index 609e0f3220cc9f0219bd967537ee07c3cae515fd..4909dafe182d6eefb0ca6e50b3dd4fe890028724 100644 (file)
@@ -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;
 }
index eab3843428780f2896952346b3aed662bb45d586..4ea3d1976d4fd933658d8e7d0afe145c2a5041b9 100644 (file)
@@ -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;
 };