From 41257a281a22d1daa919efe3909af5edbb4a975e Mon Sep 17 00:00:00 2001 From: Robert Chiras Date: Tue, 17 Apr 2018 10:56:41 +0300 Subject: [PATCH] MLK-17589: gpu/imx: Fix DCSS+DSI suspend/resume Since the DCSS is not fully powered off when a suspend/blank occurs, the next time we resume/unblank, the DCSS->DSI pipeline cannot be fully re-initialized. In order to fix this issue, we should also not completely power off the DSI too. Just configure it to stop transmitting, by powering off the PHY. Signed-off-by: Robert Chiras --- drivers/gpu/drm/bridge/nwl-dsi.c | 1 - drivers/gpu/drm/imx/nwl_dsi-imx.c | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index a7d9e9c41588..5ed93df85d64 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -1080,7 +1080,6 @@ static void nwl_dsi_bridge_disable(struct drm_bridge *bridge) phy_power_off(dsi->phy); phy_exit(dsi->phy); - nwl_dsi_disable_clocks(dsi, CLK_PHY_REF | CLK_TX_ESC); devm_free_irq(dev, dsi->irq, dsi); dsi->enabled = false; diff --git a/drivers/gpu/drm/imx/nwl_dsi-imx.c b/drivers/gpu/drm/imx/nwl_dsi-imx.c index e97b17431332..95d2570b4517 100644 --- a/drivers/gpu/drm/imx/nwl_dsi-imx.c +++ b/drivers/gpu/drm/imx/nwl_dsi-imx.c @@ -39,6 +39,7 @@ #include "imx-drm.h" #define DRIVER_NAME "nwl_dsi-imx" +#define NO_CLK_RESET /* 8MQ SRC specific registers */ #define SRC_MIPIPHY_RCR 0x28 @@ -450,6 +451,7 @@ static int imx8mq_dsi_poweron(struct imx_mipi_dsi *dsi) static int imx8mq_dsi_poweroff(struct imx_mipi_dsi *dsi) { +#ifndef NO_CLK_RESET regmap_update_bits(dsi->reset, SRC_MIPIPHY_RCR, PCLK_RESET_N, 0); regmap_update_bits(dsi->reset, SRC_MIPIPHY_RCR, @@ -458,6 +460,7 @@ static int imx8mq_dsi_poweroff(struct imx_mipi_dsi *dsi) RESET_BYTE_N, 0); regmap_update_bits(dsi->reset, SRC_MIPIPHY_RCR, DPI_RESET_N, 0); +#endif return 0; } -- 2.17.1