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 - Support for Vivante GPU API
Summary: Support for Vivante GPU API
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.1
Hardware: ARM Linux
: P2 normal
Assignee: Gabriel Jacobo
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 11:08 UTC by PulkoMandy
Modified: 2014-10-15 21:49 UTC (History)
1 user (show)

See Also:


Attachments
Patch adding Vivante GPU support. (31.59 KB, patch)
2014-02-05 11:08 UTC, PulkoMandy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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