We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 2386

Summary: Support for Vivante GPU API
Product: SDL Reporter: PulkoMandy <pulkomandy>
Component: videoAssignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: gabomdq
Version: 2.0.1   
Hardware: ARM   
OS: Linux   
Attachments: Patch adding Vivante GPU support.

Description PulkoMandy 2014-02-05 11:08:16 UTC
Created attachment 1548 [details]
Patch adding Vivante GPU support.

This is a patch to add support for Vivante GPU drivers, as used for example on Freescale i.MX6 chips.

Similar to the Raspberry Pi, there is a custom API allowing to query the framebuffer and allocate (non-movable, non-resizeable) windows on it.

Support for SDL_cursor is missing, I didn't find a way of implementing it.

Note: because of the way Vivante GPU driver is made, there is no way to have SDL compiled for both X11 and this at the same time (you need to link to a different libEGL, and use different compile flags). I couldn't get the X11 variant to work reliably, anyway.
Comment 1 PulkoMandy 2014-02-05 11:11:09 UTC
Forgot to mention: the patch is against SDL 2.0.1 sources.
Comment 2 Gabriel Jacobo 2014-02-05 14:00:19 UTC
Nice work. 

It seems the patch is heavily based on the RPi backend, I would like to analyze and figure out if there's a simple way we can generalize that backend instead of just copy/pasting it entirely.
Comment 3 PulkoMandy 2014-02-05 14:16:30 UTC
Yes, a lot of this is copied from the Raspberry backend. I think I only modified SDL_vivvideo.c (to initialize EGL) and SDL_vivmouse.c (to remove the Pi cursor management). Other files can probably be shared.
Comment 4 Gabriel Jacobo 2014-10-15 21:49:07 UTC
Sam fixed this today.
Comment 5 Gabriel Jacobo 2014-10-15 21:49:36 UTC
https://hg.libsdl.org/SDL/rev/494876610c49