Re: Positioning and Multi display support for Weston Wayland

2018-05-18 Thread Pekka Paalanen
On Fri, 18 May 2018 10:24:22 +
Marius-cristian Vlad  wrote:

> On Fri, 2018-05-18 at 13:08 +0300, Pekka Paalanen wrote:

> > It has been impossible to run more than one compositor instance on
> > the
> > same DRM device node, and this is still true today with Weston. DRM
> > leases is a new kernel feature that would allow one compositor to
> > "lease" some display resources to another compositor instance, but
> > the
> > Weston support for giving out leases is only coming, and Weston
> > running
> > on a lease development has not started yet AFAIK.  
> 
> Some attempts have been posted albeit they haven't got too much review,
> and will have to be adapted due to clone changes. 
> 
> https://lists.freedesktop.org/archives/wayland-devel/2018-February/036947.html
> 

Yes, this is the effort I referred to, I have a mental note to review
it when I get a chance.


Thanks,
pq


pgp1EhnrPOSiq.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: Positioning and Multi display support for Weston Wayland

2018-05-18 Thread Marius-cristian Vlad
wanted to
> > confirm can this be achieved with a single compositor instance?
> 
> Theoretically yes, in practice the current state of Weston might fall
> a
> little short.
> 
> The extended mode is the only mode Weston does at the moment, so
> that's
> good. Where it falls short are output timings (we have nothing to
> actually synchronize the output refresh cycles, so you can have
> timing
> differences up to the longest refresh period) and layout
> configuration,
> as I mentioned before. I do think that developing Weston to implement
> these lacking features would be welcome. Synchronizing outputs will
> need also kernel driver and API support, mind.
> 
> 
> Thanks,
> pq
> 
> 
> > -Original Message-
> > From: Pekka Paalanen [mailto:ppaala...@gmail.com] 
> > Sent: 17 May 2018 17:48
> > To: Sandeep Chandak 
> > Cc: wayland-devel@lists.freedesktop.org
> > Subject: Re: Positioning and Multi display support for Weston
> > Wayland
> > 
> > On Wed, 16 May 2018 06:41:08 +
> > Sandeep Chandak  wrote:
> > 
> > > Hi,
> > > 
> > > We are using Weston Wayland based compositing for our solution,
> > > though we are able to render image, video text etc.
> > > 
> > > We are using x11 backend along with desktop shell to build the 
> > > solution which requires rendering of multiple media contents
> > > (image, videos etc) together. We are using following versions of
> > > packages 
> > 
> > Hi,
> > 
> > I presume the x11-backend is only for development purposes and the
> > final product will run on DRM-backend instead.
> > 
> > > 
> > > a)   Weston - version 5.0
> > > 
> > > b)  Wayland - version 1.15.0
> > > 
> > > c)   Ubuntu 16.04
> > > 
> > > d)  Hardware - Intel i5 processors
> > > 
> > > e)  Cairo - 1.14 with EGL/OpenGL ES enabled
> > > 
> > > We have below queries for which we need some inputs
> > > 
> > > 
> > > a)   Positioning of windows - We would like to position
> > > windows
> > > to a specific x,y location. However, we see that Weston positions
> > > it at a random location. We would like to confirm if positioning
> > > of 
> > > windows to specific location is supported by Weston.  
> > 
> > No, you cannot position windows from the application into specific
> > x,y coordinates chosen by the application. There are a couple of
> > design approaches to achieve the positioning you want:
> > 
> > What I would personally recommend is to modify the window manager
> > to
> > position your windows appropriately. You may need to write a new
> > protocol extension so that the application can tell the special
> > role
> > of the window to the compositor, so that the compositor can place
> > it
> > correctly in the space it happens to have available.
> > 
> > You could also write a protocol extension to allow explicit
> > positioning of windows from applications, but that will have the
> > problem that any single application will be completely unaware of
> > any
> > other applications' windows or desktop elements. Explicit
> > positioning
> > in applications may seem like an easy solution at first, but it
> > really only works in extremely narrow use cases. I consider it as a
> > workaround, not a solution.
> > 
> > However, depending on your use case, there might be much more
> > straightforward solutions.
> > 
> > > 
> > > b)  Multi display Support - We need to support following use
> > > cases and would like to confirm if this is currently supported
> > > by 
> > > Weston?
> > > 
> > > *   Cloned display (same content on multiple screens)  
> > 
> > Shared-CRTC clone mode is available in Weston upstream master
> > branch,
> > but the final patch to allow it to be configured is not yet
> > reviewed:
> > https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2F
> > patchwork.freedesktop.org%2Fpatch%2F217906%2F&data=02%7C01%7Cmarius
> > -cristian.vlad%40nxp.com%7Cfa1425f456fb4107c98e08d5bca75666%7C686ea
> > 1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636622349257323713&sdata=oGyj
> > 1s15%2FZUtR0yS2FqdiPVrIJQVcx0ioyBz0fZrpAA%3D&reserved=0
> > 
> > Note, that shared-CRTC clone mode requires hardware support that
> > recent Intel display controllers do not have as far as I k

