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 3938 - [PATCH] RPI vendor & mesa driver coexistence fixes
Summary: [PATCH] RPI vendor & mesa driver coexistence fixes
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.7
Hardware: ARM Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-02 23:02 UTC by Conn O'Griofa
Modified: 2017-11-04 16:05 UTC (History)
0 users

See Also:


Attachments
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver (1.93 KB, application/mbox)
2017-11-02 23:02 UTC, Conn O'Griofa
Details
[PATCH] SDL_video: try to bootstrap KMSDRM before RPI video driver (893 bytes, patch)
2017-11-02 23:02 UTC, Conn O'Griofa
Details | Diff
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver (1.93 KB, patch)
2017-11-02 23:05 UTC, Conn O'Griofa
Details | Diff
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver (2.40 KB, patch)
2017-11-03 00:25 UTC, Conn O'Griofa
Details | Diff
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver (3.02 KB, patch)
2017-11-03 00:50 UTC, Conn O'Griofa
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conn O'Griofa 2017-11-02 23:02:12 UTC
Created attachment 3057 [details]
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver

For your consideration, the following patches enhance support for Raspberry Pi's vendor *and* experimental VC4 driver:

* Fix ES1/PVR applications when using the latest Raspberry Pi firmware; the renamed libbrcmGLESv2 is supposed to provide support for 2/1/PVR in one library. This will fix ES1/PVR applications.
* Add simple detection of the VC4 mesa driver; if "/sys/module/vc4/" is present, use the standard Mesa library names instead of the Broadcom versions.
* Bootstrap the KMSDRM driver before RPI to prevent an issue with the Mesa VC4 driver failing to initialize.

The sum effect of these two patches is that ES1/PVR applications are fixed on the vendor library, and it's now possible to compile a build with "--enable-video-rpi --enable-video-kmsdrm" together. The same SDL2 build will work with the vendor libraries and Mesa VC4 graphics stack (via KMSDRM).
Comment 1 Conn O'Griofa 2017-11-02 23:02:48 UTC
Created attachment 3058 [details]
[PATCH] SDL_video: try to bootstrap KMSDRM before RPI video driver
Comment 2 Conn O'Griofa 2017-11-02 23:05:06 UTC
Created attachment 3059 [details]
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver
Comment 3 Conn O'Griofa 2017-11-03 00:25:21 UTC
Created attachment 3060 [details]
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver
Comment 4 Conn O'Griofa 2017-11-03 00:50:17 UTC
Created attachment 3061 [details]
[PATCH] Raspberry Pi: fix ES 1/PVR support & autodetect Mesa driver

Apologies for the spam. I needed to update the patch to ensure that the legacy library names (/opt/vc/lib/libEGL.so and /opt/vc/lib/libGLESv2.so) still work for ES1/PVR.

Both libbrcmGLESv2.so (new name) and libGLESv2.so (old) support all profiles; /opt/vc/lib/libGLES_CM.so & /opt/vc/lib/libGLESv1_CM.so were always symlinks to /opt/vc/lib/libGLESv2.so.
Comment 5 Sam Lantinga 2017-11-04 16:05:03 UTC
Your patches are in, thanks!
https://hg.libsdl.org/SDL/rev/18e285e9e1be
https://hg.libsdl.org/SDL/rev/591e138c5a04