Hi Philipp, Pekka,

On Thu, 2018-02-22 at 10:29 +0200, Pekka Paalanen wrote:
> On Wed, 21 Feb 2018 17:16:07 +0100
> Philipp Zabel <p.za...@pengutronix.de> wrote:
> 
> > Hi Marius,
> > 
> > On Wed, 2018-02-21 at 16:49 +0200, Marius Vlad wrote:
> > > Signed-off-by: Marius Vlad <marius-cristian.v...@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_@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. 


Marking "leasable" an output using "non-desktop" can remove the need to
have a "lease" option in the config file. I see this working nicely
with HMDs. "non-desktop" property can also remove the need to iterate
over all connected connectors and request a lease (or at least the need
to talk to weston). The client still needs to go over each connectors
but this time, it requests the lease directly. 

On the other hand for Auto, the EDID quirk might not be available so 
we still need a method which can tell (hint) which output can be
leased. The configuration file allows a way to control that. (i.e, 
in under no circumstance I want this output to be disabled/leased)

Can a combination of both be more suitable to fit both use-cases?

- Mark "leasable" any "non-desktop" property but also the ones found in
configuration file.

- For the client, if it finds a "non-desktop" property for that
connector it can use it directly, other-wise fall-backs to request a
lease for each connected connector. 



> 
> 
> Thanks,
> pq
_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to