From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
dri-devel@lists.freedesktop.org, vincent.abriou@st.com,
fabien.dessenne@st.com, daniel@ffwll.ch
Subject: Re: [PATCH 1/3] drm: Add callbacks for late registering
Date: Mon, 20 Jun 2016 18:54:23 +0300 [thread overview]
Message-ID: <20160620155423.GU4329@intel.com> (raw)
In-Reply-To: <20160620153036.GA21655@nuc-i3427.alporthouse.com>
On Mon, Jun 20, 2016 at 04:30:36PM +0100, Chris Wilson wrote:
> On Mon, Jun 20, 2016 at 05:22:55PM +0200, Benjamin Gaignard wrote:
> > Like what has been done for connectors add callbacks on encoder,
> > crtc and plane to let driver do actions after drm device registration.
> >
> > Correspondingly, add callbacks called before unregister drm device.
> >
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> > ---
> > drivers/gpu/drm/drm_drv.c | 42 ++++++++++++++++++++++++++
> > include/drm/drm_crtc.h | 77 +++++++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 119 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index c7101c0..b4f7f62 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -666,6 +666,9 @@ EXPORT_SYMBOL(drm_dev_unref);
> > int drm_dev_register(struct drm_device *dev, unsigned long flags)
> > {
> > int ret;
> > + struct drm_crtc *crtc;
> > + struct drm_plane *plane;
> > + struct drm_encoder *encoder;
> >
> > mutex_lock(&drm_global_mutex);
> >
> > @@ -690,6 +693,27 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags)
> > if (drm_core_check_feature(dev, DRIVER_MODESET))
> > drm_connector_register_all(dev);
>
> Look above for the ouch.
>
> >
> > + drm_for_each_crtc(crtc, dev) {
> > + if (crtc->funcs->late_register)
> > + ret = crtc->funcs->late_register(crtc);
> > + if (ret)
> > + goto err_minors;
> > + }
>
> For the sake of conformity, is it worth adding drm_crtc_register_all()
> et all?
>
> Then a drm_modeset_register_all ? (i.e.
> if (drm_core_check_feature(dev, DRIVER_MODESET))
> drm_modeset_register_all(dev);
> -> { connector, encoder, plane, crtc )
>
> Also, is the logical order
>
> drm_connector_register_all();
> drm_encoder_register_all();
> drm_plane_register_all();
> drm_crtc_register_all();
>
> or the other way around (basically working from output back to input, or
> input to output)?
input to output would make sense to me. Once the output appears
everything upstream of it would then be in place already.
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-06-20 15:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 15:22 [PATCH 0/3] Add callbacks for late registering Benjamin Gaignard
2016-06-20 15:22 ` [PATCH 1/3] drm: " Benjamin Gaignard
2016-06-20 15:30 ` Chris Wilson
2016-06-20 15:54 ` Ville Syrjälä [this message]
2016-06-20 15:22 ` [PATCH 2/3] drm: sti: use late_register and early_unregister callbacks Benjamin Gaignard
2016-06-20 15:22 ` [PATCH 3/3] drm: sti: rework init sequence Benjamin Gaignard
2016-06-20 15:38 ` Chris Wilson
2016-06-20 17:40 ` Emil Velikov
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=20160620155423.GU4329@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=benjamin.gaignard@linaro.org \
--cc=chris@chris-wilson.co.uk \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabien.dessenne@st.com \
--cc=vincent.abriou@st.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.