[Buildroot] [PATCH 1/2] package/sdl2: kmsdrm needs GBM

Arnout Vandecappelle arnout at mind.be
Mon Aug 23 21:29:13 UTC 2021



On 21/08/2021 11:39, Fabrice Fontaine wrote:
> kmsdrm needs GBM (and so mesa3d) since its addition in version 2.0.6:
> https://github.com/libsdl-org/SDL/commit/56363ebf6124b345e1cfbd14fb6c0e654837910c
> 
> If libgbm is not found, kmsdrm will be silently disabled
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>

 Applied to master, thanks.

> ---
>  package/sdl2/Config.in | 5 +++++
>  package/sdl2/sdl2.mk   | 2 +-
>  2 files changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/package/sdl2/Config.in b/package/sdl2/Config.in
> index f29b3c7c38..07de75a4d5 100644
> --- a/package/sdl2/Config.in
> +++ b/package/sdl2/Config.in
> @@ -32,10 +32,15 @@ comment "X11 video driver needs X.org"
>  config BR2_PACKAGE_SDL2_KMSDRM
>  	bool "KMS/DRM video driver"
>  	depends on BR2_PACKAGE_LIBDRM
> +	# requires libgbm from mesa3d
> +	depends on BR2_PACKAGE_MESA3D_OPENGL_EGL

 Why this and not BR2_PACKAGE_MESA3D_GBM? I've applied as is but this is
something that maybe should be fixed.

>  
>  comment "KMS/DRM video driver needs libdrm"
>  	depends on !BR2_PACKAGE_LIBDRM
>  
> +comment "KMS/DRM video driver needs an OpenGL EGL backend provided by mesa3d"
> +	depends on !BR2_PACKAGE_MESA3D_OPENGL_EGL

 ... though this comment would of course be a lot more complicated because GBM
may also be provided by a DRI driver.

 Regards,
 Arnout

> +
>  config BR2_PACKAGE_SDL2_OPENGL
>  	bool "OpenGL (GLX)"
>  	depends on BR2_PACKAGE_HAS_LIBGL
> diff --git a/package/sdl2/sdl2.mk b/package/sdl2/sdl2.mk
> index 5aad92eda8..ff6b29f29c 100644
> --- a/package/sdl2/sdl2.mk
> +++ b/package/sdl2/sdl2.mk
> @@ -152,7 +152,7 @@ SDL2_CONF_OPTS += --disable-alsa
>  endif
>  
>  ifeq ($(BR2_PACKAGE_SDL2_KMSDRM),y)
> -SDL2_DEPENDENCIES += libdrm
> +SDL2_DEPENDENCIES += libdrm mesa3d
>  SDL2_CONF_OPTS += --enable-video-kmsdrm
>  else
>  SDL2_CONF_OPTS += --disable-video-kmsdrm
> 


More information about the buildroot mailing list