From patchwork Fri Apr 28 10:01:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13226189 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0E417C77B61 for ; Fri, 28 Apr 2023 10:01:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4245B10ECA2; Fri, 28 Apr 2023 10:01:49 +0000 (UTC) Received: from mail-40136.proton.ch (mail-40136.proton.ch [185.70.40.136]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7874010ECAE for ; Fri, 28 Apr 2023 10:01:47 +0000 (UTC) Date: Fri, 28 Apr 2023 10:01:34 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1682676104; x=1682935304; bh=6YN8T8owtd4li0gDN/0X8nJ0xexeERh39+ubt9+AR5I=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=pW+/zqdfS+tFUy9kOu7235Qn37qk6MBYk8ImzyM00/sgcAGGCH2Kbeaj09FzFWJvl q4Ol0Yj7YxfayljUluhTsU1OZ0jDSJK8svHKzrFcwUcRjVv3eQRxcWXGaFaOyTVfNf GlaZ02bFpJEBqlaYjXDHmE0yObYRasKOVFuFRUcGM6yC6ityx08F7axG2sohUIg45U +9Lj1mTPDu5XkYkKHHrz/+4tXVH0WhQmhD//WvN8s5a/rcCCo+O+iNNwd3GdXilPZO AONoimLvfLdRZgM7A0ItEHOMWASJMoW4TmS9kk8TjQehWGuo/Nf/GMfpMGLDawh6jK bQqnxRYYYzvpA== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 3/3] drm: add enum drm_hdr_metadata_eotf Message-ID: <20230428100115.9802-3-contact@emersion.fr> In-Reply-To: <20230428100115.9802-1-contact@emersion.fr> References: <20230428100115.9802-1-contact@emersion.fr> Feedback-ID: 1358184:user:proton MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pekka Paalanen , Sebastian Wick , Joshua Ashton Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Avoids hardcoding magic numbers in user-space, and makes the docs clearer. Signed-off-by: Simon Ser Cc: Harry Wentland Cc: Daniel Vetter Cc: Sebastian Wick Cc: Joshua Ashton Cc: Pekka Paalanen --- include/uapi/drm/drm_mode.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c0c40dc9e2f1..eb2a38c73ae0 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -859,6 +859,31 @@ enum drm_hdr_metadata_type { DRM_HDR_STATIC_METADATA_TYPE1 = 0, }; +/** + * enum drm_hdr_metadata_eotf - Electro-Optical Transfer Function. + */ +enum drm_hdr_metadata_eotf { + /** + * @DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_SDR: traditional gamma, SDR + * luminance range. + */ + DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_SDR = 0, + /** + * @DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_HDR: traditional gamma, HDR + * luminance range. + */ + DRM_HDR_METADATA_EOTF_TRADITIONAL_GAMMA_HDR = 1, + /** + * @DRM_HDR_METADATA_EOTF_SMPTE_ST_2084: SMPTE ST 2084. + */ + DRM_HDR_METADATA_EOTF_SMPTE_ST_2084 = 2, + /** + * @DRM_HDR_METADATA_EOTF_HLG_BT2100: Hybrid Log-Gamma (HLG) based on + * ITU-R BT.2100-0. + */ + DRM_HDR_METADATA_EOTF_HLG_BT2100 = 3, +}; + /** * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. * @@ -871,7 +896,7 @@ enum drm_hdr_metadata_type { struct hdr_metadata_infoframe { /** * @eotf: Electro-Optical Transfer Function (EOTF) - * used in the stream. + * used in the stream. See enum drm_hdr_metadata_eotf. */ __u8 eotf; /**