aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <architt@codeaurora.org>2018-02-12 01:31:07 -0500
committerRob Clark <robdclark@gmail.com>2018-02-20 10:41:22 -0500
commitfb48989edb628342af0fad478174ae30b2e1e23a (patch)
tree2863933fa68cadae2d78e7c95df9b272f4491ab4
parent9de43e79c10149d29c77ff2c3dae048d1db9cbce (diff)
drm/msm/dsi: Get byte_intf_clk only for versions that need it
Newer DSI host controllers (SDM845 in particular) require a new clock called byte_intf_clk. A recent patch tried to add this as an optional clock, but it still set 'ret' to an error number if it didn't find it. This breaks the host's probe for all previous DSI host versions. Instead of setting this up as an optional clock, try to get the clock only for the DSI version that supports it. Fixes: 56558fb ("drm/msm/dsi: Add byte_intf_clk") Signed-off-by: Archit Taneja <architt@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--drivers/gpu/drm/msm/dsi/dsi_host.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index f675975c2655..62ac614eccf9 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -378,11 +378,16 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host)
378 goto exit; 378 goto exit;
379 } 379 }
380 380
381 msm_host->byte_intf_clk = msm_clk_get(pdev, "byte_intf"); 381 if (cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
382 if (IS_ERR(msm_host->byte_intf_clk)) { 382 cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_2_1) {
383 ret = PTR_ERR(msm_host->byte_intf_clk); 383 msm_host->byte_intf_clk = msm_clk_get(pdev, "byte_intf");
384 pr_debug("%s: can't find byte_intf clock. ret=%d\n", 384 if (IS_ERR(msm_host->byte_intf_clk)) {
385 __func__, ret); 385 ret = PTR_ERR(msm_host->byte_intf_clk);
386 pr_err("%s: can't find byte_intf clock. ret=%d\n",
387 __func__, ret);
388 goto exit;
389 }
390 } else {
386 msm_host->byte_intf_clk = NULL; 391 msm_host->byte_intf_clk = NULL;
387 } 392 }
388 393