From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Alexandru Ardelean <ardeleanalex@gmail.com>
Cc: Adrian Perez de Castro <aperez@igalia.com>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH] package/cog: add libgbm as dependency when building with DRM support
Date: Thu, 21 Jul 2022 18:16:48 +0200 [thread overview]
Message-ID: <20220721181648.7eedcb41@windsurf> (raw)
In-Reply-To: <20220721144939.1265027-1-ardeleanalex@gmail.com>
Hello Alexandru,
On Thu, 21 Jul 2022 17:49:39 +0300
Alexandru Ardelean <ardeleanalex@gmail.com> wrote:
> When building with DRM support, it can happen that the libgbm library
> is not yet built by the provider of libgbm (specified by
> BR2_PACKAGE_PROVIDES_LIBGBM).
>
> The docs in cog `docs/platform-drm.md` specify this dep-list:
> - **WPEBackend-fdo**:
> - **Wayland**:
> - **libdrm**:
> - **libgbm**:
> - **libinput**:
> - **libudev**:
>
> libgbm needs to be added, whereas `libudev` is provided by systemd (in my
> case).
Then udev should also be in the dependencies when
BR2_PACKAGE_COG_PLATFORM_DRM=y.
> ifeq ($(BR2_PACKAGE_COG_PLATFORM_DRM),y)
> COG_CONF_OPTS += -DCOG_PLATFORM_DRM=ON
> -COG_DEPENDENCIES += libdrm libinput
> +COG_DEPENDENCIES += libdrm libinput libgbm
That is correct, but not complete. The DRM platform code in Cog also
uses EGL, so we would also need libegl in the list of dependencies. In
pratice, libgbm and libegl are most likely implemented by the same
package, but for the sake of correctness, it would be better to have
both.
Another thing that is wrong is:
depends on BR2_PACKAGE_MESA3D_OPENGL_EGL # gbm
in the Config.in file. This used to be the only way to detect the
availability of gbm, but since quite some time now, we have the libgbm
virtual package.
So this should be instead:
depends on BR2_PACKAGE_HAS_LIBGBM
and I'm pretty sure Cog uses some "advanced" features of libgbm, so
most likely at least depends on BR2_PACKAGE_LIBGBM_HAS_FEATURE_DMA_BUF
is needed, and probably also depends on
BR2_PACKAGE_LIBGBM_HAS_FEATURE_FORMAT_MODIFIER_PLANE_COUNT is needed.
See package/opengl/libgbm/Config.in for details.
Of course, this aspect should be in a different patch: your change to
add "libgbm" in the DEPENDENCIES variable is really a fix, while my
proposed change in the Config.in file is really an improvement, that
will allow using Cog on libgbm-capable platforms that don't use mesa3d
as their OpenGL/libgbm implementation.
Best regards,
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-07-21 16:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-21 14:49 [Buildroot] [PATCH] package/cog: add libgbm as dependency when building with DRM support Alexandru Ardelean
2022-07-21 16:16 ` Thomas Petazzoni via buildroot [this message]
2022-07-22 6:25 ` Alexandru Ardelean
2022-07-22 6:38 ` Alexandru Ardelean
2022-07-22 6:59 ` Thomas Petazzoni via buildroot
2022-07-22 7:01 ` [Buildroot] [PATCH v2] " Alexandru Ardelean
2022-07-22 7:05 ` Alexandru Ardelean
2022-07-23 8:48 ` Arnout Vandecappelle
[not found] ` <48-62dd4800-5-54f5770@160071985>
2022-07-24 13:50 ` Arnout Vandecappelle
2022-07-24 14:53 ` Thomas Petazzoni via buildroot
2022-07-26 8:29 ` Alexandru Ardelean
2022-08-12 15:05 ` Peter Korsgaard
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=20220721181648.7eedcb41@windsurf \
--to=buildroot@buildroot.org \
--cc=aperez@igalia.com \
--cc=ardeleanalex@gmail.com \
--cc=thomas.petazzoni@bootlin.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox