From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] package/mesa3d: gbm needs a DRI driver or a Gallium driver w/ EGL
Date: Sat, 22 Feb 2020 20:41:59 +0100 [thread overview]
Message-ID: <20200222194159.GL17342@scaer> (raw)
In-Reply-To: <20200222194041.GK17342@scaer>
Romain, All,
On 2020-02-22 20:40 +0100, Yann E. MORIN spake thusly:
> On 2020-02-19 20:10 +0100, Romain Naour spake thusly:
> > src/gbm/cd6bfad@@gbm at sha/main_backend.c.o: In function `_gbm_create_device':
> > backend.c:(.text+0x38): undefined reference to `gbm_dri_backend'
> > backend.c:(.text+0x40): undefined reference to `gbm_dri_backend'
> > backend.c:(.text+0x74): undefined reference to `gbm_dri_backend'
> > backend.c:(.text+0x78): undefined reference to `gbm_dri_backend'
> > collect2: error: ld returned 1 exit status
> >
> > This issue has been trigged since [1]:
> > "package/mesa3d: add option to configure gbm support"
> >
> > Before the patch, the gbm support was autodetected by meson and enabled
> > only when at least one dri driver was enabled [2].
> >
> > On the Buildroot side, the gbm support was explicitely enabled only when
> > BR2_PACKAGE_MESA3D_OPENGL_EGL was set.
> >
> > We have two cases:
> > - At least one DRI driver.
> > - No DRI driver but one Gallium w/ EGL enable (EGL selected or not by the
> > Gallium driver). In this case the meson build system set with_dri to true
> > (even if no DRI driver is enabled) to use the builtin:egl_dri2 [3].
> >
> > The gbm's meson build system seems to handle the case where no dri driver is
> > enabled [4] but it still use main/backend.c source file [6] that use
> > gbm_dri_backend [7]. So with_dri2 must always be set.
> >
> > Probably a missing check in meson.build:
> >
> > if with_gbm and not with_dri
> > error('GBM backend needs a dri driver or a gallium driver w/ EGL support.')
> > endif
> >
> > Add a dependency on GBM option:
> >
> > depends on BR2_PACKAGE_MESA3D_DRI_DRIVER \
> > || (BR2_PACKAGE_MESA3D_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_OPENGL_EGL)
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/b9b6281983388dc22d929887d653da3db60f1f2c
> >
> > [1] b6c051acf787c804e732bc58ba8d7e440701a168
> > [2] https://gitlab.freedesktop.org/mesa/mesa/blob/19.3/meson.build#L348
> > [3] https://gitlab.freedesktop.org/mesa/mesa/blob/19.3/meson.build#L212
> > [4] https://gitlab.freedesktop.org/mesa/mesa/blob/19.3/src/gbm/meson.build#L37
> > [5] https://gitlab.freedesktop.org/mesa/mesa/blob/19.3/src/gbm/meson.build#L24
> > [6] https://gitlab.freedesktop.org/mesa/mesa/blob/19.3/src/gbm/main/backend.c#L38
> > [7] http://lists.busybox.net/pipermail/buildroot/2020-February/274425.html
> >
> > Signed-off-by: Romain Naour <romain.naour@smile.fr>
> > Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
And,,, Applied to master, thanks.
Regards,
Yann E. MORIN.
> So, with the other patch you sent later (and that I already applied),
> the conditions for gbm are now very strict, to the point where there is
> only three conditions under wich it is freely selectable: one of the DRI
> drivers is enabled, *and* OSMesa is enabled.
>
> Now, gbm depends on Galium and EGL, but EGL forcibly selects GBM.
>
> So the comment that states "gbm needs [...] gallium and EGL", alrhough
> technically correct, is totally useless, because enabling EGL gives no
> choice as it forcibly enables gbm.
>
> I know mesa3d is complex, but our packaging of it really looks like it
> is overly complicated for no good reasons. It evolved organically over
> the years, and probably now is a good time for a full revamp of the
> package.
>
> Any taker?
>
> Regards,
> Yann E. MORIN.
>
> > ---
> > package/mesa3d/Config.in | 6 ++++++
> > 1 file changed, 6 insertions(+)
> >
> > diff --git a/package/mesa3d/Config.in b/package/mesa3d/Config.in
> > index dbfc59bad5..0788f47137 100644
> > --- a/package/mesa3d/Config.in
> > +++ b/package/mesa3d/Config.in
> > @@ -400,9 +400,15 @@ comment "OpenGL API Support"
> >
> > config BR2_PACKAGE_MESA3D_GBM
> > bool "gbm"
> > + depends on BR2_PACKAGE_MESA3D_DRI_DRIVER \
> > + || (BR2_PACKAGE_MESA3D_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_OPENGL_EGL)
> > help
> > Enable Generic Buffer Management (gbm)
> >
> > +comment "gbm support needs a dri driver or a gallium driver w/ EGL support."
> > + depends on !BR2_PACKAGE_MESA3D_DRI_DRIVER \
> > + || !(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER && BR2_PACKAGE_MESA3D_OPENGL_EGL)
> > +
> > config BR2_PACKAGE_MESA3D_OPENGL_GLX
> > bool "OpenGL GLX"
> > depends on BR2_PACKAGE_XORG7
> > --
> > 2.21.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
prev parent reply other threads:[~2020-02-22 19:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-19 19:10 [Buildroot] [PATCH] package/mesa3d: gbm needs a DRI driver or a Gallium driver w/ EGL Romain Naour
2020-02-22 16:53 ` Bernd Kuhls
2020-02-22 19:40 ` Yann E. MORIN
2020-02-22 19:41 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200222194159.GL17342@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.