Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/bmg: Read display register timeout

Log the address of the register that caused the timeout
interrupt by reading RMTIMEOUTREG_CAPTURE

--v2:
- Update RMTIMEOUTREG_CAPTURE naming (Suraj)

--v3:
- XeLpdp naming convention.
- Use if condition instead of else if

Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com>
Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240807142106.1270213-1-mitulkumar.ajitkumar.golani@intel.com

authored by

Mitul Golani and committed by
Suraj Kandpal
7d113cce 372f244b

+10 -1
+8 -1
drivers/gpu/drm/i915/display/intel_display_irq.c
··· 906 906 intel_pmdemand_irq_handler(dev_priv); 907 907 found = true; 908 908 } 909 + 910 + if (iir & XELPDP_RM_TIMEOUT) { 911 + u32 val = intel_uncore_read(&dev_priv->uncore, 912 + RM_TIMEOUT_REG_CAPTURE); 913 + drm_warn(&dev_priv->drm, "Register Access Timeout = 0x%x\n", val); 914 + found = true; 915 + } 909 916 } else if (iir & GEN8_DE_MISC_GSE) { 910 917 intel_opregion_asle_intr(dev_priv); 911 918 found = true; ··· 1717 1710 1718 1711 if (DISPLAY_VER(dev_priv) >= 14) { 1719 1712 de_misc_masked |= XELPDP_PMDEMAND_RSPTOUT_ERR | 1720 - XELPDP_PMDEMAND_RSP; 1713 + XELPDP_PMDEMAND_RSP | XELPDP_RM_TIMEOUT; 1721 1714 } else if (DISPLAY_VER(dev_priv) >= 11) { 1722 1715 enum port port; 1723 1716
+2
drivers/gpu/drm/i915/i915_reg.h
··· 2396 2396 2397 2397 /* Display Internal Timeout Register */ 2398 2398 #define RM_TIMEOUT _MMIO(0x42060) 2399 + #define RM_TIMEOUT_REG_CAPTURE _MMIO(0x420E0) 2399 2400 #define MMIO_TIMEOUT_US(us) ((us) << 0) 2400 2401 2401 2402 /* interrupts */ ··· 2575 2574 #define GEN8_DE_MISC_IMR _MMIO(0x44464) 2576 2575 #define GEN8_DE_MISC_IIR _MMIO(0x44468) 2577 2576 #define GEN8_DE_MISC_IER _MMIO(0x4446c) 2577 + #define XELPDP_RM_TIMEOUT REG_BIT(29) 2578 2578 #define XELPDP_PMDEMAND_RSPTOUT_ERR REG_BIT(27) 2579 2579 #define GEN8_DE_MISC_GSE REG_BIT(27) 2580 2580 #define GEN8_DE_EDP_PSR REG_BIT(19)