Commit aeec1a6c authored by Mythri P K's avatar Mythri P K Committed by Tomi Valkeinen

OMAPDSS: HDMI: remove duplicate video interface code

video interface structure is a duplicate structure with parameters which are
already present in ip_data config structure, Thus removing the structure and
modifying corresponding code.
Signed-off-by: default avatarMythri P K <mythripk@ti.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent dcd6c922
...@@ -629,8 +629,7 @@ static void hdmi_core_av_packet_config(struct hdmi_ip_data *ip_data, ...@@ -629,8 +629,7 @@ static void hdmi_core_av_packet_config(struct hdmi_ip_data *ip_data,
} }
static void hdmi_wp_init(struct omap_video_timings *timings, static void hdmi_wp_init(struct omap_video_timings *timings,
struct hdmi_video_format *video_fmt, struct hdmi_video_format *video_fmt)
struct hdmi_video_interface *video_int)
{ {
pr_debug("Enter hdmi_wp_init\n"); pr_debug("Enter hdmi_wp_init\n");
...@@ -645,12 +644,6 @@ static void hdmi_wp_init(struct omap_video_timings *timings, ...@@ -645,12 +644,6 @@ static void hdmi_wp_init(struct omap_video_timings *timings,
video_fmt->y_res = 0; video_fmt->y_res = 0;
video_fmt->x_res = 0; video_fmt->x_res = 0;
video_int->vsp = 0;
video_int->hsp = 0;
video_int->interlacing = 0;
video_int->tm = 0; /* HDMI_TIMING_SLAVE */
} }
void ti_hdmi_4xxx_wp_video_start(struct hdmi_ip_data *ip_data, bool start) void ti_hdmi_4xxx_wp_video_start(struct hdmi_ip_data *ip_data, bool start)
...@@ -687,17 +680,16 @@ static void hdmi_wp_video_config_format(struct hdmi_ip_data *ip_data, ...@@ -687,17 +680,16 @@ static void hdmi_wp_video_config_format(struct hdmi_ip_data *ip_data,
hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_SIZE, l); hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_SIZE, l);
} }
static void hdmi_wp_video_config_interface(struct hdmi_ip_data *ip_data, static void hdmi_wp_video_config_interface(struct hdmi_ip_data *ip_data)
struct hdmi_video_interface *video_int)
{ {
u32 r; u32 r;
pr_debug("Enter hdmi_wp_video_config_interface\n"); pr_debug("Enter hdmi_wp_video_config_interface\n");
r = hdmi_read_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG); r = hdmi_read_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG);
r = FLD_MOD(r, video_int->vsp, 7, 7); r = FLD_MOD(r, ip_data->cfg.timings.vsync_pol, 7, 7);
r = FLD_MOD(r, video_int->hsp, 6, 6); r = FLD_MOD(r, ip_data->cfg.timings.hsync_pol, 6, 6);
r = FLD_MOD(r, video_int->interlacing, 3, 3); r = FLD_MOD(r, ip_data->cfg.interlace, 3, 3);
r = FLD_MOD(r, video_int->tm, 1, 0); r = FLD_MOD(r, 1, 1, 0); /* HDMI_TIMING_MASTER_24BIT */
hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG, r); hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG, r);
} }
...@@ -725,15 +717,13 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data) ...@@ -725,15 +717,13 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data)
/* HDMI */ /* HDMI */
struct omap_video_timings video_timing; struct omap_video_timings video_timing;
struct hdmi_video_format video_format; struct hdmi_video_format video_format;
struct hdmi_video_interface video_interface;
/* HDMI core */ /* HDMI core */
struct hdmi_core_infoframe_avi avi_cfg; struct hdmi_core_infoframe_avi avi_cfg;
struct hdmi_core_video_config v_core_cfg; struct hdmi_core_video_config v_core_cfg;
struct hdmi_core_packet_enable_repeat repeat_cfg; struct hdmi_core_packet_enable_repeat repeat_cfg;
struct hdmi_config *cfg = &ip_data->cfg; struct hdmi_config *cfg = &ip_data->cfg;
hdmi_wp_init(&video_timing, &video_format, hdmi_wp_init(&video_timing, &video_format);
&video_interface);
hdmi_core_init(&v_core_cfg, hdmi_core_init(&v_core_cfg,
&avi_cfg, &avi_cfg,
...@@ -748,12 +738,7 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data) ...@@ -748,12 +738,7 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data)
hdmi_wp_video_config_format(ip_data, &video_format); hdmi_wp_video_config_format(ip_data, &video_format);
video_interface.vsp = cfg->timings.vsync_pol; hdmi_wp_video_config_interface(ip_data);
video_interface.hsp = cfg->timings.hsync_pol;
video_interface.interlacing = cfg->interlace;
video_interface.tm = 1 ; /* HDMI_TIMING_MASTER_24BIT */
hdmi_wp_video_config_interface(ip_data, &video_interface);
/* /*
* configure core video part * configure core video part
......
...@@ -517,13 +517,6 @@ struct hdmi_video_format { ...@@ -517,13 +517,6 @@ struct hdmi_video_format {
u32 x_res; /* pixel per line */ u32 x_res; /* pixel per line */
}; };
struct hdmi_video_interface {
int vsp; /* Vsync polarity */
int hsp; /* Hsync polarity */
int interlacing;
int tm; /* Timing mode */
};
struct hdmi_audio_format { struct hdmi_audio_format {
enum hdmi_stereo_channels stereo_channels; enum hdmi_stereo_channels stereo_channels;
u8 active_chnnls_msk; u8 active_chnnls_msk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment