aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hdmi.h
diff options
context:
space:
mode:
authorLespiau, Damien <damien.lespiau@intel.com>2013-08-19 16:59:01 +0100
committerDave Airlie <airlied@gmail.com>2013-08-30 08:41:30 +1000
commitaf3e95b40720cdf301eb85387c0a3dc4067cc551 (patch)
tree22590128866c81d879ff51ffb2d9b4d8d7d1b205 /include/linux/hdmi.h
parentdrm/edid: Move HDMI_IDENTIFIER to hdmi.h (diff)
downloadlinux-dev-af3e95b40720cdf301eb85387c0a3dc4067cc551.tar.xz
linux-dev-af3e95b40720cdf301eb85387c0a3dc4067cc551.zip
video/hdmi: Hook the HDMI vendor infoframe with the generic _pack()
With this last bit, hdmi_infoframe_pack() is now able to pack any infoframe we support. At the same time, because it's impractical to make two commits out of this, we get rid of the version that encourages the open coding of the vendor infoframe packing. We can do so because the only user of this API has been ported in: Author: Damien Lespiau <damien.lespiau@intel.com> Date: Mon Aug 12 18:08:37 2013 +0100 gpu: host1x: Port the HDMI vendor infoframe code the common helpers v2: Change oui to be an unsigned int (Ville Syrjälä) Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'include/linux/hdmi.h')
-rw-r--r--include/linux/hdmi.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/hdmi.h b/include/linux/hdmi.h
index 37e0cd755284..e24d850a8ee6 100644
--- a/include/linux/hdmi.h
+++ b/include/linux/hdmi.h
@@ -225,16 +225,6 @@ 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);
-struct hdmi_vendor_infoframe {
- enum hdmi_infoframe_type type;
- unsigned char version;
- unsigned char length;
- u8 data[27];
-};
-
-ssize_t hdmi_vendor_infoframe_pack(struct hdmi_vendor_infoframe *frame,
- void *buffer, size_t size);
-
enum hdmi_3d_structure {
HDMI_3D_STRUCTURE_INVALID = -1,
HDMI_3D_STRUCTURE_FRAME_PACKING = 0,
@@ -251,6 +241,7 @@ struct hdmi_hdmi_infoframe {
enum hdmi_infoframe_type type;
unsigned char version;
unsigned char length;
+ unsigned int oui;
u8 vic;
enum hdmi_3d_structure s3d_struct;
unsigned int s3d_ext_data;
@@ -260,12 +251,21 @@ int hdmi_hdmi_infoframe_init(struct hdmi_hdmi_infoframe *frame);
ssize_t hdmi_hdmi_infoframe_pack(struct hdmi_hdmi_infoframe *frame,
void *buffer, size_t size);
+union hdmi_vendor_infoframe {
+ struct {
+ enum hdmi_infoframe_type type;
+ unsigned char version;
+ unsigned char length;
+ unsigned int oui;
+ } any;
+ struct hdmi_hdmi_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;
- struct hdmi_hdmi_infoframe hdmi;
+ union hdmi_vendor_infoframe vendor;
struct hdmi_audio_infoframe audio;
};