]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
OMAPDSS: HDMI: Move Avi-infoframe struct to hdmi_ip_data
authorMythri P K <mythripk@ti.com>
Wed, 8 Feb 2012 06:24:19 +0000 (11:54 +0530)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Tue, 21 Feb 2012 07:39:53 +0000 (09:39 +0200)
With AVI infoframe various parameters of video stream such as
aspect ratio, quantization range, videocode etc will be indicated
from source to sink.Thus AVI information needs to be set/accessed
by the middle ware based on the video content.
Thus this parameter is now moved to the ip_data structure.

Signed-off-by: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/ti_hdmi.h
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c
drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h

index cb6f0f20f4580c55d7bda901b199e89574e18c01..1f58b84d69015035c134bc5736b86a12bf7b46f8 100644 (file)
@@ -113,6 +113,47 @@ struct ti_hdmi_ip_ops {
 
 };
 
+/*
+ * Refer to section 8.2 in HDMI 1.3 specification for
+ * details about infoframe databytes
+ */
+struct hdmi_core_infoframe_avi {
+       /* Y0, Y1 rgb,yCbCr */
+       u8      db1_format;
+       /* A0  Active information Present */
+       u8      db1_active_info;
+       /* B0, B1 Bar info data valid */
+       u8      db1_bar_info_dv;
+       /* S0, S1 scan information */
+       u8      db1_scan_info;
+       /* C0, C1 colorimetry */
+       u8      db2_colorimetry;
+       /* M0, M1 Aspect ratio (4:3, 16:9) */
+       u8      db2_aspect_ratio;
+       /* R0...R3 Active format aspect ratio */
+       u8      db2_active_fmt_ar;
+       /* ITC IT content. */
+       u8      db3_itc;
+       /* EC0, EC1, EC2 Extended colorimetry */
+       u8      db3_ec;
+       /* Q1, Q0 Quantization range */
+       u8      db3_q_range;
+       /* SC1, SC0 Non-uniform picture scaling */
+       u8      db3_nup_scaling;
+       /* VIC0..6 Video format identification */
+       u8      db4_videocode;
+       /* PR0..PR3 Pixel repetition factor */
+       u8      db5_pixel_repeat;
+       /* Line number end of top bar */
+       u16     db6_7_line_eoftop;
+       /* Line number start of bottom bar */
+       u16     db8_9_line_sofbottom;
+       /* Pixel number end of left bar */
+       u16     db10_11_pixel_eofleft;
+       /* Pixel number start of right bar */
+       u16     db12_13_pixel_sofright;
+};
+
 struct hdmi_ip_data {
        void __iomem    *base_wp;       /* HDMI wrapper */
        unsigned long   core_sys_offset;
@@ -122,6 +163,7 @@ struct hdmi_ip_data {
        const struct ti_hdmi_ip_ops *ops;
        struct hdmi_config cfg;
        struct hdmi_pll_info pll_data;
+       struct hdmi_core_infoframe_avi avi_cfg;
 
        /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */
        int hpd_gpio;
index c05eacd4444fe6417da1464fb15ce236d89e0846..b9b97f172cdec60c19951d6edf2f389b7382a2db 100644 (file)
@@ -594,12 +594,12 @@ static void hdmi_core_video_config(struct hdmi_ip_data *ip_data,
                        HDMI_CORE_SYS_TMDS_CTRL, cfg->tclk_sel_clkmult, 6, 5);
 }
 
-static void hdmi_core_aux_infoframe_avi_config(struct hdmi_ip_data *ip_data,
-               struct hdmi_core_infoframe_avi info_avi)
+static void hdmi_core_aux_infoframe_avi_config(struct hdmi_ip_data *ip_data)
 {
        u32 val;
        char sum = 0, checksum = 0;
        void __iomem *av_base = hdmi_av_base(ip_data);
+       struct hdmi_core_infoframe_avi info_avi = ip_data->avi_cfg;
 
        sum += 0x82 + 0x002 + 0x00D;
        hdmi_write_reg(av_base, HDMI_CORE_AV_AVI_TYPE, 0x082);
@@ -778,7 +778,7 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data)
        struct omap_video_timings video_timing;
        struct hdmi_video_format video_format;
        /* HDMI core */
-       struct hdmi_core_infoframe_avi avi_cfg;
+       struct hdmi_core_infoframe_avi avi_cfg = ip_data->avi_cfg;
        struct hdmi_core_video_config v_core_cfg;
        struct hdmi_core_packet_enable_repeat repeat_cfg;
        struct hdmi_config *cfg = &ip_data->cfg;
@@ -840,7 +840,7 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data)
        avi_cfg.db10_11_pixel_eofleft = 0;
        avi_cfg.db12_13_pixel_sofright = 0;
 
-       hdmi_core_aux_infoframe_avi_config(ip_data, avi_cfg);
+       hdmi_core_aux_infoframe_avi_config(ip_data);
 
        /* enable/repeat the infoframe */
        repeat_cfg.avi_infoframe = HDMI_PACKETENABLE;
index 004b4182bddd8672a2267c8b5a2ae79ad72e2e09..a14d1a0e6e4146d00a70a88645d7292ea1793288 100644 (file)
@@ -446,46 +446,6 @@ struct hdmi_core_video_config {
        enum hdmi_core_tclkselclkmult   tclk_sel_clkmult;
 };
 
-/*
- * Refer to section 8.2 in HDMI 1.3 specification for
- * details about infoframe databytes
- */
-struct hdmi_core_infoframe_avi {
-       /* Y0, Y1 rgb,yCbCr */
-       u8      db1_format;
-       /* A0  Active information Present */
-       u8      db1_active_info;
-       /* B0, B1 Bar info data valid */
-       u8      db1_bar_info_dv;
-       /* S0, S1 scan information */
-       u8      db1_scan_info;
-       /* C0, C1 colorimetry */
-       u8      db2_colorimetry;
-       /* M0, M1 Aspect ratio (4:3, 16:9) */
-       u8      db2_aspect_ratio;
-       /* R0...R3 Active format aspect ratio */
-       u8      db2_active_fmt_ar;
-       /* ITC IT content. */
-       u8      db3_itc;
-       /* EC0, EC1, EC2 Extended colorimetry */
-       u8      db3_ec;
-       /* Q1, Q0 Quantization range */
-       u8      db3_q_range;
-       /* SC1, SC0 Non-uniform picture scaling */
-       u8      db3_nup_scaling;
-       /* VIC0..6 Video format identification */
-       u8      db4_videocode;
-       /* PR0..PR3 Pixel repetition factor */
-       u8      db5_pixel_repeat;
-       /* Line number end of top bar */
-       u16     db6_7_line_eoftop;
-       /* Line number start of bottom bar */
-       u16     db8_9_line_sofbottom;
-       /* Pixel number end of left bar */
-       u16     db10_11_pixel_eofleft;
-       /* Pixel number start of right bar */
-       u16     db12_13_pixel_sofright;
-};
 /*
  * Refer to section 8.2 in HDMI 1.3 specification for
  * details about infoframe databytes