diff mbox

[07/21] drm/msm/dsi: initialize postdiv_lock before use for 10nm pll

Message ID 20180709173200.238457-8-seanpaul@chromium.org (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show

Commit Message

Sean Paul July 9, 2018, 5:31 p.m. UTC
From: Rajesh Yadav <ryadav@codeaurora.org>

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.

Signed-off-by: Rajesh Yadav <ryadav@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
 drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Archit Taneja July 16, 2018, 2:28 p.m. UTC | #1
On Monday 09 July 2018 11:01 PM, Sean Paul wrote:
> From: Rajesh Yadav <ryadav@codeaurora.org>
> 
> 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.

Reviewed-by: Archit Taneja <architt@codeaurora.org>

> 
> Signed-off-by: Rajesh Yadav <ryadav@codeaurora.org>
> Signed-off-by: Sean Paul <seanpaul@chromium.org>
> ---
>   drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
> index c4c37a7df637..4c03f0b7343e 100644
> --- a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
> +++ b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
> @@ -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;
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
index c4c37a7df637..4c03f0b7343e 100644
--- a/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
+++ b/drivers/gpu/drm/msm/dsi/pll/dsi_pll_10nm.c
@@ -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;