From: Dibin Moolakadan Subrahmanian <[email protected]>
Enable the hardware based guardband calculations which allows DC3co to remain enabled when timings are changing from one fixed refresh rate to another fixed refresh rate. Signed-off-by: Dibin Moolakadan Subrahmanian <[email protected]> Signed-off-by: Animesh Manna <[email protected]> --- drivers/gpu/drm/i915/display/intel_cmtg.c | 1 + drivers/gpu/drm/i915/display/intel_cmtg_regs.h | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_cmtg.c b/drivers/gpu/drm/i915/display/intel_cmtg.c index d1bce4150327..5935f5f2fd7c 100644 --- a/drivers/gpu/drm/i915/display/intel_cmtg.c +++ b/drivers/gpu/drm/i915/display/intel_cmtg.c @@ -404,6 +404,7 @@ void intel_cmtg_enable_ddi(const struct intel_crtc_state *crtc_state) return; intel_de_rmw(display, TRANS_DDI_FUNC_CTL2(display, cpu_transcoder), 0, CMTG_SECONDARY_MODE); + intel_de_rmw(display, CMTG_SCANLINE_GB1(cpu_transcoder), 0, CMTG_HW_GB_ENABLE); drm_dbg_kms(display->drm, "CMTG: %s enabled\n", transcoder_name(cpu_transcoder)); } diff --git a/drivers/gpu/drm/i915/display/intel_cmtg_regs.h b/drivers/gpu/drm/i915/display/intel_cmtg_regs.h index 6404f763bd52..275f57e5ee0b 100644 --- a/drivers/gpu/drm/i915/display/intel_cmtg_regs.h +++ b/drivers/gpu/drm/i915/display/intel_cmtg_regs.h @@ -32,4 +32,10 @@ #define CMTG_HW_GB_DC5_EXIT_LATENCY_MASK REG_GENMASK(27, 16) #define CMTG_HW_GB_UP_LW_BG_DIFF_MASK REG_GENMASK(31, 28) +#define _CMTG_SCANLINE_GB1_A 0x456A0 +#define _CMTG_SCANLINE_GB1_B 0x456C0 +#define CMTG_SCANLINE_GB1(trans) _MMIO_TRANS((trans), \ + _CMTG_SCANLINE_GB1_A, _CMTG_SCANLINE_GB1_B) +#define CMTG_HW_GB_ENABLE REG_BIT(31) + #endif /* __INTEL_CMTG_REGS_H__ */ -- 2.29.0
