diff options
author | Mythri P K <mythripk@ti.com> | 2012-02-08 01:24:19 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-02-21 02:39:53 -0500 |
commit | da8f14fc3bb054081c90abc9dd38679bb9308dbb (patch) | |
tree | 3e5bc013d0446f9a732743034d5dd2f262bdd84c /drivers | |
parent | 992ee64af66f05e16aa70b475f9ad3047f801185 (diff) |
OMAPDSS: HDMI: Move Avi-infoframe struct to hdmi_ip_data
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi.h | 42 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 8 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h | 40 |
3 files changed, 46 insertions, 44 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi.h b/drivers/video/omap2/dss/ti_hdmi.h index cb6f0f20f458..1f58b84d6901 100644 --- a/drivers/video/omap2/dss/ti_hdmi.h +++ b/drivers/video/omap2/dss/ti_hdmi.h | |||
@@ -113,6 +113,47 @@ struct ti_hdmi_ip_ops { | |||
113 | 113 | ||
114 | }; | 114 | }; |
115 | 115 | ||
116 | /* | ||
117 | * Refer to section 8.2 in HDMI 1.3 specification for | ||
118 | * details about infoframe databytes | ||
119 | */ | ||
120 | struct hdmi_core_infoframe_avi { | ||
121 | /* Y0, Y1 rgb,yCbCr */ | ||
122 | u8 db1_format; | ||
123 | /* A0 Active information Present */ | ||
124 | u8 db1_active_info; | ||
125 | /* B0, B1 Bar info data valid */ | ||
126 | u8 db1_bar_info_dv; | ||
127 | /* S0, S1 scan information */ | ||
128 | u8 db1_scan_info; | ||
129 | /* C0, C1 colorimetry */ | ||
130 | u8 db2_colorimetry; | ||
131 | /* M0, M1 Aspect ratio (4:3, 16:9) */ | ||
132 | u8 db2_aspect_ratio; | ||
133 | /* R0...R3 Active format aspect ratio */ | ||
134 | u8 db2_active_fmt_ar; | ||
135 | /* ITC IT content. */ | ||
136 | u8 db3_itc; | ||
137 | /* EC0, EC1, EC2 Extended colorimetry */ | ||
138 | u8 db3_ec; | ||
139 | /* Q1, Q0 Quantization range */ | ||
140 | u8 db3_q_range; | ||
141 | /* SC1, SC0 Non-uniform picture scaling */ | ||
142 | u8 db3_nup_scaling; | ||
143 | /* VIC0..6 Video format identification */ | ||
144 | u8 db4_videocode; | ||
145 | /* PR0..PR3 Pixel repetition factor */ | ||
146 | u8 db5_pixel_repeat; | ||
147 | /* Line number end of top bar */ | ||
148 | u16 db6_7_line_eoftop; | ||
149 | /* Line number start of bottom bar */ | ||
150 | u16 db8_9_line_sofbottom; | ||
151 | /* Pixel number end of left bar */ | ||
152 | u16 db10_11_pixel_eofleft; | ||
153 | /* Pixel number start of right bar */ | ||
154 | u16 db12_13_pixel_sofright; | ||
155 | }; | ||
156 | |||
116 | struct hdmi_ip_data { | 157 | struct hdmi_ip_data { |
117 | void __iomem *base_wp; /* HDMI wrapper */ | 158 | void __iomem *base_wp; /* HDMI wrapper */ |
118 | unsigned long core_sys_offset; | 159 | unsigned long core_sys_offset; |
@@ -122,6 +163,7 @@ struct hdmi_ip_data { | |||
122 | const struct ti_hdmi_ip_ops *ops; | 163 | const struct ti_hdmi_ip_ops *ops; |
123 | struct hdmi_config cfg; | 164 | struct hdmi_config cfg; |
124 | struct hdmi_pll_info pll_data; | 165 | struct hdmi_pll_info pll_data; |
166 | struct hdmi_core_infoframe_avi avi_cfg; | ||
125 | 167 | ||
126 | /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */ | 168 | /* ti_hdmi_4xxx_ip private data. These should be in a separate struct */ |
127 | int hpd_gpio; | 169 | int hpd_gpio; |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index c05eacd4444f..b9b97f172cde 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | |||
@@ -594,12 +594,12 @@ static void hdmi_core_video_config(struct hdmi_ip_data *ip_data, | |||
594 | HDMI_CORE_SYS_TMDS_CTRL, cfg->tclk_sel_clkmult, 6, 5); | 594 | HDMI_CORE_SYS_TMDS_CTRL, cfg->tclk_sel_clkmult, 6, 5); |
595 | } | 595 | } |
596 | 596 | ||
597 | static void hdmi_core_aux_infoframe_avi_config(struct hdmi_ip_data *ip_data, | 597 | static void hdmi_core_aux_infoframe_avi_config(struct hdmi_ip_data *ip_data) |
598 | struct hdmi_core_infoframe_avi info_avi) | ||
599 | { | 598 | { |
600 | u32 val; | 599 | u32 val; |
601 | char sum = 0, checksum = 0; | 600 | char sum = 0, checksum = 0; |
602 | void __iomem *av_base = hdmi_av_base(ip_data); | 601 | void __iomem *av_base = hdmi_av_base(ip_data); |
602 | struct hdmi_core_infoframe_avi info_avi = ip_data->avi_cfg; | ||
603 | 603 | ||
604 | sum += 0x82 + 0x002 + 0x00D; | 604 | sum += 0x82 + 0x002 + 0x00D; |
605 | hdmi_write_reg(av_base, HDMI_CORE_AV_AVI_TYPE, 0x082); | 605 | 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) | |||
778 | struct omap_video_timings video_timing; | 778 | struct omap_video_timings video_timing; |
779 | struct hdmi_video_format video_format; | 779 | struct hdmi_video_format video_format; |
780 | /* HDMI core */ | 780 | /* HDMI core */ |
781 | struct hdmi_core_infoframe_avi avi_cfg; | 781 | struct hdmi_core_infoframe_avi avi_cfg = ip_data->avi_cfg; |
782 | struct hdmi_core_video_config v_core_cfg; | 782 | struct hdmi_core_video_config v_core_cfg; |
783 | struct hdmi_core_packet_enable_repeat repeat_cfg; | 783 | struct hdmi_core_packet_enable_repeat repeat_cfg; |
784 | struct hdmi_config *cfg = &ip_data->cfg; | 784 | struct hdmi_config *cfg = &ip_data->cfg; |
@@ -840,7 +840,7 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data) | |||
840 | avi_cfg.db10_11_pixel_eofleft = 0; | 840 | avi_cfg.db10_11_pixel_eofleft = 0; |
841 | avi_cfg.db12_13_pixel_sofright = 0; | 841 | avi_cfg.db12_13_pixel_sofright = 0; |
842 | 842 | ||
843 | hdmi_core_aux_infoframe_avi_config(ip_data, avi_cfg); | 843 | hdmi_core_aux_infoframe_avi_config(ip_data); |
844 | 844 | ||
845 | /* enable/repeat the infoframe */ | 845 | /* enable/repeat the infoframe */ |
846 | repeat_cfg.avi_infoframe = HDMI_PACKETENABLE; | 846 | repeat_cfg.avi_infoframe = HDMI_PACKETENABLE; |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h index 004b4182bddd..a14d1a0e6e41 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h | |||
@@ -450,46 +450,6 @@ struct hdmi_core_video_config { | |||
450 | * Refer to section 8.2 in HDMI 1.3 specification for | 450 | * Refer to section 8.2 in HDMI 1.3 specification for |
451 | * details about infoframe databytes | 451 | * details about infoframe databytes |
452 | */ | 452 | */ |
453 | struct hdmi_core_infoframe_avi { | ||
454 | /* Y0, Y1 rgb,yCbCr */ | ||
455 | u8 db1_format; | ||
456 | /* A0 Active information Present */ | ||
457 | u8 db1_active_info; | ||
458 | /* B0, B1 Bar info data valid */ | ||
459 | u8 db1_bar_info_dv; | ||
460 | /* S0, S1 scan information */ | ||
461 | u8 db1_scan_info; | ||
462 | /* C0, C1 colorimetry */ | ||
463 | u8 db2_colorimetry; | ||
464 | /* M0, M1 Aspect ratio (4:3, 16:9) */ | ||
465 | u8 db2_aspect_ratio; | ||
466 | /* R0...R3 Active format aspect ratio */ | ||
467 | u8 db2_active_fmt_ar; | ||
468 | /* ITC IT content. */ | ||
469 | u8 db3_itc; | ||
470 | /* EC0, EC1, EC2 Extended colorimetry */ | ||
471 | u8 db3_ec; | ||
472 | /* Q1, Q0 Quantization range */ | ||
473 | u8 db3_q_range; | ||
474 | /* SC1, SC0 Non-uniform picture scaling */ | ||
475 | u8 db3_nup_scaling; | ||
476 | /* VIC0..6 Video format identification */ | ||
477 | u8 db4_videocode; | ||
478 | /* PR0..PR3 Pixel repetition factor */ | ||
479 | u8 db5_pixel_repeat; | ||
480 | /* Line number end of top bar */ | ||
481 | u16 db6_7_line_eoftop; | ||
482 | /* Line number start of bottom bar */ | ||
483 | u16 db8_9_line_sofbottom; | ||
484 | /* Pixel number end of left bar */ | ||
485 | u16 db10_11_pixel_eofleft; | ||
486 | /* Pixel number start of right bar */ | ||
487 | u16 db12_13_pixel_sofright; | ||
488 | }; | ||
489 | /* | ||
490 | * Refer to section 8.2 in HDMI 1.3 specification for | ||
491 | * details about infoframe databytes | ||
492 | */ | ||
493 | struct hdmi_core_infoframe_audio { | 453 | struct hdmi_core_infoframe_audio { |
494 | u8 db1_coding_type; | 454 | u8 db1_coding_type; |
495 | u8 db1_channel_count; | 455 | u8 db1_channel_count; |