Re: Positioning and Multi display support for Weston Wayland

2018-05-18 Thread Pekka Paalanen
On Fri, 18 May 2018 08:25:26 +
Sandeep Chandak  wrote:

> Hi Pekka,
> 
> Thanks for a detailed response, need some more clarifications though
> 
> The final solution will use drm-backend we are in process of getting
> the drm-backend work on the platform, while we use x11-backend for
> development.
> 
> a)  I assume from Shared-CRTC support you mean monitors with same
> resolutions, refresh rate etc. So cloned mode is supported for use
> cases for displays with similar properties for resolution, refresh
> rate etc.

Yes. It literally means using the same CRTC to feed several connectors,
which means they share the video mode and timings. This requires
explicit support in hardware, and whether it is available varies
between chips.

> Is this supported for x11-backend also?

Not currently, and there are no plans to do so. You would simply have
two windows with the same content, and I'm not sure what the benefit of
supporting that would be. The only visible difference is that all heads
advertise their own wl_output globals, so in clone mode you would get
two (or more) wl_outputs that behave identically while reporting
per-monitor details.

If independent-CRTC mode worked, you could just use that with the
x11-backend, as the only difference with a proper configuration would
be the output timings, and the x11-backend is bad with timings anyway.

> As you mentioned
> Independent-CRTC mode (i.e monitors with different refresh rate etc),
> cloning is not supported currently. Can you please confirm if this
> understanding is correct?

Yes.

You can read more about the clone mode design here:
https://phabricator.freedesktop.org/T7727

> b) Different configuration for us means - Either a single or multiple
> compositor instance (running on same physical hardware) driving
> different monitors to display different composited content. In this
> case the displays can be placed far off from each other. I assume
> this would be supported. Please confirm? 

Sorry, I'm not sure I understand. The only case I have talked about
here is a single Weston compositor instance controlling all outputs.

It has been impossible to run more than one compositor instance on the
same DRM device node, and this is still true today with Weston. DRM
leases is a new kernel feature that would allow one compositor to
"lease" some display resources to another compositor instance, but the
Weston support for giving out leases is only coming, and Weston running
on a lease development has not started yet AFAIK.

If your system has multiple display devices (DRM card device nodes),
then it should be possible to run a Weston instance on each
simultaneously, though I'm not sure it has been tested.

Different Weston instances are naturally independent from each other,
but the outputs inside a single instance are all naturally part of the
same extended desktop without isolation between the outputs. It is
possible to write code to isolate outputs at the window manager level,
but I'm not sure it would be enough for a nice user experience. Hence
for independent seats, I would recommed separate Weston instances.

If your aim is to use a single computer to drive several physical seats
(monitors, input devices), then if you have a DRM card device node for
each seat it should be mostly a configuration issue to get that
running. If you need to share the same DRM card node between several
physical seats, then you would need a single host compositor and guest
compositors for each seat. This could use DRM leases, fullscreen-shell
extension, or normal fullscreen windows in the host compositor, but I
believe they would all require some development effort.

> c) Extended/Tiled mode for us means - Multiple monitors connected to
> form a larger display (e.g. Video wall use case), just wanted to
> confirm can this be achieved with a single compositor instance?

Theoretically yes, in practice the current state of Weston might fall a
little short.

