Bug 91884 - Building Weston (1.8.92) for Raspberry Pi with EGL enabled fails due to missing `libdrm` dependency
Summary: Building Weston (1.8.92) for Raspberry Pi with EGL enabled fails due to missi...
Status: RESOLVED WONTFIX
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium major
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-04 19:49 UTC by John Sadler
Modified: 2018-06-04 09:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch adding --disable-gl-renderer config option. (2.08 KB, text/plain)
2015-09-04 19:49 UTC, John Sadler
Details

Description John Sadler 2015-09-04 19:49:07 UTC
Created attachment 118086 [details]
Patch adding --disable-gl-renderer config option.

[ Version list above is outdated, but I encountered this problem when building Weston 1.8.92.]

Building Weston for Raspberry Pi with EGL support enabled fails due to missing libdrm dependency.

This appears to be due to commit a352580285 which introduced libdrm as a dependency for GL Renderer, and GL Renderer itself is always enabled when EGL is enabled.

I'm attaching a patch which enables GL Renderer to be disabled (and the libdrm dependency removed) with the option: --disable-gl-renderer. Please consider this patch for inclusion on master.
Comment 1 Pekka Paalanen 2015-09-05 08:37:30 UTC
What good does building Weston with EGL support but without gl-renderer do?
Comment 2 John Sadler 2015-09-05 10:47:30 UTC
(In reply to Pekka Paalanen from comment #1)
> What good does building Weston with EGL support but without gl-renderer do?

Hi Pekka,

My use case is that I'm using the RPi renderer, with EGL/GLES2 client apps. From what I have observed, if I don't enable EGL support in Weston, then my client fails in `eglInitialize()`. Whereas if I enable EGL support in Weston, then it all works quite nicely (once my other patches are applied).

Of course, to get any of this to work I had to apply a derivative of this patchset to rpi-userland:

  https://github.com/raspberrypi/userland/pull/110

Which I pulled-in from here:

  https://github.com/Metrological/buildroot/tree/master/package/rpi-userland

It's a pity that these RPi-userland patches can't/won't be merged, but I understand that Mesa VC4 driver is what everyone is waiting for.

I'm quite new to Wayland, so it's entirely likely that I've misunderstood something, in which case please help cure my ignorance :)
Comment 3 Pekka Paalanen 2015-09-05 12:51:36 UTC
You're right, using those proprietary libs is the only applicable use case for your request. Interesting to hear someone is still actually using them with Weston.

I don't have any fundamental objections here.
Comment 4 John Sadler 2015-09-05 13:41:19 UTC
(In reply to Pekka Paalanen from comment #3)
> You're right, using those proprietary libs is the only applicable use case
> for your request. Interesting to hear someone is still actually using them
> with Weston.

Yes, very much so. AFAIK, Mesa VC4 driver is not fully ready yet, so this seems to be my best option right now for EGL/GLES2 clients. Having to patch RPi userland is a bit messy, but it does at least seem to be working.

> 
> I don't have any fundamental objections here.

Great. Thanks for taking a look.
Comment 5 John Sadler 2015-09-05 14:07:08 UTC
http://patchwork.freedesktop.org/patch/58748/
Comment 6 Daniel Stone 2015-09-07 08:52:34 UTC
(In reply to Pekka Paalanen from comment #3)
> You're right, using those proprietary libs is the only applicable use case
> for your request. Interesting to hear someone is still actually using them
> with Weston.

In theory, someone could also be using a proprietary driver on a non-RPi system (Mali, PVR/IMG, Vivante, NVIDIA) which doesn't support libdrm. That being said, I don't think requiring libdrm itself is too bad, as we don't require its functionality to be present. So I'd tend towards retaining the dependency.
Comment 7 John Sadler 2015-09-07 16:11:46 UTC
(In reply to Daniel Stone from comment #6)
> (In reply to Pekka Paalanen from comment #3)
> > You're right, using those proprietary libs is the only applicable use case
> > for your request. Interesting to hear someone is still actually using them
> > with Weston.
> 
> In theory, someone could also be using a proprietary driver on a non-RPi
> system (Mali, PVR/IMG, Vivante, NVIDIA) which doesn't support libdrm. That
> being said, I don't think requiring libdrm itself is too bad, as we don't
> require its functionality to be present. So I'd tend towards retaining the
> dependency.

Hi Daniel, thanks for taking a look.

I see your point, but as I'm building for an embedded system I'd rather not add stuff I don't need (and can't use) into my buildroot. It's just another package to track and upgrade as needed.

The patch I'm proposing shouldn't change the default behaviour. It just gives the option to remove the libdrm dependency (and gl_renderer itself) if it's not actually needed.
Comment 8 Daniel Stone 2018-06-04 09:11:01 UTC
libdrm is small enough, and our configuration options already bewildering enough, that I don't think this is much of an issue.

Beyond that, the recommended Raspberry Pi driver is now VC4 which will use libdrm, and even NVIDIA are providing KMS which requires libdrm. So at this point I don't think there's much use in avoiding it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.