From 392c60928a5debbe6782ed1aa136597504bfbc5b Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Thu, 30 May 2019 20:34:06 +0200 Subject: [PATCH] vl: Enable DRM by default. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If libdrm is found the pipe loader enables drm anyway, and that is pretty much the only extra dependency this code has. This enables creating libva display using a drm fd without having to enable the DRM (GBM really) backend of EGL, which is completely unrelated. Leaving the X11 platforms alone as they would still result in the additional inclusion of extra deps. Reviewed-by: Marek Olšák Reviewed-by: Emil Velikov --- meson.build | 4 ++-- src/gallium/auxiliary/meson.build | 2 +- src/gallium/auxiliary/vl/vl_winsys.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/meson.build b/meson.build index cd994c73b72..1d32d909c95 100644 --- a/meson.build +++ b/meson.build @@ -589,9 +589,9 @@ if not system_has_kms_drm else _va = 'false' endif -elif not (with_platform_x11 or with_platform_drm) +elif not (with_platform_x11 or dep_libdrm.found()) if _va == 'true' - error('VA state tracker requires X11 or drm or wayland platform support.') + error('VA state tracker requires X11 platform support or libdrm.') else _va = 'false' endif diff --git a/src/gallium/auxiliary/meson.build b/src/gallium/auxiliary/meson.build index e76b2ac912e..668f6c09e01 100644 --- a/src/gallium/auxiliary/meson.build +++ b/src/gallium/auxiliary/meson.build @@ -490,7 +490,7 @@ if with_dri2 and with_platform_x11 files_libgalliumvlwinsys += files('vl/vl_winsys_dri3.c') endif endif -if with_platform_drm +if dep_libdrm.found() files_libgalliumvlwinsys += files('vl/vl_winsys_drm.c') endif diff --git a/src/gallium/auxiliary/vl/vl_winsys.h b/src/gallium/auxiliary/vl/vl_winsys.h index 3a35cb6a859..322de72487a 100644 --- a/src/gallium/auxiliary/vl/vl_winsys.h +++ b/src/gallium/auxiliary/vl/vl_winsys.h @@ -92,7 +92,7 @@ static inline struct vl_screen * vl_dri3_screen_create(void *display, int screen) { return NULL; }; #endif -#ifdef HAVE_DRM_PLATFORM +#ifdef HAVE_LIBDRM struct vl_screen * vl_drm_screen_create(int fd); #else -- 2.30.2