aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/hdmi.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-10-08 04:46:05 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-10-09 05:42:15 -0400
commit425f02fdee32ec0b6ae36067abe9586149120163 (patch)
tree6a9fc590edc7d1463220e69b6c6296f83b94d5b4 /drivers/video/omap2/dss/hdmi.c
parent5cac5aee18568579931267d3211371a176efa476 (diff)
omapdss: HDMI: Use OMAP4 HDMI core functions directly and remove hdmi_ip_ops
After removing wrapper, pll and phy funcs from ti_hdmi_4xxx_ip.c, we are left with OMAP4 HDMI core functions. Use these directly in hdmi.c rather than using hdmi_ip_ops. Rename the core functions with a 'hdmi4' suffix. We used to have hdmi_ip_ops so that one could support HDMI within a TI SoC which had a non-DSS display subsytem. This however never got put into use, and hence these ops aren't useful any more. The DT/hwmod information for hdmi doesn't split the address space according to the required sub blocks. Keep the address offset and size information in the driver for now. This will be removed when the driver gets the information correctly from DT/hwmod. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/hdmi.c')
-rw-r--r--drivers/video/omap2/dss/hdmi.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index f7e2ac6861b6..0e9ecd691c5c 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -37,12 +37,10 @@
37#include <video/omapdss.h> 37#include <video/omapdss.h>
38 38
39#include "ti_hdmi.h" 39#include "ti_hdmi.h"
40#include "ti_hdmi_4xxx_ip.h"
40#include "dss.h" 41#include "dss.h"
41#include "dss_features.h" 42#include "dss_features.h"
42 43
43#define HDMI_CORE_SYS 0x400
44#define HDMI_CORE_AV 0x900
45
46/* HDMI EDID Length move this */ 44/* HDMI EDID Length move this */
47#define HDMI_EDID_MAX_LENGTH 256 45#define HDMI_EDID_MAX_LENGTH 256
48#define EDID_TIMING_DESCRIPTOR_SIZE 0x12 46#define EDID_TIMING_DESCRIPTOR_SIZE 0x12
@@ -493,7 +491,8 @@ static int hdmi_power_on_full(struct omap_dss_device *dssdev)
493 goto err_phy_enable; 491 goto err_phy_enable;
494 } 492 }
495 493
496 hdmi.ip_data.ops->video_configure(&hdmi.ip_data); 494 hdmi4_configure(&hdmi.ip_data.core, &hdmi.ip_data.wp,
495 &hdmi.ip_data.cfg);
497 496
498 /* bypass TV gamma table */ 497 /* bypass TV gamma table */
499 dispc_enable_gamma_table(0); 498 dispc_enable_gamma_table(0);
@@ -594,7 +593,7 @@ static void hdmi_dump_regs(struct seq_file *s)
594 hdmi_wp_dump(&hdmi.ip_data.wp, s); 593 hdmi_wp_dump(&hdmi.ip_data.wp, s);
595 hdmi_pll_dump(&hdmi.ip_data.pll, s); 594 hdmi_pll_dump(&hdmi.ip_data.pll, s);
596 hdmi_phy_dump(&hdmi.ip_data.phy, s); 595 hdmi_phy_dump(&hdmi.ip_data.phy, s);
597 hdmi.ip_data.ops->dump_core(&hdmi.ip_data, s); 596 hdmi4_core_dump(&hdmi.ip_data.core, s);
598 597
599 hdmi_runtime_put(); 598 hdmi_runtime_put();
600 mutex_unlock(&hdmi.lock); 599 mutex_unlock(&hdmi.lock);
@@ -609,7 +608,7 @@ static int read_edid(u8 *buf, int len)
609 r = hdmi_runtime_get(); 608 r = hdmi_runtime_get();
610 BUG_ON(r); 609 BUG_ON(r);
611 610
612 r = hdmi.ip_data.ops->read_edid(&hdmi.ip_data, buf, len); 611 r = hdmi4_read_edid(&hdmi.ip_data.core, buf, len);
613 612
614 hdmi_runtime_put(); 613 hdmi_runtime_put();
615 mutex_unlock(&hdmi.lock); 614 mutex_unlock(&hdmi.lock);
@@ -813,7 +812,6 @@ static bool hdmi_mode_has_audio(void)
813 else 812 else
814 return false; 813 return false;
815} 814}
816
817#endif 815#endif
818 816
819static int hdmi_connect(struct omap_dss_device *dssdev, 817static int hdmi_connect(struct omap_dss_device *dssdev,
@@ -822,8 +820,6 @@ static int hdmi_connect(struct omap_dss_device *dssdev,
822 struct omap_overlay_manager *mgr; 820 struct omap_overlay_manager *mgr;
823 int r; 821 int r;
824 822
825 dss_init_hdmi_ip_ops(&hdmi.ip_data, omapdss_get_version());
826
827 r = hdmi_init_regulator(); 823 r = hdmi_init_regulator();
828 if (r) 824 if (r)
829 return r; 825 return r;
@@ -914,12 +910,12 @@ static void hdmi_audio_disable(struct omap_dss_device *dssdev)
914 910
915static int hdmi_audio_start(struct omap_dss_device *dssdev) 911static int hdmi_audio_start(struct omap_dss_device *dssdev)
916{ 912{
917 return hdmi.ip_data.ops->audio_start(&hdmi.ip_data); 913 return hdmi4_audio_start(&hdmi.ip_data.core, &hdmi.ip_data.wp);
918} 914}
919 915
920static void hdmi_audio_stop(struct omap_dss_device *dssdev) 916static void hdmi_audio_stop(struct omap_dss_device *dssdev)
921{ 917{
922 hdmi.ip_data.ops->audio_stop(&hdmi.ip_data); 918 hdmi4_audio_stop(&hdmi.ip_data.core, &hdmi.ip_data.wp);
923} 919}
924 920
925static bool hdmi_audio_supported(struct omap_dss_device *dssdev) 921static bool hdmi_audio_supported(struct omap_dss_device *dssdev)
@@ -946,7 +942,7 @@ static int hdmi_audio_config(struct omap_dss_device *dssdev,
946 goto err; 942 goto err;
947 } 943 }
948 944
949 r = hdmi.ip_data.ops->audio_config(&hdmi.ip_data, audio); 945 r = hdmi4_audio_config(&hdmi.ip_data.core, &hdmi.ip_data.wp, audio);
950 if (r) 946 if (r)
951 goto err; 947 goto err;
952 948
@@ -1053,6 +1049,10 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev)
1053 if (r) 1049 if (r)
1054 return r; 1050 return r;
1055 1051
1052 r = hdmi4_core_init(pdev, &hdmi.ip_data.core);
1053 if (r)
1054 return r;
1055
1056 r = hdmi_get_clocks(pdev); 1056 r = hdmi_get_clocks(pdev);
1057 if (r) { 1057 if (r) {
1058 DSSERR("can't get clocks\n"); 1058 DSSERR("can't get clocks\n");
@@ -1061,9 +1061,6 @@ static int omapdss_hdmihw_probe(struct platform_device *pdev)
1061 1061
1062 pm_runtime_enable(&pdev->dev); 1062 pm_runtime_enable(&pdev->dev);
1063 1063
1064 hdmi.ip_data.core_sys_offset = HDMI_CORE_SYS;
1065 hdmi.ip_data.core_av_offset = HDMI_CORE_AV;
1066
1067 hdmi_init_output(pdev); 1064 hdmi_init_output(pdev);
1068 1065
1069 dss_debugfs_create_file("hdmi", hdmi_dump_regs); 1066 dss_debugfs_create_file("hdmi", hdmi_dump_regs);