From 8b654c47ebd860bc11a57417cb362ef123ca1562 Mon Sep 17 00:00:00 2001 From: Luigi Santivetti Date: Mon, 6 Jun 2022 17:01:46 +0100 Subject: [PATCH] Revert "backend-drm: add HDR_OUTPUT_METADATA definitions" This reverts commit 6914064066b95cd65883c2c987c5f80f0a48b910. This is a follow-up change of b623fd2a ("drm-backend: stop parsing IN_FORMATS blobs, use libdrm instead"). Weston now has a hard-requirement on libdrm 2.4.108, clean up remaining and unnecessary conditional code. Change 69140640 ("backend-drm: add HDR_OUTPUT_METADATA definitions") is no longer needed and stop including libdrm-updates.h from kms-color.c. Signed-off-by: Luigi Santivetti --- doc/sphinx/doxygen.ini.in | 2 +- libweston/backend-drm/kms-color.c | 1 - libweston/backend-drm/libdrm-updates.h | 124 ------------------------- libweston/backend-drm/meson.build | 5 - 4 files changed, 1 insertion(+), 131 deletions(-) delete mode 100644 libweston/backend-drm/libdrm-updates.h diff --git a/doc/sphinx/doxygen.ini.in b/doc/sphinx/doxygen.ini.in index 76b5b363..bfe77e8e 100644 --- a/doc/sphinx/doxygen.ini.in +++ b/doc/sphinx/doxygen.ini.in @@ -888,7 +888,7 @@ EXCLUDE_SYMLINKS = NO # Note that the wildcards are matched against the file with absolute path, so to # exclude all test directories for example use the pattern */test/* -EXCLUDE_PATTERNS = */backend-drm/libdrm-updates.h +EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the diff --git a/libweston/backend-drm/kms-color.c b/libweston/backend-drm/kms-color.c index 2f9ad945..610b2442 100644 --- a/libweston/backend-drm/kms-color.c +++ b/libweston/backend-drm/kms-color.c @@ -32,7 +32,6 @@ #include #include "drm-internal.h" -#include "libdrm-updates.h" static inline uint16_t color_xy_to_u16(float v) diff --git a/libweston/backend-drm/libdrm-updates.h b/libweston/backend-drm/libdrm-updates.h deleted file mode 100644 index 73a24b67..00000000 --- a/libweston/backend-drm/libdrm-updates.h +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2007 Dave Airlie - * Copyright (c) 2007 Jakob Bornecrantz - * Copyright (c) 2008 Red Hat Inc. - * Copyright (c) 2007-2008 Tungsten Graphics, Inc., Cedar Park, TX., USA - * Copyright (c) 2007-2008 Intel Corporation - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS - * IN THE SOFTWARE. - */ - -#pragma once - -#include - -/* - * This header contains fallback definitions copied from libdrm upstream to - * avoid hard-depending on too new libdrm. - */ - -#if !HAVE_LIBDRM_HDR - -/** - * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. - * - * HDR Metadata Infoframe as per CTA 861.G spec. This is expected - * to match exactly with the spec. - * - * Userspace is expected to pass the metadata information as per - * the format described in this structure. - */ -struct hdr_metadata_infoframe { - /** - * @eotf: Electro-Optical Transfer Function (EOTF) - * used in the stream. - */ - __u8 eotf; - /** - * @metadata_type: Static_Metadata_Descriptor_ID. - */ - __u8 metadata_type; - /** - * @display_primaries: Color Primaries of the Data. - * These are coded as unsigned 16-bit values in units of - * 0.00002, where 0x0000 represents zero and 0xC350 - * represents 1.0000. - * @display_primaries.x: X cordinate of color primary. - * @display_primaries.y: Y cordinate of color primary. - */ - struct { - __u16 x, y; - } display_primaries[3]; - /** - * @white_point: White Point of Colorspace Data. - * These are coded as unsigned 16-bit values in units of - * 0.00002, where 0x0000 represents zero and 0xC350 - * represents 1.0000. - * @white_point.x: X cordinate of whitepoint of color primary. - * @white_point.y: Y cordinate of whitepoint of color primary. - */ - struct { - __u16 x, y; - } white_point; - /** - * @max_display_mastering_luminance: Max Mastering Display Luminance. - * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, - * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. - */ - __u16 max_display_mastering_luminance; - /** - * @min_display_mastering_luminance: Min Mastering Display Luminance. - * This value is coded as an unsigned 16-bit value in units of - * 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF - * represents 6.5535 cd/m2. - */ - __u16 min_display_mastering_luminance; - /** - * @max_cll: Max Content Light Level. - * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, - * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. - */ - __u16 max_cll; - /** - * @max_fall: Max Frame Average Light Level. - * This value is coded as an unsigned 16-bit value in units of 1 cd/m2, - * where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. - */ - __u16 max_fall; -}; - -/** - * struct hdr_output_metadata - HDR output metadata - * - * Metadata Information to be passed from userspace - */ -struct hdr_output_metadata { - /** - * @metadata_type: Static_Metadata_Descriptor_ID. - */ - __u32 metadata_type; - /** - * @hdmi_metadata_type1: HDR Metadata Infoframe. - */ - union { - struct hdr_metadata_infoframe hdmi_metadata_type1; - }; -}; - -#endif /* !HAVE_LIBDRM_HDR */ diff --git a/libweston/backend-drm/meson.build b/libweston/backend-drm/meson.build index cb2ebda0..bf7ce33b 100644 --- a/libweston/backend-drm/meson.build +++ b/libweston/backend-drm/meson.build @@ -19,11 +19,6 @@ dep_backlight = declare_dependency( config_h.set('BUILD_DRM_COMPOSITOR', '1') -config_h.set10( - 'HAVE_LIBDRM_HDR', - dep_libdrm.version().version_compare('>= 2.4.104') -) - srcs_drm = [ 'drm.c', 'fb.c',