The extended mode is the only mode Weston does at the moment, so that's
good. Where it falls short are output timings (we have nothing to
actually synchronize the output refresh cycles, so you can have timing
differences up to the longest refresh period) and layout configuration,
as I mentioned before. I do think that developing Weston to implement
these lacking features would be welcome. Synchronizing outputs will
need also kernel driver and API support, mind.


Thanks,
pq


> -Original Message-
> From: Pekka Paalanen [mailto:ppaala...@gmail.com] 
> Sent: 17 May 2018 17:48
> To: Sandeep Chandak 
> Cc: wayland-devel@lists.freedesktop.org
> Subject: Re: Positioning and Multi display support for Weston Wayland
> 
> On Wed, 16 May 2018 06:41:08 +
> Sandeep Chandak  wrote:
> 
> > Hi,
> > 
> > We are using Weston Wayland based compositing for our solution,
> >

RE: Positioning and Multi display support for Weston Wayland

2018-05-18 Thread Sandeep Chandak
Hi Pekka,

Thanks for a detailed response, need some more clarifications though

The final solution will use drm-backend we are in process of getting the 
drm-backend work on the platform, while we use x11-backend for development.

a)  I assume from Shared-CRTC support you mean monitors with same resolutions, 
refresh rate etc. So cloned mode is supported for use cases for displays with 
similar properties for resolution, refresh rate etc. Is this supported for 
x11-backend also? As you mentioned Independent-CRTC mode (i.e monitors with 
different refresh rate etc), cloning is not supported currently. Can you please 
confirm if this understanding is correct?

b) Different configuration for us means - Either a single or multiple 
compositor instance (running on same physical hardware) driving different 
monitors to display different composited content. In this case the displays can 
be placed far off from each other. I assume this would be supported. Please 
confirm? 

c) Extended/Tiled mode for us means - Multiple monitors connected to form a 
larger display (e.g. Video wall use case), just wanted to confirm can this be 
achieved with a single compositor instance?


Regards,
Sandeep



-Original Message-
From: Pekka Paalanen [mailto:ppaala...@gmail.com] 
Sent: 17 May 2018 17:48
To: Sandeep Chandak 
Cc: wayland-devel@lists.freedesktop.org
Subject: Re: Positioning and Multi display support for Weston Wayland

On Wed, 16 May 2018 06:41:08 +
Sandeep Chandak  wrote:

> Hi,
> 
> We are using Weston Wayland based compositing for our solution, though 
> we are able to render image, video text etc.
> 
> We are using x11 backend along with desktop shell to build the 
> solution which requires rendering of multiple media contents (image, 
> videos etc) together. We are using following versions of packages
> 

Hi,

I presume the x11-backend is only for development purposes and the final 
product will run on DRM-backend instead.

> 
> a)   Weston - version 5.0
> 
> b)  Wayland - version 1.15.0
> 
> c)   Ubuntu 16.04
> 
> d)  Hardware - Intel i5 processors
> 
> e)  Cairo - 1.14 with EGL/OpenGL ES enabled
> 
> We have below queries for which we need some inputs
> 
> 
> a)   Positioning of windows - We would like to position windows
> to a specific x,y location. However, we see that Weston positions it 
> at a random location. We would like to confirm if positioning of 
> windows to specific location is supported by Weston.

No, you cannot position windows from the application into specific x,y 
coordinates chosen by the application. There are a couple of design approaches 
to achieve the positioning you want:

What I would personally recommend is to modify the window manager to position 
your windows appropriately. You may need to write a new protocol extension so 
that the application can tell the special role of the window to the compositor, 
so that the compositor can place it correctly in the space it happens to have 
available.

You could also write a protocol extension to allow explicit positioning of 
windows from applications, but that will have the problem that any single 
application will be completely unaware of any other applications' windows or 
desktop elements. Explicit positioning in applications may seem like an easy 
solution at first, but it really only works in extremely narrow use cases. I 
consider it as a workaround, not a solution.

However, depending on your use case, there might be much more straightforward 
solutions.

> 
> b)  Multi display Support - We need to support following use
> cases and would like to confirm if this is currently supported by 
> Weston?
> 
> *   Cloned display (same content on multiple screens)

