From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Rob Clark <rob@ti.com>
Cc: dri-devel@lists.freedesktop.org, patches@linaro.org
Subject: Re: [PATCH 2/2] drm: add support for private planes
Date: Thu, 5 Jan 2012 07:58:44 -0800 [thread overview]
Message-ID: <20120105075844.00a5f0bf@jbarnes-desktop> (raw)
In-Reply-To: <CAF6AEGvQBVFqWmR=Ni8vQjjqq0pXjy=cb4NkQYZ5w2PTw9zc6Q@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 4186 bytes --]
Ok no problem. I think Keith just queued up the i915 bits, but I don't
think they've made their way to Dave yet.
Jesse
On Wed, 4 Jan 2012 22:55:31 -0600
Rob Clark <rob@ti.com> wrote:
> note: looks like I need to rebase this patch after exynos drm driver
> was pulled to drm-next.. if there are some other consumers that are
> waiting to be pulled, let me know and I'll just rebase on top of that.
> (Either way, it would be a trivial merge conflict.. just add FALSE as
> additional arg to drm_plane_init())
>
> BR,
> -R
>
> On Tue, Dec 13, 2011 at 8:19 PM, Rob Clark <rob.clark@linaro.org> wrote:
> > From: Rob Clark <rob@ti.com>
> >
> > In cases where the scanout hw is sufficiently similar between "overlay"
> > and traditional crtc layers, it might be convenient to allow the driver
> > to create internal drm_plane helper objects used by the drm_crtc
> > implementation, rather than duplicate code between the plane and crtc.
> > A private plane is not exposed to userspace.
> >
> > Signed-off-by: Rob Clark <rob@ti.com>
> > ---
> > drivers/gpu/drm/drm_crtc.c | 22 +++++++++++++++++-----
> > include/drm/drm_crtc.h | 3 ++-
> > 2 files changed, 19 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> > index 6dad421..d73746e 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -557,7 +557,8 @@ EXPORT_SYMBOL(drm_encoder_cleanup);
> > int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
> > unsigned long possible_crtcs,
> > const struct drm_plane_funcs *funcs,
> > - uint32_t *formats, uint32_t format_count)
> > + const uint32_t *formats, uint32_t format_count,
> > + bool priv)
> > {
> > mutex_lock(&dev->mode_config.mutex);
> >
> > @@ -576,8 +577,16 @@ int drm_plane_init(struct drm_device *dev, struct drm_plane *plane,
> > plane->format_count = format_count;
> > plane->possible_crtcs = possible_crtcs;
> >
> > - list_add_tail(&plane->head, &dev->mode_config.plane_list);
> > - dev->mode_config.num_plane++;
> > + /* private planes are not exposed to userspace, but depending on
> > + * display hardware, might be convenient to allow sharing programming
> > + * for the scanout engine with the crtc implementation.
> > + */
> > + if (!priv) {
> > + list_add_tail(&plane->head, &dev->mode_config.plane_list);
> > + dev->mode_config.num_plane++;
> > + } else {
> > + INIT_LIST_HEAD(&plane->head);
> > + }
> >
> > mutex_unlock(&dev->mode_config.mutex);
> >
> > @@ -592,8 +601,11 @@ void drm_plane_cleanup(struct drm_plane *plane)
> > mutex_lock(&dev->mode_config.mutex);
> > kfree(plane->format_types);
> > drm_mode_object_put(dev, &plane->base);
> > - list_del(&plane->head);
> > - dev->mode_config.num_plane--;
> > + /* if not added to a list, it must be a private plane */
> > + if (!list_empty(&plane->head)) {
> > + list_del(&plane->head);
> > + dev->mode_config.num_plane--;
> > + }
> > mutex_unlock(&dev->mode_config.mutex);
> > }
> > EXPORT_SYMBOL(drm_plane_cleanup);
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index dd55727..1354ef5 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -828,7 +828,8 @@ extern int drm_plane_init(struct drm_device *dev,
> > struct drm_plane *plane,
> > unsigned long possible_crtcs,
> > const struct drm_plane_funcs *funcs,
> > - uint32_t *formats, uint32_t format_count);
> > + const uint32_t *formats, uint32_t format_count,
> > + bool private);
> > extern void drm_plane_cleanup(struct drm_plane *plane);
> >
> > extern void drm_encoder_cleanup(struct drm_encoder *encoder);
> > --
> > 1.7.5.4
> >
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2012-01-05 15:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-14 2:19 [PATCH 1/2] drm: disconnect plane from fb/crtc when disabled Rob Clark
2011-12-14 2:19 ` [PATCH 2/2] drm: add support for private planes Rob Clark
2012-01-05 4:55 ` Rob Clark
2012-01-05 15:58 ` Jesse Barnes [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=20120105075844.00a5f0bf@jbarnes-desktop \
--to=jbarnes@virtuousgeek.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=patches@linaro.org \
--cc=rob@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox