Commit 1fc30960 authored by Lukasz Laguna's avatar Lukasz Laguna Committed by Michal Wajdeczko
Browse files

drm/xe/pf: Add TLB invalidation support for MERT



Add support for triggering and handling MERT TLB invalidation. After
LMTT updates, the MERT TLB invalidation is initiated to ensure memory
translations remain coherent.

Completion of the invalidation is signaled via MERT interrupt (bit 13 in
the GFX master interrupt register). Detect and handle this interrupt to
properly synchronize the invalidation flow.

Signed-off-by: default avatarLukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: default avatarPiotr Piórkowski <piotr.piorkowski@intel.com>
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20251124190237.20503-4-lukasz.laguna@intel.com
parent 0e72241a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -173,6 +173,7 @@ xe-$(CONFIG_PCI_IOV) += \
	xe_lmtt.o \
	xe_lmtt_2l.o \
	xe_lmtt_ml.o \
	xe_mert.o \
	xe_pci_sriov.o \
	xe_sriov_packet.o \
	xe_sriov_pf.o \
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#define   GU_MISC_IRQ				REG_BIT(29)
#define   ERROR_IRQ(x)				REG_BIT(26 + (x))
#define   DISPLAY_IRQ				REG_BIT(16)
#define   SOC_H2DMEMINT_IRQ			REG_BIT(13)
#define   I2C_IRQ				REG_BIT(12)
#define   GT_DW_IRQ(x)				REG_BIT(x)

+3 −0
Original line number Diff line number Diff line
@@ -10,4 +10,7 @@

#define MERT_LMEM_CFG				XE_REG(0x1448b0)

#define MERT_TLB_INV_DESC_A			XE_REG(0x14cf7c)
#define   MERT_TLB_INV_DESC_A_VALID		REG_BIT(0)

#endif /* _XE_MERT_REGS_H_ */
+4 −0
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
#include "xe_late_bind_fw_types.h"
#include "xe_lmtt_types.h"
#include "xe_memirq_types.h"
#include "xe_mert.h"
#include "xe_oa_types.h"
#include "xe_pagefault_types.h"
#include "xe_platform_types.h"
@@ -220,6 +221,9 @@ struct xe_tile {

	/** @debugfs: debugfs directory associated with this tile */
	struct dentry *debugfs;

	/** @mert: MERT-related data */
	struct xe_mert mert;
};

/**
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include "xe_hw_error.h"
#include "xe_i2c.h"
#include "xe_memirq.h"
#include "xe_mert.h"
#include "xe_mmio.h"
#include "xe_pxp.h"
#include "xe_sriov.h"
@@ -525,6 +526,7 @@ static irqreturn_t dg1_irq_handler(int irq, void *arg)
				xe_heci_csc_irq_handler(xe, master_ctl);
			xe_display_irq_handler(xe, master_ctl);
			xe_i2c_irq_handler(xe, master_ctl);
			xe_mert_irq_handler(xe, master_ctl);
			gu_misc_iir = gu_misc_irq_ack(xe, master_ctl);
		}
	}
Loading