Shared-CRTC clone mode is available in Weston upstream master branch, but the 
final patch to allow it to be configured is not yet reviewed:
https://patchwork.freedesktop.org/patch/217906/

Note, that shared-CRTC clone mode requires hardware support that recent Intel 
display controllers do not have as far as I know.

Independent-CRTC clone mode is currently not supported due to design problems 
with damage tracking in libweston. Even if you could configure two 
weston_outputs to show the same area of the desktop, there would likely be 
problems with outdated contents on screen. This would be good to fix, but so 
far has not been a priority for anyone.

> 
> *   Extended display/Tiled (Multiple displays are combined to
> form a single display)

Weston supports extended display, but the output layout configuration is 
essentially missing. Currently you can only realize a single row of outputs in 
an implicit order. This too would be nice to fix.

There is no synchronization implemented as that would require kernel interfaces 
and hardware support, either gen-lock or variable refresh rate.

> 
> *   Differe

Re: Positioning and Multi display support for Weston Wayland

2018-05-17 Thread Pekka Paalanen
On Wed, 16 May 2018 06:41:08 +
Sandeep Chandak  wrote:

> Hi,
> 
> We are using Weston Wayland based compositing for our solution,
> though we are able to render image, video text etc.
> 
> We are using x11 backend along with desktop shell to build the
> solution which requires rendering of multiple media contents (image,
> videos etc) together. We are using following versions of packages
> 

Hi,

I presume the x11-backend is only for development purposes and the
final product will run on DRM-backend instead.

> 
> a)   Weston - version 5.0
> 
> b)  Wayland - version 1.15.0
> 
> c)   Ubuntu 16.04
> 
> d)  Hardware - Intel i5 processors
> 
> e)  Cairo - 1.14 with EGL/OpenGL ES enabled
> 
> We have below queries for which we need some inputs
> 
> 
> a)   Positioning of windows - We would like to position windows
> to a specific x,y location. However, we see that Weston positions it
> at a random location. We would like to confirm if positioning of
> windows to specific location is supported by Weston.

No, you cannot position windows from the application into specific x,y
coordinates chosen by the application. There are a couple of design
approaches to achieve the positioning you want:

What I would personally recommend is to modify the window manager to
position your windows appropriately. You may need to write a new
protocol extension so that the application can tell the special role of
the window to the compositor, so that the compositor can place it
correctly in the space it happens to have available.

You could also write a protocol extension to allow explicit positioning
of windows from applications, but that will have the problem that any
single application will be completely unaware of any other
applications' windows or desktop elements. Explicit positioning in
applications may seem like an easy solution at first, but it really
only works in extremely narrow use cases. I consider it as a
workaround, not a solution.

However, depending on your use case, there might be much more
straightforward solutions.

> 
> b)  Multi display Support - We need to support following use
> cases and would like to confirm if this is currently supported by
> Weston?
> 
> *   Cloned display (same content on multiple screens)

Shared-CRTC clone mode is available in Weston upstream master branch,
but the final patch to allow it to be configured is not yet reviewed:
https://patchwork.freedesktop.org/patch/217906/

Note, that shared-CRTC clone mode requires hardware support that recent
Intel display controllers do not have as far as I know.

Independent-CRTC clone mode is currently not supported due to design
problems with damage tracking in libweston. Even if you could configure
two weston_outputs to show the same area of the desktop, there would
likely be problems with outdated contents on screen. This would be good
to fix, but so far has not been a priority for anyone.

> 
> *   Extended display/Tiled (Multiple displays are combined to
> form a single display)

Weston supports extended display, but the output layout configuration is
essentially missing. Currently you can only realize a single row of
outputs in an implicit order. This too would be nice to fix.

There is no synchronization implemented as that would require kernel
interfaces and hardware support, either gen-lock or variable refresh
rate.

> 
> *   Different (Different displays rendering different content)

How does this differ from Extended display?

> 
> *   Portrait/Landscape orientation (this we believe is supported
> via configuring Weston.ini)

Yes.


Thanks,
pq


pgphugZi8N4gz.pgp
Description: OpenPGP digital signature
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel