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

drm/i915/dsb: Add support for GOSUB interrupt

DSB raises an interrupt when there is a nested GOSUB command or
illegal Head/Tail. Add support to log such errors in the DSB
interrupt handler.

v2: Enable support only in platforms that support this (Ville)

Signed-off-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
Link: https://lore.kernel.org/r/20250523062041.166468-7-chaitanya.kumar.borah@intel.com

authored by

Chaitanya Kumar Borah and committed by
Animesh Manna
78f237a6 796b6df0

+11
+9
drivers/gpu/drm/i915/display/intel_dsb.c
··· 655 655 if (DISPLAY_VER(display) >= 14) 656 656 errors |= DSB_ATS_FAULT_INT_STATUS; 657 657 658 + if (DISPLAY_VER(display) >= 30) 659 + errors |= DSB_GOSUB_INT_STATUS; 660 + 658 661 return errors; 659 662 } 660 663 ··· 671 668 672 669 if (DISPLAY_VER(display) >= 14) 673 670 errors |= DSB_ATS_FAULT_INT_EN; 671 + 672 + if (DISPLAY_VER(display) >= 30) 673 + errors |= DSB_GOSUB_INT_EN; 674 674 675 675 return errors; 676 676 } ··· 1012 1006 crtc->base.base.id, crtc->base.name, dsb_id); 1013 1007 if (errors & DSB_POLL_ERR_INT_STATUS) 1014 1008 drm_err(display->drm, "[CRTC:%d:%s] DSB %d poll error\n", 1009 + crtc->base.base.id, crtc->base.name, dsb_id); 1010 + if (errors & DSB_GOSUB_INT_STATUS) 1011 + drm_err(display->drm, "[CRTC:%d:%s] DSB %d GOSUB programming error\n", 1015 1012 crtc->base.base.id, crtc->base.name, dsb_id); 1016 1013 }
+2
drivers/gpu/drm/i915/display/intel_dsb_regs.h
··· 51 51 #define DSB_RESET_SM_STATE_MASK REG_GENMASK(5, 4) 52 52 #define DSB_RUN_SM_STATE_MASK REG_GENMASK(2, 0) 53 53 #define DSB_INTERRUPT(pipe, id) _MMIO(DSBSL_INSTANCE(pipe, id) + 0x28) 54 + #define DSB_GOSUB_INT_EN REG_BIT(21) /* ptl+ */ 54 55 #define DSB_ATS_FAULT_INT_EN REG_BIT(20) /* mtl+ */ 55 56 #define DSB_GTT_FAULT_INT_EN REG_BIT(19) 56 57 #define DSB_RSPTIMEOUT_INT_EN REG_BIT(18) 57 58 #define DSB_POLL_ERR_INT_EN REG_BIT(17) 58 59 #define DSB_PROG_INT_EN REG_BIT(16) 60 + #define DSB_GOSUB_INT_STATUS REG_BIT(5) /* ptl+ */ 59 61 #define DSB_ATS_FAULT_INT_STATUS REG_BIT(4) /* mtl+ */ 60 62 #define DSB_GTT_FAULT_INT_STATUS REG_BIT(3) 61 63 #define DSB_RSPTIMEOUT_INT_STATUS REG_BIT(2)