[PATCH 2/2] drm: simple_kms_helper: add support for bridges

Andrea Merello andrea.merello at gmail.com
Wed Aug 24 06:21:55 UTC 2016


On Tue, Aug 23, 2016 at 10:01 PM, Daniel Vetter <daniel at ffwll.ch> wrote:

> On Tue, Aug 23, 2016 at 06:44:18PM +0200, Andrea Merello wrote:
> > On Tue, Aug 23, 2016 at 5:54 PM, Daniel Vetter <daniel at ffwll.ch> wrote:
> >
> > > On Tue, Aug 23, 2016 at 05:39:36PM +0200, Andrea Merello wrote:
> > > > On Tue, Aug 23, 2016 at 5:20 PM, Daniel Vetter <daniel at ffwll.ch>
> wrote:
> > > >
> > > > > On Tue, Aug 23, 2016 at 04:08:04PM +0200, Andrea Merello wrote:
> > > > > > Introduce drm_simple_display_pipe_attach_bridge() in order
> > > > > > to make it possible to use drm encoders with the simple display
> > > > > > pipes managed by simple_kms_helpers
> > > > > >
> > > > > > Suggested-by: Daniel Vetter <daniel at ffwll.ch>
> > > > > > Signed-off-by: Andrea Merello <andrea.merello at gmail.com>
> > > > > > Cc: Noralf Trønnes <noralf at tronnes.org>
> > > > > > Cc: Daniel Vetter <daniel at ffwll.ch>
> > > > > > Cc: David Airlie <airlied at linux.ie>
> > > > >
> > > > > Threading of your patch series is somehow broken, usually that
> should
> > > all
> > > > > work nicely if you've set up git send-email.
> > > > >
> > > > > One question: Should we ahve a drm_simple_display_pipe_
> detach_bridge
> > > (for
> > > > > cleanup) too?
> > > > >
> > > >
> > > > Unsure if it worths. May be nice to have a balanced pair, but it
> would
> > > > probably end up in
> > > > a quite redundant one-line func, that only calls drm_bridge_detach
> with
> > > the
> > > > very same argument.
> > > >
> > > > ..But of course if you want I can add it in v2 series.
> > >
> > > Yes it's just going to be a one-line, but it'll do a typecast and so
> > > better encapsulate the internals of the simple pipe helper.
> >
> >
> > I'm unsure about what do you mean here. Why a typecast?
> >
> > Wouldn't it be simply drm_simple_display_pipe_detach_bridge(struct
> > drm_bridge *bridge) calling in turn drm_detach_bridge(struct drm_bridge
> > *bridge) with the very same argument?
> >
> > Or if you want to stay behind the pipe, then it could be
> > drm_simple_display_pipe_detach_bridge(struct drm_simple_display_pipe
> *pipe),
> > but I would say it just does something like
> > drm_bridge_detach(pipe->encoder.bridge), so I don't really get your
> point
> > about the cast, sorry..
>
> Yeah, the latter is what I mean. That way drivers don't have to dig around
> in the details of pipe. And it wouldn't be entirely just a wrapper, I
> think it'd be good to also clear pipe->encoder.bridge to NULL.
>
> Yes, since I'm assigning it in drm_simple_display_pipe_attach_bridge, it
seems good to clear it in drm_simple_display_pipe_detach.


> Or do you think this is entirely pointless? Sometimes I do go overboard
> with curating pretty little functions ;-)
>

I guess it shouldn't hurt anyway :)

Andrea

> -Daniel
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160824/f92aff27/attachment.html>


More information about the dri-devel mailing list