[Intel-gfx] [PATCH v3 2/5] drm/i915: Move the initial fastset commit check to encoder hooks

Imre Deak imre.deak at intel.com
Tue Oct 6 10:05:15 UTC 2020


On Tue, Oct 06, 2020 at 01:00:21PM +0300, Jani Nikula wrote:
> On Tue, 06 Oct 2020, Imre Deak <imre.deak at intel.com> wrote:
> > On Tue, Oct 06, 2020 at 12:42:58PM +0300, Jani Nikula wrote:
> >> On Tue, 06 Oct 2020, Imre Deak <imre.deak at intel.com> wrote:
> >> > +static bool gen11_dsi_initial_fastset_check(struct intel_encoder *encoder,
> >> > +					    struct intel_crtc_state *crtc_state)
> >> > +{
> >> > +	if (crtc_state->dsc.compression_enable) {
> >> > +		drm_dbg_kms(encoder->base.dev, "Forcing full modeset due to DSC being enabled\n");
> >> > +		crtc_state->uapi.mode_changed = true;
> >> 
> >> Just musing... if it's a *check*, why do we pass in a non-const
> >> crtc_state and modify it here?
> >> 
> >> Would it not be cleaner to pass in const crtc_state and set
> >> crtc_state->uapi.mode_changed in the caller based on the return value?
> >
> > The encoder can update the *_changed flags in crtc_state depending on
> > what is preventing a fastset.
> 
> Okay... is this a good design? ;)

That's how atomic_check hooks work..

> 
> BR,
> Jani.
> 
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center


More information about the Intel-gfx mailing list