Mesa (master): meson: Remove kmsro from gallium-drivers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Mar 31 13:28:51 UTC 2021


Module: Mesa
Branch: master
Commit: 70813c1c13b99cb029c8fa3537163650bdd17b6d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=70813c1c13b99cb029c8fa3537163650bdd17b6d

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Fri Feb  5 20:16:00 2021 -0500

meson: Remove kmsro from gallium-drivers

Automatically include it if we're building with a driver that depends on
it, and don't include it if we're not. Avoids a footgun (building
something like panfrost without kmsro) with minimal effect on code size
in the "kmsro possible but not used" case. (This case primarily affects
Freedreno, but the Freedreno maintainers suggested this, so I think it's
ok.)

Signed-off-by: Alyssa Rosenzweig <alyssa at collabora.com>
Suggested-by: Rob Clark <robdclark at chromium.org>
Reviewed-by: Dylan Baker <dylan.c.baker at intel.com>
Reviewed-by: Eric Anholt <eric at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8893>

---

 meson.build | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index 9eb7f9221ea..ddc08096296 100644
--- a/meson.build
+++ b/meson.build
@@ -198,7 +198,7 @@ if gallium_drivers.contains('auto')
       ]
     elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
       gallium_drivers = [
-        'kmsro', 'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau',
+        'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau',
         'tegra', 'virgl', 'lima', 'panfrost', 'swrast'
       ]
     elif ['mips', 'mips64'].contains(host_machine.cpu_family())
@@ -216,7 +216,6 @@ if gallium_drivers.contains('auto')
           host_machine.system()))
   endif
 endif
-with_gallium_kmsro = gallium_drivers.contains('kmsro')
 with_gallium_radeonsi = gallium_drivers.contains('radeonsi')
 with_gallium_r300 = gallium_drivers.contains('r300')
 with_gallium_r600 = gallium_drivers.contains('r600')
@@ -238,6 +237,7 @@ with_gallium_zink = gallium_drivers.contains('zink')
 with_gallium_d3d12 = gallium_drivers.contains('d3d12')
 
 with_gallium = gallium_drivers.length() != 0
+with_gallium_kmsro = with_gallium_v3d or with_gallium_vc4 or with_gallium_etnaviv or with_gallium_panfrost or with_gallium_lima or with_gallium_freedreno
 
 if with_gallium and system_has_kms_drm
   _glx = get_option('glx')
@@ -286,9 +286,6 @@ endif
 if with_dri_i915 and with_gallium_i915
   error('Only one i915 provider can be built')
 endif
-if with_gallium_kmsro and not (with_gallium_v3d or with_gallium_vc4 or with_gallium_etnaviv or with_gallium_freedreno or with_gallium_panfrost or with_gallium_lima)
-  error('kmsro driver requires one or more renderonly drivers (vc4, etnaviv, freedreno, panfrost, lima)')
-endif
 if with_gallium_tegra and not with_gallium_nouveau
   error('tegra driver requires nouveau driver')
 endif



More information about the mesa-commit mailing list