public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Harigovindan P <harigovi@codeaurora.org>,
	Rob Clark <robdclark@chromium.org>,
	Sasha Levin <sashal@kernel.org>,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org
Subject: [PATCH AUTOSEL 4.14 09/22] drm/msm/dsi: save pll state before dsi host is powered off
Date: Mon,  2 Mar 2020 21:49:20 -0500	[thread overview]
Message-ID: <20200303024933.10371-9-sashal@kernel.org> (raw)
In-Reply-To: <20200303024933.10371-1-sashal@kernel.org>

From: Harigovindan P <harigovi@codeaurora.org>

[ Upstream commit a1028dcfd0dd97884072288d0c8ed7f30399b528 ]

Save pll state before dsi host is powered off. Without this change
some register values gets resetted.

Signed-off-by: Harigovindan P <harigovi@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 5 +++++
 drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 4 ----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 7d46399a39b4d..9fbfa9f94e6ce 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -543,6 +543,7 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
 	struct msm_dsi *msm_dsi1 = dsi_mgr_get_dsi(DSI_1);
 	struct mipi_dsi_host *host = msm_dsi->host;
 	struct drm_panel *panel = msm_dsi->panel;
+	struct msm_dsi_pll *src_pll;
 	bool is_dual_dsi = IS_DUAL_DSI();
 	int ret;
 
@@ -583,6 +584,10 @@ static void dsi_mgr_bridge_post_disable(struct drm_bridge *bridge)
 								id, ret);
 	}
 
+	/* Save PLL status if it is a clock source */
+	src_pll = msm_dsi_phy_get_pll(msm_dsi->phy);
+	msm_dsi_pll_save_state(src_pll);
+
 	ret = msm_dsi_host_power_off(host);
 	if (ret)
 		pr_err("%s: host %d power off failed,%d\n", __func__, id, ret);
diff --git a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
index 7c9bf91bc22b6..c0a7fa56d9a74 100644
--- a/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
+++ b/drivers/gpu/drm/msm/dsi/phy/dsi_phy.c
@@ -613,10 +613,6 @@ void msm_dsi_phy_disable(struct msm_dsi_phy *phy)
 	if (!phy || !phy->cfg->ops.disable)
 		return;
 
-	/* Save PLL status if it is a clock source */
-	if (phy->usecase != MSM_DSI_PHY_SLAVE)
-		msm_dsi_pll_save_state(phy->pll);
-
 	phy->cfg->ops.disable(phy);
 
 	dsi_phy_regulator_disable(phy);
-- 
2.20.1


  parent reply	other threads:[~2020-03-03  2:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-03  2:49 [PATCH AUTOSEL 4.14 01/22] usb: charger: assign specific number for enum value Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 02/22] serial: ar933x_uart: set UART_CS_{RX,TX}_READY_ORIDE Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 03/22] selftests: fix too long argument Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 04/22] usb: gadget: composite: Support more than 500mA MaxPower Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 05/22] usb: gadget: ffs: ffs_aio_cancel(): Save/restore IRQ flags Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 06/22] usb: gadget: serial: fix Tx stall after buffer overflow Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 07/22] drm/msm/mdp5: rate limit pp done timeout warnings Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 08/22] drm: msm: Fix return type of dsi_mgr_connector_mode_valid for kCFI Sasha Levin
2020-03-03  2:49 ` Sasha Levin [this message]
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 10/22] net: atlantic: fix potential error handling Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 11/22] net: phy: restore mdio regs in the iproc mdio driver Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 12/22] net: ks8851-ml: Remove 8-bit bus accessors Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 13/22] net: ks8851-ml: Fix 16-bit data access Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 14/22] net: ks8851-ml: Fix 16-bit IO operation Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 15/22] watchdog: da9062: do not ping the hw during stop() Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 16/22] s390/cio: cio_ignore_proc_seq_next should increase position index Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 17/22] nvme-pci: Use single IRQ vector for old Apple models Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 18/22] x86/boot/compressed: Don't declare __force_order in kaslr_64.c Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 19/22] nvme: Fix uninitialized-variable warning Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 20/22] nfc: pn544: Fix occasional HW initialization failure Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 21/22] x86/xen: Distribute switch variables for initialization Sasha Levin
2020-03-03  2:49 ` [PATCH AUTOSEL 4.14 22/22] net: thunderx: workaround BGX TX Underflow issue Sasha Levin

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=20200303024933.10371-9-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=harigovi@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robdclark@chromium.org \
    --cc=stable@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox