OpenGL in USB Display Devices under wayland

Pekka Paalanen ppaalanen at gmail.com
Sun Jun 24 00:29:31 PDT 2012


On Sat, 23 Jun 2012 22:21:28 +0530
Sannu K <sannumail4foss at gmail.com> wrote:

> On Sat, Jun 23, 2012 at 2:04 AM, Casey Dahlin <cdahlin at redhat.com> wrote:
> 
> > On Fri, Jun 22, 2012 at 10:29:04PM +0300, Pekka Paalanen wrote:
> > > The trick is in the kernel DRM, which has to be able to deal with the
> > > buffer and actually push it to the USB device. This may require special
> > > allocation flags or somehow using the dmabuf infrastructure to allocate
> > > the buffer, where the composite is drawn.
> >
> > Pretty sure it's possible right now to just copy the buffer out to normal
> > userspace memory and then in to another DRM buffer. Not the quickest
> > transition, but functional.
> >
> > --CJD
> >
> 
> Does this mean wayland (rather weston) does not support multiple graphics
> card seamlessly (as of now without dmabuf patches)?

To my understanding, for now, correct.

> Consider that an
> application creates a DRM buffer and uses it for rendering, when user moves
> the window to another screen that is driven by another graphics card this
> case could appear. Will the memory content be copied (in current state)?

In current state, I do not think it would work at all.

You do not even have to think that far. Just think about how Weston
composites per output, and how a resulting buffer could be used on
an output that is on a different graphics card than what Weston uses
for compositing.

I have also never heard of a Wayland developer using a multi-card setup.

> Will there be a better solution without buffer sharing (what if the window
> buffer is in graphics card's RAM)? Please provide some pointers and/or
> documentation on how wayland and weston works (which libraries it calls for
> what purpose).

I don't think it works right now. Anyway, the libraries are the usual:
libdrm, Mesa (GBM). And of course the kernel DRM. You can look at Weston's
DRM backend.

Just like for many other concerns, you can be sure (I am, at least) that
all this will work somehow, some day. There are just more pressing
matters for now.

A key point here is to realise, that GPU interoperability is not
really a Wayland problem, but a problem for the whole graphics stack.


Thanks,
pq


More information about the wayland-devel mailing list