Hi All,
I have implemented a WSEGL plugin library for Imagination's PVR driver for SGX, which allows using SGX via DRI3. In other words, it is one piece in the puzzle of using SGX with X11.
The project is not production quality, as I have not had time to perfect it (and, to be honest, I'm not exactly an expert on X), but now that I finally got all the permissions to publish it, I'm doing just that to allow other people to use it and help making it fully usable.
You can find the code and a more detailed description here:
https://github.com/TexasInstruments/dri3wsegl
Hopefully with this code now public, we can get an SGX and GC320 accelerated X11 on TI devices.
Tomi
* Tomi Valkeinen tomi.valkeinen@ti.com [180416 07:51]:
Hi All,
I have implemented a WSEGL plugin library for Imagination's PVR driver for SGX, which allows using SGX via DRI3. In other words, it is one piece in the puzzle of using SGX with X11.
The project is not production quality, as I have not had time to perfect it (and, to be honest, I'm not exactly an expert on X), but now that I finally got all the permissions to publish it, I'm doing just that to allow other people to use it and help making it fully usable.
You can find the code and a more detailed description here:
https://github.com/TexasInstruments/dri3wsegl
Hopefully with this code now public, we can get an SGX and GC320 accelerated X11 on TI devices.
Hey this is great news :)
For the dts binding, sgx binding can be generic as we can put sgx as a child of ti-sysc. Then we just need the reset driver entry to power up sgx. And that way we should be able to get the kernel driver merged too even if it initially just powers and idles the sgx. Then we can maybe recycle some of the existing PSB_RSGX32 defines in the kernel for adding (slow) 2D acceleration like drivers/gpu/drm/gma500/accel_2d.c does..
Regards,
Tony
Hi!
On 16/04/18 16:49, Tomi Valkeinen wrote:
Hi All,
I have implemented a WSEGL plugin library for Imagination's PVR driver for SGX, which allows using SGX via DRI3. In other words, it is one piece in the puzzle of using SGX with X11.
The project is not production quality, as I have not had time to perfect it (and, to be honest, I'm not exactly an expert on X), but now that I finally got all the permissions to publish it, I'm doing just that to allow other people to use it and help making it fully usable.
You can find the code and a more detailed description here:
https://github.com/TexasInstruments/dri3wsegl
Hopefully with this code now public, we can get an SGX and GC320 accelerated X11 on TI devices.
Great, this will be fun to try.
From the README:
Xorg's modesetting driver supports DRI3, but unfortunately only when using Glamor, which uses OpenGL for 2D acceleration. There's no OpenGL HW on TI's devices.
However, for testing purposes, it is possible to use Mesa SW rendering to fulfill the OpenGL requirement. With this this setup, SGX is used to render to a buffer, passed to the modesetting driver via DRI3, which is then composited to the screen using OpenGL SW rendering. Needless to say, the composition is very slow.
Although slow with SW rendering, modesetting driver is quite stable and the DRI3 support works fine, so it is good for testing.
There is this:
https://cgit.freedesktop.org/xorg/xserver/commit/?id=c36f56808ffbefc4a3dcf61... https://cgit.freedesktop.org/xorg/xserver/log/glamor?id=c36f56808ffbefc4a3dc... https://www.phoronix.com/scan.php?page=news_item&px=GLAMOR-GLES2-Fallbac... https://cgit.freedesktop.org/xorg/xserver/tree/glamor/glamor_egl.c#n952
So actually, Glamor should already work, given a new enough X server?
This will be exciting to try out on the N900 and perhaps on the Droid 4 as well. I will try to test this in a few weeks from now. I would personally be very happy if we can use just the modesetting driver.
On a related note, maemo leste also did some work on this for DRI2: https://github.com/freemangordon/pvr
I think this works as a drop-in replacement on Fremantle for pvrPVR2D_DRI2WSEGL, and can also work with newer X versions. But dri3wsegl seems like the proper way forward here.
Cheers, Merlijn
On 25/04/18 12:43, Merlijn Wajer wrote:
Hi!
On 16/04/18 16:49, Tomi Valkeinen wrote:
Hi All,
I have implemented a WSEGL plugin library for Imagination's PVR driver for SGX, which allows using SGX via DRI3. In other words, it is one piece in the puzzle of using SGX with X11.
The project is not production quality, as I have not had time to perfect it (and, to be honest, I'm not exactly an expert on X), but now that I finally got all the permissions to publish it, I'm doing just that to allow other people to use it and help making it fully usable.
You can find the code and a more detailed description here:
https://github.com/TexasInstruments/dri3wsegl
Hopefully with this code now public, we can get an SGX and GC320 accelerated X11 on TI devices.
Great, this will be fun to try.
From the README:
Xorg's modesetting driver supports DRI3, but unfortunately only when using Glamor, which uses OpenGL for 2D acceleration. There's no OpenGL HW on TI's devices.
However, for testing purposes, it is possible to use Mesa SW rendering to fulfill the OpenGL requirement. With this this setup, SGX is used to render to a buffer, passed to the modesetting driver via DRI3, which is then composited to the screen using OpenGL SW rendering. Needless to say, the composition is very slow.
Although slow with SW rendering, modesetting driver is quite stable and the DRI3 support works fine, so it is good for testing.
There is this:
https://cgit.freedesktop.org/xorg/xserver/commit/?id=c36f56808ffbefc4a3dcf61... https://cgit.freedesktop.org/xorg/xserver/log/glamor?id=c36f56808ffbefc4a3dc... https://www.phoronix.com/scan.php?page=news_item&px=GLAMOR-GLES2-Fallbac... https://cgit.freedesktop.org/xorg/xserver/tree/glamor/glamor_egl.c#n952
So actually, Glamor should already work, given a new enough X server?
Oh, thanks for pointing this out. Indeed, Glamor might just work. I need to try to find time to test this.
That said, I think there's still value in a separate X driver that uses GC320 for 2D and SGX for 3D. I have no numbers, but I would expect that combination to give much more performance than Glamor.
But for devices without GC320, Glamor sounds like the way to go. Well, there's also a third alternative, which is to use PVR's 2D API for 2D, instead of going through OGLES.
This will be exciting to try out on the N900 and perhaps on the Droid 4 as well. I will try to test this in a few weeks from now. I would personally be very happy if we can use just the modesetting driver.
Yep. I have no idea if this will work on OMAP3, so I'm interested to hear about your experiences. I think the SGX driver I've been using does not have OMAP3 support. Nikolaus has done some effort to bring the drivers together, though.
Tomi