Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux Fill out some structs. H...



details:   https://anonhg.NetBSD.org/src/rev/eb1c9f3748b3
branches:  trunk
changeset: 1028182:eb1c9f3748b3
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 09:46:24 2021 +0000

description:
Fill out some structs. Hopefully order doesn't matter...?

Also stub hdmi_drm_infoframe_init


Author: Maya Rashish <maya%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/drm2/include/linux/hdmi.h |  48 ++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 3 deletions(-)

diffs (75 lines):

diff -r cd023741934e -r eb1c9f3748b3 sys/external/bsd/drm2/include/linux/hdmi.h
--- a/sys/external/bsd/drm2/include/linux/hdmi.h        Sun Dec 19 09:46:13 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/hdmi.h        Sun Dec 19 09:46:24 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hdmi.h,v 1.8 2021/12/19 01:55:05 riastradh Exp $       */
+/*     $NetBSD: hdmi.h,v 1.9 2021/12/19 09:46:24 riastradh Exp $       */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -173,6 +173,17 @@
        HDMI_INFOFRAME_TYPE_AUDIO               = 0x84,
 };
 
+enum hdmi_eotf {
+       HDMI_EOTF_TRADITIONAL_GAMMA_SDR,
+       HDMI_EOTF_TRADITIONAL_GAMMA_HDR,
+       HDMI_EOTF_SMPTE_ST2084,
+       HDMI_EOTF_BT_2100_HLG,
+};
+
+enum hdmi_metadata_type {
+       HDMI_STATIC_METADATA_TYPE1 = 1,
+};
+
 #define        HDMI_INFOFRAME_SIZE(TYPE)                                             \
        (HDMI_INFOFRAME_HEADER_SIZE + HDMI_##TYPE##_INFOFRAME_SIZE)
 
@@ -184,6 +195,33 @@
        /* checksum */
 };
 
+struct hdmi_type1 {
+       enum hdmi_eotf eotf;
+       enum hdmi_metadata_type metadata_type;
+       uint16_t min_cll;
+       uint16_t max_cll;
+       uint16_t max_fall;
+};
+
+struct hdr_sink_metadata {
+       struct hdmi_type1 hdmi_type1;
+};
+
+struct hdmi_drm_infoframe {
+       enum hdmi_eotf eotf;
+       enum hdmi_metadata_type metadata_type;
+       struct {
+               uint16_t x, y;
+       } display_primaries[3];
+       struct {
+               uint16_t x, y;
+       } white_point;
+       uint16_t max_display_mastering_luminance;
+       uint16_t min_display_mastering_luminance;
+       uint16_t max_cll;
+       uint16_t max_fall;
+};
+
 static inline void
 hdmi_infoframe_header_init(struct hdmi_infoframe_header *header,
     enum hdmi_infoframe_type type, uint8_t vers, uint8_t length)
@@ -554,7 +592,11 @@
        }
 }
 
-struct hdr_sink_metadata {};
-struct hdmi_drm_infoframe {};
+static inline int
+hdmi_drm_infoframe_init(struct hdmi_drm_infoframe *frame)
+{
+       panic("TODO");
+       return 0;
+}
 
 #endif /* _LINUX_HDMI_H_ */



Home | Main Index | Thread Index | Old Index