LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File 0022-drm-tegra-Revert-dsi-runtime-pm.patch of Package drm (Project home:tiwai:bnc1050256)

From: Takashi Iwai <tiwai@suse.de>
Subject: drm/tegra: Revert dsi runtime pm

A partial revert of the commit 87904c3e82319cf2bad8d656d79c5030dab9490e.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

---
 drivers/gpu/drm/tegra/dsi.c |   43 +++++++------------------------------------
 1 file changed, 7 insertions(+), 36 deletions(-)

--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -840,21 +840,6 @@ static const struct drm_encoder_funcs te
 	.destroy = tegra_output_encoder_destroy,
 };
 
-static void tegra_dsi_unprepare(struct tegra_dsi *dsi)
-{
-	int err;
-
-	if (dsi->slave)
-		tegra_dsi_unprepare(dsi->slave);
-
-	err = tegra_mipi_disable(dsi->mipi);
-	if (err < 0)
-		dev_err(dsi->dev, "failed to disable MIPI calibration: %d\n",
-			err);
-
-	pm_runtime_put(dsi->dev);
-}
-
 static void tegra_dsi_encoder_disable(struct drm_encoder *encoder)
 {
 	struct tegra_output *output = encoder_to_output(encoder);
@@ -891,26 +876,7 @@ static void tegra_dsi_encoder_disable(st
 
 	tegra_dsi_disable(dsi);
 
-	tegra_dsi_unprepare(dsi);
-}
-
-static void tegra_dsi_prepare(struct tegra_dsi *dsi)
-{
-	int err;
-
-	pm_runtime_get_sync(dsi->dev);
-
-	err = tegra_mipi_enable(dsi->mipi);
-	if (err < 0)
-		dev_err(dsi->dev, "failed to enable MIPI calibration: %d\n",
-			err);
-
-	err = tegra_dsi_pad_calibrate(dsi);
-	if (err < 0)
-		dev_err(dsi->dev, "MIPI calibration failed: %d\n", err);
-
-	if (dsi->slave)
-		tegra_dsi_prepare(dsi->slave);
+	pm_runtime_put(dsi->dev);
 }
 
 static void tegra_dsi_encoder_enable(struct drm_encoder *encoder)
@@ -921,8 +887,13 @@ static void tegra_dsi_encoder_enable(str
 	struct tegra_dsi *dsi = to_dsi(output);
 	struct tegra_dsi_state *state;
 	u32 value;
+	int err;
+
+	pm_runtime_get_sync(dsi->dev);
 
-	tegra_dsi_prepare(dsi);
+	err = tegra_dsi_pad_calibrate(dsi);
+	if (err < 0)
+		dev_err(dsi->dev, "MIPI calibration failed: %d\n", err);
 
 	state = tegra_dsi_get_state(dsi);