From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesse Barnes Subject: Re: [PATCH 2/2] drm: add support for private planes Date: Thu, 5 Jan 2012 07:58:44 -0800 Message-ID: <20120105075844.00a5f0bf@jbarnes-desktop> References: <1323829176-4543-1-git-send-email-rob.clark@linaro.org> <1323829176-4543-2-git-send-email-rob.clark@linaro.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0380172592==" Return-path: Received: from oproxy5-pub.bluehost.com (oproxy5-pub.bluehost.com [67.222.38.55]) by gabe.freedesktop.org (Postfix) with SMTP id F2A3E9E7A0 for ; Thu, 5 Jan 2012 07:58:49 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Rob Clark Cc: dri-devel@lists.freedesktop.org, patches@linaro.org List-Id: dri-devel@lists.freedesktop.org --===============0380172592== Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/XKJkInEwy0ihlKLvFV2RSB2"; protocol="application/pgp-signature" --Sig_/XKJkInEwy0ihlKLvFV2RSB2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 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()) >=20 > BR, > -R >=20 > On Tue, Dec 13, 2011 at 8:19 PM, Rob Clark wrote: > > From: Rob Clark > > > > 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 > > --- > > =A0drivers/gpu/drm/drm_crtc.c | =A0 22 +++++++++++++++++----- > > =A0include/drm/drm_crtc.h =A0 =A0 | =A0 =A03 ++- > > =A02 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); > > =A0int drm_plane_init(struct drm_device *dev, struct drm_plane *plane, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 unsigned long possible_crtcs, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 const struct drm_plane_funcs *funcs, > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0uint32_t *formats, uint32_t format= _count) > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0const uint32_t *formats, uint32_t = format_count, > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0bool priv) > > =A0{ > > =A0 =A0 =A0 =A0mutex_lock(&dev->mode_config.mutex); > > > > @@ -576,8 +577,16 @@ int drm_plane_init(struct drm_device *dev, struct = drm_plane *plane, > > =A0 =A0 =A0 =A0plane->format_count =3D format_count; > > =A0 =A0 =A0 =A0plane->possible_crtcs =3D possible_crtcs; > > > > - =A0 =A0 =A0 list_add_tail(&plane->head, &dev->mode_config.plane_list); > > - =A0 =A0 =A0 dev->mode_config.num_plane++; > > + =A0 =A0 =A0 /* private planes are not exposed to userspace, but depen= ding on > > + =A0 =A0 =A0 =A0* display hardware, might be convenient to allow shari= ng programming > > + =A0 =A0 =A0 =A0* for the scanout engine with the crtc implementation. > > + =A0 =A0 =A0 =A0*/ > > + =A0 =A0 =A0 if (!priv) { > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 list_add_tail(&plane->head, &dev->mode_co= nfig.plane_list); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev->mode_config.num_plane++; > > + =A0 =A0 =A0 } else { > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 INIT_LIST_HEAD(&plane->head); > > + =A0 =A0 =A0 } > > > > =A0 =A0 =A0 =A0mutex_unlock(&dev->mode_config.mutex); > > > > @@ -592,8 +601,11 @@ void drm_plane_cleanup(struct drm_plane *plane) > > =A0 =A0 =A0 =A0mutex_lock(&dev->mode_config.mutex); > > =A0 =A0 =A0 =A0kfree(plane->format_types); > > =A0 =A0 =A0 =A0drm_mode_object_put(dev, &plane->base); > > - =A0 =A0 =A0 list_del(&plane->head); > > - =A0 =A0 =A0 dev->mode_config.num_plane--; > > + =A0 =A0 =A0 /* if not added to a list, it must be a private plane */ > > + =A0 =A0 =A0 if (!list_empty(&plane->head)) { > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 list_del(&plane->head); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 dev->mode_config.num_plane--; > > + =A0 =A0 =A0 } > > =A0 =A0 =A0 =A0mutex_unlock(&dev->mode_config.mutex); > > =A0} > > =A0EXPORT_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, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0struct drm_plane *pl= ane, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unsigned long possib= le_crtcs, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0const struct drm_pla= ne_funcs *funcs, > > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 uint32_t *formats, ui= nt32_t format_count); > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 const uint32_t *forma= ts, uint32_t format_count, > > + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 bool private); > > =A0extern void drm_plane_cleanup(struct drm_plane *plane); > > > > =A0extern void drm_encoder_cleanup(struct drm_encoder *encoder); > > -- > > 1.7.5.4 > > >=20 --Sig_/XKJkInEwy0ihlKLvFV2RSB2 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJPBci0AAoJEIEoDkX4Qk9h8EMP/R+6R0wW/KxdIxiwwVOUa+V4 OWhiCUNxCmfqoGAXHEC28zLwc4u0Vc1/MgtSUwquefU7KKo7Eg8SREE4a8OVkLSF RZvLPw9YBXWaGGhwErR+A/1F9btiKU/yl4FmpH5TlyECi7omV9L+9YGYcY7hAmlg vJP+mtryOoo0goO9rjAzKkoAywlxbhGw7flKZboNeZTTG7kto1DNtFUA7ei5GlXx hTag10WskcCTR2k5VsJWSSp4T7PAhhVA8BQL+G3S77u9LhOpHl5eVnODtcMH2EQU WCdg6pREfjbOMg8yyHtWF7vt1LcFmJfRbCrC3fkdv35vJY3gx3ci6ZbOL5i/zdAp Fl7abd/KifM6WMVrOyRv3sVrl0B0okqlqM37z7lnyKnFcAyUzJdzAoW0x4PlVZGs 4M0MJfi8vzGSkYOVUZmHuOru7mcBhmCE5cHK3UsSXEe8wk7Jq2qETd7cCu6aAuZL C95sAQrV3Rwgf8EO/Rf0F2D7wTHGpQhVfoc7tfPpkNyCV4A1+U7ber9ltmK++8Ww pmczLrg713Q6zD4RLRZxW68+ZcwkRZQp6MjAm5iZivm5fHRDEUV+Op9+lFXnBFDY J7DKxKneRa+3MCtceMhkgCTCHSnYLDPgvmaDHICq8KOY+L0aDzoVDLzAuBTQSje6 xbeRPmqGfFUGWZK9NwO5 =qABb -----END PGP SIGNATURE----- --Sig_/XKJkInEwy0ihlKLvFV2RSB2-- --===============0380172592== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0380172592==--