Message ID | 20240709032651.1824185-9-ankit.k.nautiyal@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Use VRR timing generator for fixed refresh rate modes | expand |
> -----Original Message----- > From: Nautiyal, Ankit K <ankit.k.nautiyal@intel.com> > Sent: Tuesday, July 9, 2024 8:57 AM > To: intel-gfx@lists.freedesktop.org > Cc: jani.nikula@linux.intel.com; ville.syrjala@linux.intel.com; Golani, > Mitulkumar Ajitkumar <mitulkumar.ajitkumar.golani@intel.com> > Subject: [PATCH 08/10] drm/i915/vrr: Avoid sending PUSH when VRR TG is used > with Fixed refresh rate > > As per Bspec:68925: Push enable must be set if not configuring for a fixed > refresh rate (i.e Vmin == Flipline == Vmax is not true). > > Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> > --- > drivers/gpu/drm/i915/display/intel_vrr.c | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c > b/drivers/gpu/drm/i915/display/intel_vrr.c > index 43b772f91556..43ade1c24784 100644 > --- a/drivers/gpu/drm/i915/display/intel_vrr.c > +++ b/drivers/gpu/drm/i915/display/intel_vrr.c > @@ -316,7 +316,7 @@ void intel_vrr_send_push(const struct intel_crtc_state > *crtc_state) > struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; > > - if (!crtc_state->vrr.enable) > + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) > return; > > intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), @@ > -329,7 +329,7 @@ bool intel_vrr_is_push_sent(const struct intel_crtc_state > *crtc_state) > struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); > enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; > > - if (!crtc_state->vrr.enable) > + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) > return false; > > return intel_de_read(dev_priv, TRANS_PUSH(dev_priv, > cpu_transcoder)) & TRANS_PUSH_SEND; @@ -343,8 +343,9 @@ void > intel_vrr_enable(const struct intel_crtc_state *crtc_state) > if (!crtc_state->vrr.enable) > return; > > - intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), > - TRANS_PUSH_EN); > + if (!crtc_state->vrr.fixed_rr) > + intel_de_write(dev_priv, TRANS_PUSH(dev_priv, > cpu_transcoder), > + TRANS_PUSH_EN); > Changes LGTM. Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> > if (HAS_AS_SDP(dev_priv)) > intel_de_write(dev_priv, > -- > 2.40.1
diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c index 43b772f91556..43ade1c24784 100644 --- a/drivers/gpu/drm/i915/display/intel_vrr.c +++ b/drivers/gpu/drm/i915/display/intel_vrr.c @@ -316,7 +316,7 @@ void intel_vrr_send_push(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; - if (!crtc_state->vrr.enable) + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) return; intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), @@ -329,7 +329,7 @@ bool intel_vrr_is_push_sent(const struct intel_crtc_state *crtc_state) struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = crtc_state->cpu_transcoder; - if (!crtc_state->vrr.enable) + if (!crtc_state->vrr.enable || crtc_state->vrr.fixed_rr) return false; return intel_de_read(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder)) & TRANS_PUSH_SEND; @@ -343,8 +343,9 @@ void intel_vrr_enable(const struct intel_crtc_state *crtc_state) if (!crtc_state->vrr.enable) return; - intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), - TRANS_PUSH_EN); + if (!crtc_state->vrr.fixed_rr) + intel_de_write(dev_priv, TRANS_PUSH(dev_priv, cpu_transcoder), + TRANS_PUSH_EN); if (HAS_AS_SDP(dev_priv)) intel_de_write(dev_priv,
As per Bspec:68925: Push enable must be set if not configuring for a fixed refresh rate (i.e Vmin == Flipline == Vmax is not true). Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> --- drivers/gpu/drm/i915/display/intel_vrr.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)