]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
video: tegra: dsi: do not restore invalid state
authorDaniel Solomon <daniels@nvidia.com>
Mon, 8 Jun 2015 23:46:07 +0000 (16:46 -0700)
committermobile promotions <svcmobile_promotions@nvidia.com>
Wed, 10 Jun 2015 19:17:02 +0000 (12:17 -0700)
Failure in preparing host for tranmission implies
that HS/LP transition didn't happen or failed. In this
case, initial state won't exist, but we try to use it
anyway. This change avoids doing this, instead just
forwarding the error to the caller.

Also add a missing error check.

Bug 1644102

Change-Id: I038e5ba28813cce2fc4e439d7fffcf8f3e65b4ef
Signed-off-by: Daniel Solomon <daniels@nvidia.com>
Reviewed-on: http://git-master/r/754741
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/video/tegra/dc/dsi.c

index f626c1fcde989c7725148f77f8c6c1d5bc1e093a..2ad51550cd981b4d7da56d1e3cc9ab32b61ac81a 100644 (file)
@@ -3394,12 +3394,16 @@ static int tegra_dsi_write_data_nosync(struct tegra_dc *dc,
        }
 
        err = _tegra_dsi_write_data(dsi, cmd);
+       if (err < 0)
+               dev_err(&dc->ndev->dev, "Failed DSI write\n");
+
        mdelay(delay_ms);
-fail:
+
        err = tegra_dsi_restore_state(dc, dsi, init_status);
        if (err < 0)
                dev_err(&dc->ndev->dev, "Failed to restore prev state\n");
 
+fail:
        return err;
 }