Mesa (master): vl: Always enable drm winsys.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jun 13 08:27:18 UTC 2019


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

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Wed Jun  5 14:34:23 2019 +0200

vl: Always enable drm winsys.

The dri2 winsys also uses libdrm (and you can only enable dri3 if
you enable dri2), and the drm winsys only requires libdrm.

So if any winsys is enabled you can also enable the drm winsys, and
since we always want at least one winsys we can always enable it.

I removed the check for the drm platform for VA and OMX since they
do not care anymore. Since we still check for one of r600g, nouveau
or radeonsi, we are guarantueed to still only enable it by default
in a configuration that requires libdrm anyway. So for people using
va=auto, we don't suddenly start requiring libdrm were we did not
before.

This supersedes "vl: Enable DRM by default.", which I pushed, but
rolled back because it used dep_libdrm before its definition.

Reviewed-by: Emil Velikov <emil.velikov at collabora.com>

---

 meson.build                          | 12 ------------
 src/gallium/auxiliary/meson.build    |  6 ++----
 src/gallium/auxiliary/vl/vl_winsys.h |  6 +-----
 3 files changed, 3 insertions(+), 21 deletions(-)

diff --git a/meson.build b/meson.build
index f0fa57ca515..a2978117409 100644
--- a/meson.build
+++ b/meson.build
@@ -503,12 +503,6 @@ if not system_has_kms_drm
   else
     error('OMX state tracker can only be built on unix-like OSes.')
   endif
-elif not (with_platform_x11 or with_platform_drm)
-  if ['auto', 'disabled'].contains(_omx)
-    _omx = 'disabled'
-  else
-    error('OMX state tracker requires X11 or drm platform support.')
-  endif
 elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
   if ['auto', 'disabled'].contains(_omx)
     _omx = 'disabled'
@@ -589,12 +583,6 @@ if not system_has_kms_drm
   else
     _va = 'false'
   endif
-elif not (with_platform_x11 or with_platform_drm)
-  if _va == 'true'
-    error('VA state tracker requires X11 or drm or wayland platform support.')
-  else
-    _va = 'false'
-  endif
 elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
   if _va == 'true'
     error('VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.')
diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build
index e76b2ac912e..1b8d32d128b 100644
--- a/src/gallium/auxiliary/meson.build
+++ b/src/gallium/auxiliary/meson.build
@@ -479,7 +479,8 @@ files_libgalliumvl = files(
 )
 
 vlwinsys_deps = []
-files_libgalliumvlwinsys = files('vl/vl_winsys.h')
+files_libgalliumvlwinsys = files('vl/vl_winsys.h',
+                                 'vl/vl_winsys_drm.c')
 if with_dri2 and with_platform_x11
   files_libgalliumvlwinsys += files('vl/vl_winsys_dri.c')
   if with_dri3
@@ -490,9 +491,6 @@ if with_dri2 and with_platform_x11
     files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c')
   endif
 endif
-if with_platform_drm
-  files_libgalliumvlwinsys += files('vl/vl_winsys_drm.c')
-endif
 
 u_indices_gen_c = custom_target(
   'u_indices_gen.c',
diff --git a/src/gallium/auxiliary/vl/vl_winsys.h b/src/gallium/auxiliary/vl/vl_winsys.h
index 3a35cb6a859..a12b08bcf7e 100644
--- a/src/gallium/auxiliary/vl/vl_winsys.h
+++ b/src/gallium/auxiliary/vl/vl_winsys.h
@@ -92,12 +92,8 @@ static inline struct vl_screen *
 vl_dri3_screen_create(void *display, int screen) { return NULL; };
 #endif
 
-#ifdef HAVE_DRM_PLATFORM
+/* Always enable the DRM vl winsys */
 struct vl_screen *
 vl_drm_screen_create(int fd);
-#else
-static inline struct vl_screen *
-vl_drm_screen_create(int fd) { return NULL; };
-#endif
 
 #endif




More information about the mesa-commit mailing list