DRI3 WSEGL plugin for TI SGX

Tomi Valkeinen tomi.valkeinen at ti.com
Wed Apr 25 10:19:02 UTC 2018


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=c36f56808ffbefc4a3dcf61dfad17f62aeb8e16c
> https://cgit.freedesktop.org/xorg/xserver/log/glamor?id=c36f56808ffbefc4a3dcf61dfad17f62aeb8e16c
> https://www.phoronix.com/scan.php?page=news_item&px=GLAMOR-GLES2-Fallback
> 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

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


More information about the dri-devel mailing list