hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/include/linux/hdmi.h
....@@ -27,6 +27,21 @@
2727 #include <linux/types.h>
2828 #include <linux/device.h>
2929
30
+enum hdmi_packet_type {
31
+ HDMI_PACKET_TYPE_NULL = 0x00,
32
+ HDMI_PACKET_TYPE_AUDIO_CLOCK_REGEN = 0x01,
33
+ HDMI_PACKET_TYPE_AUDIO_SAMPLE = 0x02,
34
+ HDMI_PACKET_TYPE_GENERAL_CONTROL = 0x03,
35
+ HDMI_PACKET_TYPE_ACP = 0x04,
36
+ HDMI_PACKET_TYPE_ISRC1 = 0x05,
37
+ HDMI_PACKET_TYPE_ISRC2 = 0x06,
38
+ HDMI_PACKET_TYPE_ONE_BIT_AUDIO_SAMPLE = 0x07,
39
+ HDMI_PACKET_TYPE_DST_AUDIO = 0x08,
40
+ HDMI_PACKET_TYPE_HBR_AUDIO_STREAM = 0x09,
41
+ HDMI_PACKET_TYPE_GAMUT_METADATA = 0x0a,
42
+ /* + enum hdmi_infoframe_type */
43
+};
44
+
3045 enum hdmi_infoframe_type {
3146 HDMI_INFOFRAME_TYPE_VENDOR = 0x81,
3247 HDMI_INFOFRAME_TYPE_AVI = 0x82,
....@@ -42,6 +57,7 @@
4257 #define HDMI_SPD_INFOFRAME_SIZE 25
4358 #define HDMI_AUDIO_INFOFRAME_SIZE 10
4459 #define HDMI_DRM_INFOFRAME_SIZE 26
60
+#define HDMI_VENDOR_INFOFRAME_SIZE 4
4561
4662 #define HDMI_INFOFRAME_SIZE(type) \
4763 (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
....@@ -192,7 +208,7 @@
192208 u16 max_fall;
193209 };
194210
195
-int hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
211
+void hdmi_avi_infoframe_init(struct hdmi_avi_infoframe *frame);
196212 ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
197213 size_t size);
198214 ssize_t hdmi_avi_infoframe_pack_only(const struct hdmi_avi_infoframe *frame,
....@@ -204,6 +220,8 @@
204220 ssize_t hdmi_drm_infoframe_pack_only(const struct hdmi_drm_infoframe *frame,
205221 void *buffer, size_t size);
206222 int hdmi_drm_infoframe_check(struct hdmi_drm_infoframe *frame);
223
+int hdmi_drm_infoframe_unpack_only(struct hdmi_drm_infoframe *frame,
224
+ const void *buffer, size_t size);
207225
208226 enum hdmi_spd_sdi {
209227 HDMI_SPD_SDI_UNKNOWN,
....@@ -352,8 +370,19 @@
352370 __u16 min_cll;
353371 };
354372
373
+/**
374
+ * struct hdr_sink_metadata - HDR sink metadata
375
+ *
376
+ * Metadata Information read from Sink's EDID
377
+ */
355378 struct hdr_sink_metadata {
379
+ /**
380
+ * @metadata_type: Static_Metadata_Descriptor_ID.
381
+ */
356382 __u32 metadata_type;
383
+ /**
384
+ * @hdmi_type1: HDR Metadata Infoframe.
385
+ */
357386 union {
358387 struct hdr_static_metadata hdmi_type1;
359388 };
....@@ -383,6 +412,7 @@
383412 * @spd: spd infoframe
384413 * @vendor: union of all vendor infoframes
385414 * @audio: audio infoframe
415
+ * @drm: Dynamic Range and Mastering infoframe
386416 *
387417 * This is used by the generic pack function. This works since all infoframes
388418 * have the same header which also indicates which type of infoframe should be
....@@ -405,6 +435,6 @@
405435 int hdmi_infoframe_unpack(union hdmi_infoframe *frame,
406436 const void *buffer, size_t size);
407437 void hdmi_infoframe_log(const char *level, struct device *dev,
408
- union hdmi_infoframe *frame);
438
+ const union hdmi_infoframe *frame);
409439
410440 #endif /* _DRM_HDMI_H */