After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 780668 - init_gbm platform confusion
init_gbm platform confusion
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
git master
Other Linux
: Normal major
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2017-03-29 03:59 UTC by memeka
Modified: 2017-11-09 11:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
platform_gbm patch (1.09 KB, patch)
2017-11-03 03:59 UTC, memeka
committed Details | Review

Description memeka 2017-03-29 03:59:41 UTC
There is a bit of confusion in the GBM platform initialisation

static gboolean
init_gbm (MetaRendererNative *renderer_native,
          GError            **error)

in src/backends/native/meta-renderer-native.c

The code checks for the extension:
EGL_MESA_platform_gbm

and if that is missing, you get the following error message:
"Missing extension for GBM renderer: EGL_KHR_platform_gbm"

I think the check should be for EGL_MESA_platform_gbm || EGL_KHR_platform_gbm as there are non-MESA platforms that use EGL_KHR_platform_gbm. One example of this is Mali GPU, which has a driver that supports Wayland and exports EGL_KHR_platform_gbm, but because mutter checks for EGL_MESA_platform_gbm, it fails initialising gbm.
Comment 1 memeka 2017-10-30 13:26:03 UTC
This issue is still present in the create_renderer_gpu_data_gbm function in src/backends/native/meta-renderer-native.c, and is very easy to fix...
Comment 2 Jonas Ådahl 2017-11-03 03:26:40 UTC
Care to provide a patch? I don't have access to any Mali GPU, so I can't test it myself.
Comment 3 memeka 2017-11-03 03:59:48 UTC
Created attachment 362868 [details] [review]
platform_gbm patch

Proprietary drivers such as ARM Mali export EGL_KHR_platform_gbm instead
of EGL_MESA_platform_gbm. As such, GBM platform check should be done for
both MESA and non-MESA drivers.
Comment 4 memeka 2017-11-03 04:01:36 UTC
The patch applies on top of mutter 3.26, I did not test with master...
Comment 5 Jonas Ådahl 2017-11-03 04:44:10 UTC
Review of attachment 362868 [details] [review]:

lgtm.
Comment 6 Jonas Ådahl 2017-11-09 10:19:06 UTC
Pushed after fixing commit message.
Comment 7 Jonas Ådahl 2017-11-09 10:21:18 UTC
Pushed to gnome-3-26 as well.
Comment 8 memeka 2017-11-09 11:52:47 UTC
Nice, thank you Jonas.