From patchwork Fri Apr 28 10:01:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Ser X-Patchwork-Id: 13226190 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 8F244C77B60 for ; Fri, 28 Apr 2023 10:01:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8A7910E3BD; Fri, 28 Apr 2023 10:01:54 +0000 (UTC) Received: from mail-4022.proton.ch (mail-4022.proton.ch [185.70.40.22]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7447F10ECA2 for ; Fri, 28 Apr 2023 10:01:47 +0000 (UTC) Date: Fri, 28 Apr 2023 10:01:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=emersion.fr; s=protonmail; t=1682676104; x=1682935304; bh=iY8xFGsB6t22O35/ZmU4zCPFQG5WPW8vab3LXL6/5Q0=; 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=EYK5Xupo4gUKTrI6YWnxNXa258upnjKK+dg9Jeh+qr13gUO3TUUZFhaxsXMmNPSPg OPlLDMhVXuEplsCtMtAaN7WDcTk/7UhgDynC1bpGDa3Vee98QHeJwEwbSQPUaAT+Du PnW74XgHBsd77MgJfgmWNZQY6EJ5Z5vnfzCpYbH0/MozBZukEY7xz5B+/jIyp0R3Q2 KC8wFVEkkTN5h/HeDgzVvsIh9SUMWbLjrE60TByq52JDuMtoUILsOOS6o9BEv5Swky yYn1HUWeE+4cYhAPEkylPLpVZBOr0YjKFBc7qklL5A/TmYGtEKo4GCEtEVfiWJzX5d h7RyFbFFV284A== To: dri-devel@lists.freedesktop.org From: Simon Ser Subject: [PATCH 2/3] drm: add define for Static_Metadata_Descriptor_ID Message-ID: <20230428100115.9802-2-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" This avoids hard-coding magic values in user-space, and makes our documentation clearer. Signed-off-by: Simon Ser Cc: Harry Wentland Cc: Daniel Vetter Cc: Sebastian Wick Cc: Joshua Ashton Cc: Pekka Paalanen Reviewed-by: Pekka Paalanen --- include/uapi/drm/drm_mode.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 997d23fb2d68..c0c40dc9e2f1 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -849,6 +849,16 @@ struct drm_color_lut { __u16 reserved; }; +/** + * enum drm_hdr_metadata_type - HDR metadata descriptor ID. + */ +enum drm_hdr_metadata_type { + /** + * @DRM_HDR_STATIC_METADATA_TYPE1: Static Metadata Type 1. + */ + DRM_HDR_STATIC_METADATA_TYPE1 = 0, +}; + /** * struct hdr_metadata_infoframe - HDR Metadata Infoframe Data. * @@ -866,6 +876,7 @@ struct hdr_metadata_infoframe { __u8 eotf; /** * @metadata_type: Static_Metadata_Descriptor_ID. + * This must be &DRM_HDR_STATIC_METADATA_TYPE1. */ __u8 metadata_type; /** @@ -925,6 +936,7 @@ struct hdr_metadata_infoframe { struct hdr_output_metadata { /** * @metadata_type: Static_Metadata_Descriptor_ID. + * This must be &DRM_HDR_STATIC_METADATA_TYPE1. */ __u32 metadata_type; /**