@@ -59,6 +59,11 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
snprintf(pipe_id, sizeof(pipe_id),
"PIPE=%u", intel_crtc->base.base.id);
+ /* Wa: 14014889975 */
+ if (IS_DISPLAY_VER(display, 13, 14))
+ intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+ DPST_CTL_RESTORE, 0);
+
/*
* TODO: PSR to be exited while reading the Histogram data
* Set DPST_CTL Bin Reg function select to TC
@@ -99,6 +104,15 @@ static void intel_histogram_handle_int_work(struct work_struct *work)
return;
}
+ /* Wa: 14014889975 */
+ if (IS_DISPLAY_VER(display, 13, 14))
+ /* Write the value read from DPST_CTL to DPST_CTL.Interrupt Delay Counter(bit 23:16) */
+ intel_de_rmw(display, DPST_CTL(intel_crtc->pipe),
+ DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT |
+ DPST_CTL_RESTORE,
+ DPST_CTL_GUARDBAND_INTERRUPT_DELAY(0x0) |
+ DPST_CTL_RESTORE);
+
/* Enable histogram interrupt */
intel_de_rmw(display, DPST_GUARD(intel_crtc->pipe), DPST_GUARD_HIST_INT_EN,
DPST_GUARD_HIST_INT_EN);
@@ -16,6 +16,8 @@
#define DPST_CTL_RESTORE REG_BIT(28)
#define DPST_CTL_IE_MODI_TABLE_EN REG_BIT(27)
#define DPST_CTL_HIST_MODE REG_BIT(24)
+#define DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT REG_GENMASK(23, 16)
+#define DPST_CTL_GUARDBAND_INTERRUPT_DELAY(val) REG_FIELD_PREP(DPST_CTL_GUARDBAND_INTERRUPT_DELAY_CNT, val)
#define DPST_CTL_ENHANCEMENT_MODE_MASK REG_GENMASK(14, 13)
#define DPST_CTL_EN_MULTIPLICATIVE REG_FIELD_PREP(DPST_CTL_ENHANCEMENT_MODE_MASK, 2)
#define DPST_CTL_IE_TABLE_VALUE_FORMAT REG_BIT(15)