aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-09-07 08:26:20 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-26 07:58:36 -0400
commitcea87b92da825f24efd11112d414f6c8cdd4ced8 (patch)
tree16ccbdce51a02262c478eaa8be489a7ad75aac33 /drivers/video/omap2
parent8f1f736c4521ac709d4c5805fa31d395804b162a (diff)
OMAPDSS: HDMI: Replace dssdev->manager with dssdev->output->manager references
With addition of output entities, a device connects to an output, and an output connects to overlay manager. Replace the dssdev->manager references with dssdev->output->manager to access the manager correctly. When enabling the HDMI output, check whether the output entity connected to display is not NULL. Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/hdmi.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 294bf9879434..a48a7dd75b33 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -504,6 +504,7 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
504{ 504{
505 int r; 505 int r;
506 struct omap_video_timings *p; 506 struct omap_video_timings *p;
507 struct omap_overlay_manager *mgr = dssdev->output->manager;
507 unsigned long phy; 508 unsigned long phy;
508 509
509 gpio_set_value(hdmi.ct_cp_hpd_gpio, 1); 510 gpio_set_value(hdmi.ct_cp_hpd_gpio, 1);
@@ -520,7 +521,7 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
520 if (r) 521 if (r)
521 goto err_runtime_get; 522 goto err_runtime_get;
522 523
523 dss_mgr_disable(dssdev->manager); 524 dss_mgr_disable(mgr);
524 525
525 p = &hdmi.ip_data.cfg.timings; 526 p = &hdmi.ip_data.cfg.timings;
526 527
@@ -562,13 +563,13 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
562 dispc_enable_gamma_table(0); 563 dispc_enable_gamma_table(0);
563 564
564 /* tv size */ 565 /* tv size */
565 dss_mgr_set_timings(dssdev->manager, p); 566 dss_mgr_set_timings(mgr, p);
566 567
567 r = hdmi.ip_data.ops->video_enable(&hdmi.ip_data); 568 r = hdmi.ip_data.ops->video_enable(&hdmi.ip_data);
568 if (r) 569 if (r)
569 goto err_vid_enable; 570 goto err_vid_enable;
570 571
571 r = dss_mgr_enable(dssdev->manager); 572 r = dss_mgr_enable(mgr);
572 if (r) 573 if (r)
573 goto err_mgr_enable; 574 goto err_mgr_enable;
574 575
@@ -592,7 +593,9 @@ err_vdac_enable:
592 593
593static void hdmi_power_off(struct omap_dss_device *dssdev) 594static void hdmi_power_off(struct omap_dss_device *dssdev)
594{ 595{
595 dss_mgr_disable(dssdev->manager); 596 struct omap_overlay_manager *mgr = dssdev->output->manager;
597
598 dss_mgr_disable(mgr);
596 599
597 hdmi.ip_data.ops->video_disable(&hdmi.ip_data); 600 hdmi.ip_data.ops->video_disable(&hdmi.ip_data);
598 hdmi.ip_data.ops->phy_disable(&hdmi.ip_data); 601 hdmi.ip_data.ops->phy_disable(&hdmi.ip_data);
@@ -689,14 +692,15 @@ bool omapdss_hdmi_detect(void)
689 692
690int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev) 693int omapdss_hdmi_display_enable(struct omap_dss_device *dssdev)
691{ 694{
695 struct omap_dss_output *out = dssdev->output;
692 int r = 0; 696 int r = 0;
693 697
694 DSSDBG("ENTER hdmi_display_enable\n"); 698 DSSDBG("ENTER hdmi_display_enable\n");
695 699
696 mutex_lock(&hdmi.lock); 700 mutex_lock(&hdmi.lock);
697 701
698 if (dssdev->manager == NULL) { 702 if (out == NULL || out->manager == NULL) {
699 DSSERR("failed to enable display: no manager\n"); 703 DSSERR("failed to enable display: no output/manager\n");
700 r = -ENODEV; 704 r = -ENODEV;
701 goto err0; 705 goto err0;
702 } 706 }