Skip to content

Commit

Permalink
gstreamer1.0-plugins-base: Fix viv-fb usage and extract PACKAGECONFIG_GL
Browse files Browse the repository at this point in the history
Both the NXP fork of gstreamer1.0-plugins-base and upstream GStreamer
need the same PACKAGECONFIG_GL adjustments, so extract those into
a common .bbappend.

Also, in GStreamer 1.22.5, viv-fb has been decoupled from the Vivante
direct texture feature. It is no longer necessary to set viv-fb to
be able to use direct textures. viv-fb now solely and only is about
the windowing system (that is, using the Vivante specific framebuffer
API to be able to render OpenGL ES directly to framebuffer). That
windowing system is only available on vendor BSPs for i.MX6 SoCs,
so limit viv-fb to mx6-nxp-bsp.

The recipe for the NXP fork is at version 1.22.0, so the fixes for
decoupling viv-fb from direct textures is not present there. For this
reason, always enable viv-fb in that recipe. This also makes sure that
that recipe essentially behaves the same, because the PACKAGECONFIG_GL
adjustments end up being the same as before.

Signed-off-by: Carlos Rafael Giani <[email protected]>
  • Loading branch information
dv1 committed Sep 14, 2023
1 parent b5127cf commit 0c72bad
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
PACKAGECONFIG_GL:imxgpu2d = \
"${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl', '', d)}"
PACKAGECONFIG_GL:imxgpu3d = \
"${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl', '', d)}"
PACKAGECONFIG_GL:use-mainline-bsp = \
"${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}"

# The i.MX8 uses KMS instead of the Vivante specific framebuffer API.
# The i.MX7 does not have a GPU.
# This leaves the i.MX6 - with the vendor BSP - as the remaining use case for viv-fb.
#
# (Note that viv-fb is about the _windowing system_. Vivante direct texture support
# does not depend on the viv-fb feature. It used to, but that was actually a bug
# which was fixed in GStreamer 1.22.5. Since then, the direct texture support is
# detected by Meson by checking for direct texture symbols like "glTexDirectVIV".)
PACKAGECONFIG_GL:append:mx6-nxp-bsp = " viv-fb "
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ S = "${WORKDIR}/git"

inherit use-imx-headers

PACKAGECONFIG_GL:imxgpu2d = \
"${@bb.utils.contains('DISTRO_FEATURES', 'opengl x11', 'opengl viv-fb', '', d)}"
PACKAGECONFIG_GL:imxgpu3d = \
"${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl viv-fb', '', d)}"
PACKAGECONFIG_GL:use-mainline-bsp = \
"${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gles2 egl gbm', '', d)}"
# Prior to version 1.22.5, viv-fb is coupled with the Vivante direct texture feature.
# For this reason, in these older versions, viv-fb must be enabled always, even when
# building for SoCs like the i.MX8 that do not support the viv-fb windowing system.
# TODO: Once this .imx recipe is upgraded to 1.22.5 or newer, drop this line.
PACKAGECONFIG_GL:append = " viv-fb "

PACKAGECONFIG_REMOVE ?= "jpeg"
PACKAGECONFIG:remove = "${PACKAGECONFIG_REMOVE}"
Expand Down

0 comments on commit 0c72bad

Please sign in to comment.