[PATCH weston 1/2 v3] compositor-drm: Add support for DRM lease

Pekka Paalanen ppaalanen at gmail.com
Thu Feb 22 08:29:11 UTC 2018


On Wed, 21 Feb 2018 17:16:07 +0100
Philipp Zabel <p.zabel at pengutronix.de> wrote:

> Hi Marius,
> 
> On Wed, 2018-02-21 at 16:49 +0200, Marius Vlad wrote:
> > Signed-off-by: Marius Vlad <marius-cristian.vlad at nxp.com>
> > ---
> >  Makefile.am                |   2 +
> >  compositor/main.c          |   9 ++
> >  configure.ac               |   4 +
> >  libweston/compositor-drm.c | 272 +++++++++++++++++++++++++++++++++++++++++++++
> >  libweston/compositor.c     |   1 +
> >  libweston/compositor.h     |   2 +
> >  6 files changed, 290 insertions(+)
> > 
> > diff --git a/Makefile.am b/Makefile.am
> > index b5c29c0..439fa73 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -163,6 +163,8 @@ nodist_libweston_ at LIBWESTON_MAJOR@_la_SOURCES =				\
> >  	protocol/viewporter-server-protocol.h		\
> >  	protocol/linux-dmabuf-unstable-v1-protocol.c	\
> >  	protocol/linux-dmabuf-unstable-v1-server-protocol.h		\
> > +	protocol/drm-lease-unstable-v1-protocol.c	\
> > +	protocol/drm-lease-unstable-v1-server-protocol.h		\
> >  	protocol/relative-pointer-unstable-v1-protocol.c		\
> >  	protocol/relative-pointer-unstable-v1-server-protocol.h		\
> >  	protocol/pointer-constraints-unstable-v1-protocol.c		\
> > diff --git a/compositor/main.c b/compositor/main.c
> > index 18810f2..020553f 100644
> > --- a/compositor/main.c
> > +++ b/compositor/main.c
> > @@ -1092,6 +1092,15 @@ drm_backend_output_configure(struct wl_listener *listener, void *data)
> >  	api->set_seat(output, seat);
> >  	free(seat);
> >  
> > +	char *lease;
> > +	weston_config_section_get_string(section, "lease", &lease, "off");
> > +	if (!strncmp(lease, "on", 2)) {
> > +		output->lease = true;  
> 
> Should this be enabled by default for non-desktop outputs?
> 
> I suppose this is out of scope for this patchset, but I'd be curious
> if adding a non_desktop property to struct weston_output would be
> appropriate.

That property would belong in struct weston_head instead, introduced by
this series:
https://patchwork.freedesktop.org/series/32898/

I also think "leasable" would be orthogonal to "non-desktop" as well.
"leasable" applies more to the KMS resources, particularly the CRTC,
for which we don't currently have an object in the DRM-backend, but we
will need one to help with the handling of unused crtcs. "leasable"
would go well in that object.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20180222/2d8f58b2/attachment.sig>


More information about the wayland-devel mailing list