[Intel-gfx] [PATCH] drm/i915/display: Read planes watermarks during initial state readout
Souza, Jose
jose.souza at intel.com
Fri Feb 19 20:16:25 UTC 2021
On Fri, 2021-02-19 at 21:46 +0200, Ville Syrjälä wrote:
> On Fri, Feb 19, 2021 at 11:16:23AM -0800, José Roberto de Souza wrote:
> > Without this readout all plane watermarks will be kept at zero in the
> > initial state readount causing two problems.
> >
> > All active planes will always have their watermarks programmed
> > again, even if what firmware programmed matches with the sanitized
> > state during driver takeover.
> >
> > State mismatch errors in disabled planes as watermarks will erroneous
> > match with the calculated state if firmware left watermark registers
> > with non-zero values.
> >
> > Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_display.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index d0da88751c72..14fba4411be7 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -13620,6 +13620,8 @@ static void intel_modeset_readout_hw_state(struct drm_device *dev)
> > drm_calc_timestamping_constants(&slave->base,
> > &slave_crtc_state->hw.adjusted_mode);
> > }
> > +
> > + skl_pipe_wm_get_hw_state(crtc, &crtc_state->wm.skl.optimal);
>
> Strange. skl_wm_get_hw_state() should be doing this already.
It is only doing some ddb readouts noting related to plane watermarks, maybe call skl_pipe_wm_get_hw_state() from there would be better?
>
> > }
> > }
> >
> >
> >
> >
> > --
> > 2.30.1
>
More information about the Intel-gfx
mailing list