package/mesa3d: add KMSRO support for vc4
authorRomain Naour <romain.naour@smile.fr>
Mon, 8 Apr 2019 09:58:38 +0000 (11:58 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 11 Apr 2019 17:19:07 +0000 (19:19 +0200)
kmsro allow to support KMS displays with the renderonly layer used to
attach a GPU [1].

Quote from mesa3d meson.build: "kmsro driver requires one or more
renderonly drivers (vc4, etnaviv, freedreno)". But only vc4 support is
available by using the (deprecated) autotools build system [2].

This will also be used by mesa to support KMSRO with the upcomming
Panfrost and Lima Gallium drivers.

[1] https://cgit.freedesktop.org/mesa/mesa/commit/?id=ed65aeec7810a7d98a19461ba933bd77268cb0f6
[2] https://cgit.freedesktop.org/mesa/mesa/tree/configure.ac?h=mesa-19.0.1#n2864

Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mesa3d/Config.in
package/mesa3d/mesa3d.mk

index fdd64b03374e47697a47f153b142885bd2c6c975..3f44e942290a7d9454cea0f8c87860c07745572e 100644 (file)
@@ -83,6 +83,12 @@ config BR2_PACKAGE_MESA3D_DRIVER
 config BR2_PACKAGE_MESA3D_NEEDS_XA
        bool
 
+# Quote from mesa3d meson.build: "kmsro driver requires one or more
+# renderonly drivers (vc4, etnaviv, freedreno)". But only vc4 support
+# is available by using the (deprecated) autotools build system.
+config BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
+       bool
+
 comment "Gallium drivers"
 
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
@@ -93,6 +99,16 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV
        help
          Mesa driver for Vivante GPUs.
 
+config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO
+       bool "Gallium KMSRO driver"
+       depends on BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
+       help
+         Support various sorts of KMS displays with the
+         renderonly layer used to attach a GPU.
+
+comment "Gallium KMSRO needs one or more renderonly drivers"
+       depends on !BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
+
 config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU
        bool "Gallium nouveau driver"
        depends on BR2_i386 || BR2_x86_64
@@ -166,6 +182,7 @@ config BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VC4
        bool "Gallium vc4 driver"
        depends on BR2_ARM_CPU_HAS_NEON || BR2_aarch64
        select BR2_PACKAGE_MESA3D_GALLIUM_DRIVER
+       select BR2_PACKAGE_MESA3D_GALLIUM_KMSRO
        select BR2_PACKAGE_LIBDRM_VC4
        select BR2_PACKAGE_MESA3D_NEEDS_XA
        select BR2_PACKAGE_MESA3D_OPENGL_EGL
index 76affe5704769789f995a07d911ac1964416f3ec..02c8a8a57a2b04f9efb5369df8d5726bafb5ac41 100644 (file)
@@ -99,6 +99,7 @@ endif
 
 #Gallium Drivers
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV)  += etnaviv
+MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_KMSRO)    += kmsro
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_NOUVEAU)  += nouveau
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_R600)     += r600
 MESA3D_GALLIUM_DRIVERS-$(BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_RADEONSI) += radeonsi