On Fri, Jan 03, 2025 at 04:54:53PM +0530, Nautiyal, Ankit K wrote: > > On 12/11/2024 2:39 AM, Ville Syrjala wrote: > > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > > > Pull the vblank delay computation into a separate function. > > We'll need more logic here soon and we don't want to pollute > > intel_crtc_compute_config() with low level details. > > > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > --- > > drivers/gpu/drm/i915/display/intel_display.c | 24 +++++++++++++++----- > > 1 file changed, 18 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > > index 8e90e99a25d6..ff907afa6451 100644 > > --- a/drivers/gpu/drm/i915/display/intel_display.c > > +++ b/drivers/gpu/drm/i915/display/intel_display.c > > @@ -2610,16 +2610,29 @@ static int intel_crtc_compute_pipe_mode(struct intel_crtc_state *crtc_state) > > return 0; > > } > > > > -static bool intel_crtc_needs_wa_14015401596(struct intel_crtc_state *crtc_state) > > +static bool intel_crtc_needs_wa_14015401596(const struct intel_crtc_state *crtc_state) > > { > > struct intel_display *display = to_intel_display(crtc_state); > > - const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode; > > > > return intel_vrr_possible(crtc_state) && crtc_state->has_psr && > > - adjusted_mode->crtc_vblank_start == adjusted_mode->crtc_vdisplay && > > IS_DISPLAY_VER(display, 13, 14); > > } > > > > +static int intel_crtc_vblank_delay(const struct intel_crtc_state *crtc_state) > > +{ > > + struct intel_display *display = to_intel_display(crtc_state); > > + int vblank_delay = 0; > > + > > + if (!HAS_DSB(display)) > > + return 0; > > Is this because W2 window is configured to be non zero only when > platforms support DSB and DSB is in use? It's only a thing for platforms with DSB, and there should be no need for the extra delay when not using the DSB. I was mildly tempted to even check i915_params.enable_dsb here, but that can changed dynamically via debufs which would require us to reconfigure the vblank delay on the fly (and that we can't currently do). -- Ville Syrjälä Intel