[PATCH 3/3] drm/atomic: Refuse to steal encoders from connectors not part of the state.

Ville Syrjälä ville.syrjala at linux.intel.com
Thu Feb 18 12:59:52 UTC 2016


On Thu, Feb 18, 2016 at 01:43:11PM +0100, Daniel Vetter wrote:
> On Thu, Feb 18, 2016 at 12:18:53PM +0100, Maarten Lankhorst wrote:
> > Op 18-02-16 om 12:07 schreef Daniel Vetter:
> > > On Thu, Feb 18, 2016 at 09:54:43AM +0100, Maarten Lankhorst wrote:
> > >> Because encoder <-> connector mapping is fixed when not moving to
> > >> another crtc we can just reject connectors trying to steal an encoder
> > >> from a connector not part of the state. This won't break MST on i915
> > >> because in that case connectors will be part of the state if you switch
> > >> them between crtc's. If they're not they stay on the same crtc, and
> > >> encoder stealing would have failed anyway.
> > > We must do this for backwards compat. setCrtc on a connector that needs an
> > > encoder already used on some other crtc is supposed to disable that
> > > encoder (and the entire pipe if it's all unused) if we need it.
> > > -Daniel
> > >
> > Could this be done from the setcrtc helper? Seems with atomic that wouldn't be desired behavior.
> 
> If you want to avoid stealing with atomic, supply _all_ the
> connectors/crtcs when doing an atomic modeset. After all the point of
> atomic is to do global updates. I don't think it makes sense to have a
> special case just for setcrtc, since it makes compat/transition
> unecesserily complicated.

I disagree. Having properties change magically is just a bad idea IMO.
As far as checking for conflicts, IIRC I did that with a few bitmasks
in my original atomic code, and it was pretty trivial. The current
stealing  code we have is way too complicated for what it does IMO.

> And we do this kind of stealing in other places
> too with public api objects, e.g. if you move a plane.

Mm. What exactly do we steal with planes?

-- 
Ville Syrjälä
Intel OTC


More information about the dri-devel mailing list