drm/msm/dsi: initialize postdiv_lock before use for 10nm pll
authorRajesh Yadav <ryadav@codeaurora.org>
Mon, 25 Jun 2018 13:42:03 +0000 (19:12 +0530)
committerSean Paul <seanpaul@chromium.org>
Thu, 26 Jul 2018 14:40:14 +0000 (10:40 -0400)
postdiv_lock spinlock was used before initialization
for 10nm pll. It causes following spin_bug:
"BUG: spinlock bad magic on CPU#0".
Initialize spinlock before its usage.

Changes in v3:
- Added Archit's R-b

Reviewed-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rajesh Yadav <ryadav@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c

index c4c37a7df637fe326d7a14ec99ac1c57b2e8078c..4c03f0b7343ed655c60111be4d09249bde463b28 100644 (file)
@@ -798,6 +798,8 @@ struct msm_dsi_pll *msm_dsi_pll_10nm_init(struct platform_device *pdev, int id)
                return ERR_PTR(-ENOMEM);
        }
 
+       spin_lock_init(&pll_10nm->postdiv_lock);
+
        pll = &pll_10nm->base;
        pll->min_rate = 1000000000UL;
        pll->max_rate = 3500000000UL;