From patchwork Fri Jul 20 20:42:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10538305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0CE026029B for ; Fri, 20 Jul 2018 20:44:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF40B28E92 for ; Fri, 20 Jul 2018 20:44:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E2B1A28ECC; Fri, 20 Jul 2018 20:44:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9652B28E92 for ; Fri, 20 Jul 2018 20:44:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 000CF6E7CF; Fri, 20 Jul 2018 20:44:20 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw0-x243.google.com (mail-yw0-x243.google.com [IPv6:2607:f8b0:4002:c05::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id D96446E8A6 for ; Fri, 20 Jul 2018 20:44:19 +0000 (UTC) Received: by mail-yw0-x243.google.com with SMTP id y203-v6so4810954ywd.9 for ; Fri, 20 Jul 2018 13:44:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Lbo43kpGXAgJ6MybSsdaqG4YKugBgvmXS2Wm/aCnZ6k=; b=LQhw2Wis8LOLkEXgRbns6kbvEaq+5BiE/zcKTEL9cgYPF0RckiUnFE3LmB3qTS+iUm ogbyKsO0PSzUGQlEeZBBzG1BqJIvvwrkg/WIFMwL8PX1m/c7KeY7kdl6CetH/CtOvwNv h3Dw3ZqhcUdzDJaP3c72YTJFQOTJgFtRP4owklceF/Yik7Sgo61e2ffySGZZs8NBNg2R dGpxYsVNDqpOE9ZScFw9JOz/QXJKNkrlrRKJZN03DiVMtAjYAb29s+vQuMYPrBuSqI02 h9TfsXvZtcM3oynTq+dwL2dE92Fmd7Ajh5waidSxPIvm3ySxPTJYbBxTBuladI0NY1F+ FrQg== X-Gm-Message-State: AOUpUlE76WzFFLnvF94QiU5jDwJ3mLHg95TBRrO2zn9GbgTg50jEXYdX CTuQc/p4rCefwcB/V9fJAZ4HNA== X-Google-Smtp-Source: AAOMgpfcnejF+P8tFO4ONEzcpvwOitVJOMvAlW18K5/gjbzgKHc9RmSgIPNOeRSd0Q8WK7EBxA33sg== X-Received: by 2002:a0d:e742:: with SMTP id q63-v6mr1808919ywe.432.1532119459170; Fri, 20 Jul 2018 13:44:19 -0700 (PDT) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id a2-v6sm2453831ywm.7.2018.07.20.13.44.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 13:44:18 -0700 (PDT) From: Sean Paul To: abhinavk@codeaurora.org, architt@codeaurora.org, chandanu@codeaurora.org, jsanka@codeaurora.org, jcrouse@codeaurora.org, ryadav@codeaurora.org, seanpaul@chromium.org, skolluku@codeaurora.org, dri-devel@lists.freedesktop.org, robdclark@gmail.com, airlied@linux.ie, freedreno@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, nganji@codeaurora.org, hoegsberg@chromium.org, dovizu@chromium.org, robh+dt@kernel.org Subject: [PATCH v3 06/19] drm/msm/dsi: initialize postdiv_lock before use for 10nm pll Date: Fri, 20 Jul 2018 16:42:57 -0400 Message-Id: <20180720204315.19054-7-seanpaul@chromium.org> X-Mailer: git-send-email 2.18.0.233.g985f88cf7e-goog In-Reply-To: <20180720204315.19054-1-seanpaul@chromium.org> References: <20180720204315.19054-1-seanpaul@chromium.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Rajesh Yadav 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 Signed-off-by: Rajesh Yadav Signed-off-by: Sean Paul --- 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;