From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Mark Rutland <mark.rutland@arm.com>, Meng Yi <meng.yi@nxp.com>,
Xiubo Li <lixiubo@cmss.chinamobile.com>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Alison Wang <alison.wang@nxp.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
Rob Herring <robh+dt@kernel.org>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>,
Kumar Gala <galak@codeaurora.org>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
Jianwei Wang <jianwei.wang.chn@gmail.com>
Subject: Re: [PATCH v4 1/2] drm: bridge: Add sii902x driver
Date: Thu, 2 Jun 2016 10:04:15 +0200 [thread overview]
Message-ID: <20160602100415.32b26822@bbrezillon> (raw)
In-Reply-To: <20160601215602.GA7231@phenom.ffwll.local>
On Wed, 1 Jun 2016 23:56:02 +0200
Daniel Vetter <daniel@ffwll.ch> wrote:
> On Wed, Jun 01, 2016 at 06:03:37PM +0200, Boris Brezillon wrote:
> > On Tue, 17 May 2016 08:47:11 +0200
> > Daniel Vetter <daniel@ffwll.ch> wrote:
> >
> > > > +static struct drm_encoder *sii902x_best_encoder(struct drm_connector *connector)
> > > > +{
> > > > + struct sii902x *sii902x = connector_to_sii902x(connector);
> > > > +
> > > > + return sii902x->bridge.encoder;
> > > > +}
> > >
> > > drm_atomic_helper_best_encoder should do exactly this for you. If you feel
> > > board pimp the atomic helpers to call that one by default to even remove
> > > the vfunc assingment line ;-)
> >
> > Just to be sure, is that what you had in mind?
>
> Exactly, I'll pick this one up for drm-misc. btw if you're even more
> motivated, you can go through all drivers with a static mapping from
> connector to encoder, and nuke those functions. Since if it's just a
> static mapping, the only way to do it is like the helper does.
>
> Thanks, Daniel
> >
> > --->8---
> > From d218b7ea16ca35452b3174c83a207ecd406e5c88 Mon Sep 17 00:00:00 2001
> > From: Boris Brezillon <boris.brezillon@free-electrons.com>
> > Date: Wed, 1 Jun 2016 17:57:18 +0200
> > Subject: [PATCH] drm: atomic: Handle funcs->best_encoder == NULL case
> >
> > Fallback drm_atomic_helper_best_encoder() is funcs->best_encoder() is NULL
> > so that DRM drivers can leave this hook unassigned if they know they want
> > to use drm_atomic_helper_best_encoder().
Please don't apply the patch, it's buggy.
> >
> > Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
> > ---
> > drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> > index ddfa0d1..f6a3350 100644
> > --- a/drivers/gpu/drm/drm_atomic_helper.c
> > +++ b/drivers/gpu/drm/drm_atomic_helper.c
> > @@ -110,8 +110,10 @@ static int handle_conflicting_encoders(struct drm_atomic_state *state,
> >
> > if (funcs->atomic_best_encoder)
> > new_encoder = funcs->atomic_best_encoder(connector, conn_state);
> > - else
> > + else if (funcs->best_encoder)
> > new_encoder = funcs->best_encoder(connector);
> > + else
> > + new_encoder = drm_atomic_helper_best_encoder(connector);
> >
> > if (new_encoder) {
> > if (encoder_mask & (1 << drm_encoder_index(new_encoder))) {
> >
> >
> >
>
--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2016-06-02 8:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-16 14:04 [PATCH v4 1/2] drm: bridge: Add sii902x driver Boris Brezillon
2016-05-16 14:04 ` [PATCH v4 2/2] drm: bridge: add sii902x DT bindings doc Boris Brezillon
2016-05-16 16:46 ` Rob Herring
2016-05-17 6:47 ` [PATCH v4 1/2] drm: bridge: Add sii902x driver Daniel Vetter
2016-06-01 16:03 ` Boris Brezillon
2016-06-01 21:56 ` Daniel Vetter
2016-06-02 7:40 ` Boris Brezillon
2016-06-02 8:04 ` Boris Brezillon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160602100415.32b26822@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=alison.wang@nxp.com \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jianwei.wang.chn@gmail.com \
--cc=lixiubo@cmss.chinamobile.com \
--cc=mark.rutland@arm.com \
--cc=meng.yi@nxp.com \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).