All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ricardo Neri <ricardo.neri@ti.com>
To: tomi.valkeinen@ti.com
Cc: archit@ti.com, s-guiriec@ti.com, linux-omap@vger.kernel.org,
	Ricardo Neri <ricardo.neri@ti.com>
Subject: [PATCH 2/2] OMAPDSS:HDMI: Improve error handling at power on
Date: Fri, 27 Jul 2012 19:21:37 -0500	[thread overview]
Message-ID: <1343434897-8444-3-git-send-email-ricardo.neri@ti.com> (raw)
In-Reply-To: <1343434897-8444-1-git-send-email-ricardo.neri@ti.com>

Handle the errors that may occur when selecting the source of the
sync signal for the DIGIT channel of the display controller and
when enabling the PHY.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
---
 drivers/video/omap2/dss/hdmi.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/video/omap2/dss/hdmi.c b/drivers/video/omap2/dss/hdmi.c
index 060216f..3caac2a 100644
--- a/drivers/video/omap2/dss/hdmi.c
+++ b/drivers/video/omap2/dss/hdmi.c
@@ -501,13 +501,17 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
 	r = hdmi.ip_data.ops->phy_enable(&hdmi.ip_data);
 	if (r) {
 		DSSDBG("Failed to start PHY\n");
-		goto err;
+		goto err_phy_enable;
 	}
 
 	hdmi.ip_data.ops->video_configure(&hdmi.ip_data);
 
 	/* Make selection of HDMI in DSS */
-	dss_select_hdmi_venc_clk_source(DSS_HDMI_M_PCLK);
+	r = dss_select_hdmi_venc_clk_source(DSS_HDMI_M_PCLK);
+	if (r) {
+		DSSDBG("Failed to start PHY\n");
+		goto err_src_hdmi_venc;
+	}
 
 	/* Select the dispc clock source as PRCM clock, to ensure that it is not
 	 * DSI PLL source as the clock selected by DSI PLL might not be
@@ -536,7 +540,9 @@ static int hdmi_power_on(struct omap_dss_device *dssdev)
 err_mgr_enable:
 	hdmi.ip_data.ops->video_disable(&hdmi.ip_data);
 err_vid_enable:
+err_src_hdmi_venc:
 	hdmi.ip_data.ops->phy_disable(&hdmi.ip_data);
+err_phy_enable:
 	hdmi.ip_data.ops->pll_disable(&hdmi.ip_data);
 err:
 	hdmi_runtime_put();
-- 
1.7.5.4


  parent reply	other threads:[~2012-07-28  0:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-28  0:21 [PATCH 0/2] OMAPDSS: DISPC: Improvements to DIGIT sync signal selection Ricardo Neri
2012-07-28  0:21 ` [PATCH 1/2] OMAPDSS: DISPC: Improve logic of selection of external sync signal Ricardo Neri
2012-07-28  0:21 ` Ricardo Neri [this message]
2012-07-30 11:11 ` [PATCH 0/2] OMAPDSS: DISPC: Improvements to DIGIT sync signal selection Tomi Valkeinen
2012-07-30 11:48   ` Archit Taneja
2012-07-30 19:21     ` Ricardo Neri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1343434897-8444-3-git-send-email-ricardo.neri@ti.com \
    --to=ricardo.neri@ti.com \
    --cc=archit@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=s-guiriec@ti.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.