]> Pileus Git - ~andy/linux/blobdiff - include/linux/hdmi.h
Merge tag 'vfio-v3.12-rc0' of git://github.com/awilliam/linux-vfio
[~andy/linux] / include / linux / hdmi.h
index 0f3f82eadef792474be402ea6de1264055543ce9..9231be9e90a2261d6ad6a12b3f49d25e39df7229 100644 (file)
@@ -18,11 +18,15 @@ enum hdmi_infoframe_type {
        HDMI_INFOFRAME_TYPE_AUDIO = 0x84,
 };
 
+#define HDMI_IEEE_OUI 0x000c03
 #define HDMI_INFOFRAME_HEADER_SIZE  4
 #define HDMI_AVI_INFOFRAME_SIZE    13
 #define HDMI_SPD_INFOFRAME_SIZE    25
 #define HDMI_AUDIO_INFOFRAME_SIZE  10
 
+#define HDMI_INFOFRAME_SIZE(type)      \
+       (HDMI_INFOFRAME_HEADER_SIZE + HDMI_ ## type ## _INFOFRAME_SIZE)
+
 struct hdmi_any_infoframe {
        enum hdmi_infoframe_type type;
        unsigned char version;
@@ -106,9 +110,6 @@ struct hdmi_avi_infoframe {
        unsigned char version;
        unsigned char length;
        enum hdmi_colorspace colorspace;
-       bool active_info_valid;
-       bool horizontal_bar_valid;
-       bool vertical_bar_valid;
        enum hdmi_scan_mode scan_mode;
        enum hdmi_colorimetry colorimetry;
        enum hdmi_picture_aspect picture_aspect;
@@ -224,21 +225,48 @@ int hdmi_audio_infoframe_init(struct hdmi_audio_infoframe *frame);
 ssize_t hdmi_audio_infoframe_pack(struct hdmi_audio_infoframe *frame,
                                  void *buffer, size_t size);
 
+enum hdmi_3d_structure {
+       HDMI_3D_STRUCTURE_INVALID = -1,
+       HDMI_3D_STRUCTURE_FRAME_PACKING = 0,
+       HDMI_3D_STRUCTURE_FIELD_ALTERNATIVE,
+       HDMI_3D_STRUCTURE_LINE_ALTERNATIVE,
+       HDMI_3D_STRUCTURE_SIDE_BY_SIDE_FULL,
+       HDMI_3D_STRUCTURE_L_DEPTH,
+       HDMI_3D_STRUCTURE_L_DEPTH_GFX_GFX_DEPTH,
+       HDMI_3D_STRUCTURE_TOP_AND_BOTTOM,
+       HDMI_3D_STRUCTURE_SIDE_BY_SIDE_HALF = 8,
+};
+
+
 struct hdmi_vendor_infoframe {
        enum hdmi_infoframe_type type;
        unsigned char version;
        unsigned char length;
-       u8 data[27];
+       unsigned int oui;
+       u8 vic;
+       enum hdmi_3d_structure s3d_struct;
+       unsigned int s3d_ext_data;
 };
 
+int hdmi_vendor_infoframe_init(struct hdmi_vendor_infoframe *frame);
 ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
                                   void *buffer, size_t size);
 
+union hdmi_vendor_any_infoframe {
+       struct {
+               enum hdmi_infoframe_type type;
+               unsigned char version;
+               unsigned char length;
+               unsigned int oui;
+       } any;
+       struct hdmi_vendor_infoframe hdmi;
+};
+
 union hdmi_infoframe {
        struct hdmi_any_infoframe any;
        struct hdmi_avi_infoframe avi;
        struct hdmi_spd_infoframe spd;
-       struct hdmi_vendor_infoframe vendor;
+       union hdmi_vendor_any_infoframe vendor;
        struct hdmi_audio_infoframe audio;
 };