summaryrefslogtreecommitdiffstats
path: root/drivers/video/tegra/dc/dp.c
diff options
context:
space:
mode:
authorSungwook Kim <sungwookk@nvidia.com>2015-03-05 18:29:31 -0500
committerDan Willemsen <dwillemsen@nvidia.com>2015-04-04 21:58:07 -0400
commit1fb3459cf586080ae096677e92d5d4ed2d8b44d4 (patch)
treef66e77fba6c4263318bba0bec452fa7f7548bf9f /drivers/video/tegra/dc/dp.c
parent63b486a6a59a2485b027e58266030bef1d7a18f5 (diff)
video: Tegra: DP: fix unbal enable_irq at resume
To fix the "unbalanced enable for IRQ" stack dump when resuming from the LP0 suspend with no DP panel/monitor connected to the system. It happens when the number of disable_irq() calling and enable_irq() calling do not match. Also, this fix will update the connection status to recognize the unplugging of DP panel/monitor during the suspend. The stack dump takes 220mSec. This fix may help to reduce the LP0 suspend resuming time. bug 200034625 bug 200051954 bug 200070123 DEPENDS ON: <None> Change-Id: I4cb9efe8c19ba46b94881c6a287db2f261b26937 Signed-off-by: Sungwook Kim <sungwookk@nvidia.com> Reviewed-on: http://git-master/r/714561 Reviewed-by: Bob Johnston <bjohnston@nvidia.com> Reviewed-by: Animesh Kishore <ankishore@nvidia.com> Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dp.c')
-rw-r--r--drivers/video/tegra/dc/dp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/video/tegra/dc/dp.c b/drivers/video/tegra/dc/dp.c
index ab767306d..b7cfa8001 100644
--- a/drivers/video/tegra/dc/dp.c
+++ b/drivers/video/tegra/dc/dp.c
@@ -2419,6 +2419,7 @@ static void tegra_dc_dp_enable(struct tegra_dc *dc)
2419 if (tegra_dp_hpd_plug(dp) < 0) { 2419 if (tegra_dp_hpd_plug(dp) < 0) {
2420 dev_info(&dc->ndev->dev, 2420 dev_info(&dc->ndev->dev,
2421 "dp: no panel/monitor plugged\n"); 2421 "dp: no panel/monitor plugged\n");
2422 dc->connected = false; /* unplugged during suspend */
2422 goto error_enable; 2423 goto error_enable;
2423 } 2424 }
2424 } 2425 }
@@ -2495,18 +2496,19 @@ static void tegra_dc_dp_disable(struct tegra_dc *dc)
2495{ 2496{
2496 struct tegra_dc_dp_data *dp = tegra_dc_get_outdata(dc); 2497 struct tegra_dc_dp_data *dp = tegra_dc_get_outdata(dc);
2497 2498
2498 if (!dp->enabled)
2499 return;
2500
2501 cancel_work_sync(&dp->lt_work);
2502
2503 tegra_dc_io_start(dc); 2499 tegra_dc_io_start(dc);
2504 2500
2505 tegra_dp_default_int(dp, false); 2501 tegra_dp_default_int(dp, false);
2502 cancel_work_sync(&dp->lt_work);
2506 2503
2507 if (dp->dc->out->type != TEGRA_DC_OUT_FAKE_DP) 2504 if (dp->dc->out->type != TEGRA_DC_OUT_FAKE_DP)
2508 tegra_dp_disable_irq(dp->irq); 2505 tegra_dp_disable_irq(dp->irq);
2509 2506
2507 if (!dp->enabled) {
2508 tegra_dc_io_end(dc);
2509 return;
2510 }
2511
2510 tegra_dpaux_pad_power(dp->dc, 2512 tegra_dpaux_pad_power(dp->dc,
2511 dp->dc->ndev->id == 0 ? TEGRA_DPAUX_INSTANCE_0 : TEGRA_DPAUX_INSTANCE_1 2513 dp->dc->ndev->id == 0 ? TEGRA_DPAUX_INSTANCE_0 : TEGRA_DPAUX_INSTANCE_1
2512 , false); 2514 , false);