video/hdmi: Add a macro to return the size of a full infoframe
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 6 Aug 2013 19:32:15 +0000 (20:32 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 8 Aug 2013 12:04:45 +0000 (14:04 +0200)
Cc: Thierry Reding <thierry.reding@avionic-design.de>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Acked-by: Dave Airlie <airlied@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
include/linux/hdmi.h

index 0f3f82eadef792474be402ea6de1264055543ce9..bc6743e76e378796474cb3cb784e062d07b904b0 100644 (file)
@@ -23,6 +23,9 @@ enum hdmi_infoframe_type {
 #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;