From fe35be501391bd7087197dd162224da90b87cb64 Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Mon, 4 Nov 2024 16:24:43 +0200 Subject: [PATCH] gitlab-ci: Bump libdrm to 2.4.118 to add NV{15,20,30} fmts And add ifndef guards for cases were do have support for it. While at it I need to change how we build it due to: 'meson.build:21:0: ERROR: Value "false" (of type "string") for combo option "Enable support for vc4's KMS API." is not one of the choices. Possible choices are (as string): "enabled", "disabled", "auto".' Signed-off-by: Marius Vlad --- .gitlab-ci.yml | 2 +- .gitlab-ci/build-deps.sh | 5 +++-- shared/weston-drm-fourcc.h | 8 ++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90101c07f..010b58741 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,7 +43,7 @@ variables: FDO_UPSTREAM_REPO: wayland/weston FDO_REPO_SUFFIX: "$BUILD_OS-$FDO_DISTRIBUTION_VERSION/$BUILD_ARCH" - FDO_DISTRIBUTION_TAG: '2024-08-14-00-freerdp3.x' + FDO_DISTRIBUTION_TAG: '2024-11-04-00-libdrm-2.4.118' include: diff --git a/.gitlab-ci/build-deps.sh b/.gitlab-ci/build-deps.sh index 21d8d5920..85a04fcc8 100755 --- a/.gitlab-ci/build-deps.sh +++ b/.gitlab-ci/build-deps.sh @@ -134,10 +134,11 @@ rm -rf wayland-protocols # Build and install our own version of libdrm. Debian 11 (bullseye) provides # libdrm 2.4.104 which doesn't have the IN_FORMATS iterator api, and Mesa # depends on 2.4.109 as well. -git clone --branch libdrm-2.4.109 --depth=1 https://gitlab.freedesktop.org/mesa/drm.git +# Bump to 2.4.118 to include DRM_FORMAT_NV{15,20,30} +git clone --branch libdrm-2.4.118 --depth=1 https://gitlab.freedesktop.org/mesa/drm.git cd drm meson build --wrap-mode=nofallback -Dauto_features=disabled \ - -Dvc4=false -Dfreedreno=false -Detnaviv=false + -Dvc4=disabled -Dfreedreno=disabled -Detnaviv=disabled ninja ${NINJAFLAGS} -C build install cd .. rm -rf drm diff --git a/shared/weston-drm-fourcc.h b/shared/weston-drm-fourcc.h index d9a66c34b..5333ce252 100644 --- a/shared/weston-drm-fourcc.h +++ b/shared/weston-drm-fourcc.h @@ -51,8 +51,16 @@ * index 0 = Y plane, [39:0] Y3:Y2:Y1:Y0 little endian * index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian */ +#ifndef DRM_FORMAT_NV15 #define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */ +#endif + +#ifndef DRM_FORMAT_NV20 #define DRM_FORMAT_NV20 fourcc_code('N', 'V', '2', '0') /* 2x1 subsampled Cr:Cb plane */ +#endif + +#ifndef DRM_FORMAT_NV30 #define DRM_FORMAT_NV30 fourcc_code('N', 'V', '3', '0') /* non-subsampled Cr:Cb plane */ +#endif #endif