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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 06, 2020 at 01:00:21PM +0300, Jani Nikula wrote:
> On Tue, 06 Oct 2020, Imre Deak <imre.deak@xxxxxxxxx> wrote:
> > On Tue, Oct 06, 2020 at 12:42:58PM +0300, Jani Nikula wrote:
> >> On Tue, 06 Oct 2020, Imre Deak <imre.deak@xxxxxxxxx> 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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux