diff options
author | Mythri P K <mythripk@ti.com> | 2012-01-06 07:22:07 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-01-25 06:48:32 -0500 |
commit | aeec1a6ccbe28c2cea5f19803394f99859566552 (patch) | |
tree | d3c669e900fb47a3712866fb10b2c065b724a30d /drivers/video/omap2 | |
parent | dcd6c92267155e70a94b3927bce681ce74b80d1f (diff) |
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: Mythri P K <mythripk@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | 31 | ||||
-rw-r--r-- | drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h | 7 |
2 files changed, 8 insertions, 30 deletions
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c index 9af81f18f163..bafbd9fad4b5 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.c | |||
@@ -629,8 +629,7 @@ static void hdmi_core_av_packet_config(struct hdmi_ip_data *ip_data, | |||
629 | } | 629 | } |
630 | 630 | ||
631 | static void hdmi_wp_init(struct omap_video_timings *timings, | 631 | static void hdmi_wp_init(struct omap_video_timings *timings, |
632 | struct hdmi_video_format *video_fmt, | 632 | struct hdmi_video_format *video_fmt) |
633 | struct hdmi_video_interface *video_int) | ||
634 | { | 633 | { |
635 | pr_debug("Enter hdmi_wp_init\n"); | 634 | pr_debug("Enter hdmi_wp_init\n"); |
636 | 635 | ||
@@ -645,12 +644,6 @@ static void hdmi_wp_init(struct omap_video_timings *timings, | |||
645 | video_fmt->y_res = 0; | 644 | video_fmt->y_res = 0; |
646 | video_fmt->x_res = 0; | 645 | video_fmt->x_res = 0; |
647 | 646 | ||
648 | video_int->vsp = 0; | ||
649 | video_int->hsp = 0; | ||
650 | |||
651 | video_int->interlacing = 0; | ||
652 | video_int->tm = 0; /* HDMI_TIMING_SLAVE */ | ||
653 | |||
654 | } | 647 | } |
655 | 648 | ||
656 | void ti_hdmi_4xxx_wp_video_start(struct hdmi_ip_data *ip_data, bool start) | 649 | 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 | hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_SIZE, l); | 680 | hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_SIZE, l); |
688 | } | 681 | } |
689 | 682 | ||
690 | static void hdmi_wp_video_config_interface(struct hdmi_ip_data *ip_data, | 683 | static void hdmi_wp_video_config_interface(struct hdmi_ip_data *ip_data) |
691 | struct hdmi_video_interface *video_int) | ||
692 | { | 684 | { |
693 | u32 r; | 685 | u32 r; |
694 | pr_debug("Enter hdmi_wp_video_config_interface\n"); | 686 | pr_debug("Enter hdmi_wp_video_config_interface\n"); |
695 | 687 | ||
696 | r = hdmi_read_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG); | 688 | r = hdmi_read_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG); |
697 | r = FLD_MOD(r, video_int->vsp, 7, 7); | 689 | r = FLD_MOD(r, ip_data->cfg.timings.vsync_pol, 7, 7); |
698 | r = FLD_MOD(r, video_int->hsp, 6, 6); | 690 | r = FLD_MOD(r, ip_data->cfg.timings.hsync_pol, 6, 6); |
699 | r = FLD_MOD(r, video_int->interlacing, 3, 3); | 691 | r = FLD_MOD(r, ip_data->cfg.interlace, 3, 3); |
700 | r = FLD_MOD(r, video_int->tm, 1, 0); | 692 | r = FLD_MOD(r, 1, 1, 0); /* HDMI_TIMING_MASTER_24BIT */ |
701 | hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG, r); | 693 | hdmi_write_reg(hdmi_wp_base(ip_data), HDMI_WP_VIDEO_CFG, r); |
702 | } | 694 | } |
703 | 695 | ||
@@ -725,15 +717,13 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data) | |||
725 | /* HDMI */ | 717 | /* HDMI */ |
726 | struct omap_video_timings video_timing; | 718 | struct omap_video_timings video_timing; |
727 | struct hdmi_video_format video_format; | 719 | struct hdmi_video_format video_format; |
728 | struct hdmi_video_interface video_interface; | ||
729 | /* HDMI core */ | 720 | /* HDMI core */ |
730 | struct hdmi_core_infoframe_avi avi_cfg; | 721 | struct hdmi_core_infoframe_avi avi_cfg; |
731 | struct hdmi_core_video_config v_core_cfg; | 722 | struct hdmi_core_video_config v_core_cfg; |
732 | struct hdmi_core_packet_enable_repeat repeat_cfg; | 723 | struct hdmi_core_packet_enable_repeat repeat_cfg; |
733 | struct hdmi_config *cfg = &ip_data->cfg; | 724 | struct hdmi_config *cfg = &ip_data->cfg; |
734 | 725 | ||
735 | hdmi_wp_init(&video_timing, &video_format, | 726 | hdmi_wp_init(&video_timing, &video_format); |
736 | &video_interface); | ||
737 | 727 | ||
738 | hdmi_core_init(&v_core_cfg, | 728 | hdmi_core_init(&v_core_cfg, |
739 | &avi_cfg, | 729 | &avi_cfg, |
@@ -748,12 +738,7 @@ void ti_hdmi_4xxx_basic_configure(struct hdmi_ip_data *ip_data) | |||
748 | 738 | ||
749 | hdmi_wp_video_config_format(ip_data, &video_format); | 739 | hdmi_wp_video_config_format(ip_data, &video_format); |
750 | 740 | ||
751 | video_interface.vsp = cfg->timings.vsync_pol; | 741 | hdmi_wp_video_config_interface(ip_data); |
752 | video_interface.hsp = cfg->timings.hsync_pol; | ||
753 | video_interface.interlacing = cfg->interlace; | ||
754 | video_interface.tm = 1 ; /* HDMI_TIMING_MASTER_24BIT */ | ||
755 | |||
756 | hdmi_wp_video_config_interface(ip_data, &video_interface); | ||
757 | 742 | ||
758 | /* | 743 | /* |
759 | * configure core video part | 744 | * configure core video part |
diff --git a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h index a442998980f1..004b4182bddd 100644 --- a/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h +++ b/drivers/video/omap2/dss/ti_hdmi_4xxx_ip.h | |||
@@ -517,13 +517,6 @@ struct hdmi_video_format { | |||
517 | u32 x_res; /* pixel per line */ | 517 | u32 x_res; /* pixel per line */ |
518 | }; | 518 | }; |
519 | 519 | ||
520 | struct hdmi_video_interface { | ||
521 | int vsp; /* Vsync polarity */ | ||
522 | int hsp; /* Hsync polarity */ | ||
523 | int interlacing; | ||
524 | int tm; /* Timing mode */ | ||
525 | }; | ||
526 | |||
527 | struct hdmi_audio_format { | 520 | struct hdmi_audio_format { |
528 | enum hdmi_stereo_channels stereo_channels; | 521 | enum hdmi_stereo_channels stereo_channels; |
529 | u8 active_chnnls_msk; | 522 | u8 active_chnnls_msk; |