Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp305717pxm; Wed, 2 Mar 2022 15:57:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJzVAaFqMbwitIX3UJV6FMvVxh9BHALaBkb2TZtxm83G6NpJFvbmcyZXiXK29U5syBrk4/vF X-Received: by 2002:a63:d607:0:b0:378:c5ee:50c0 with SMTP id q7-20020a63d607000000b00378c5ee50c0mr12140458pgg.333.1646265457215; Wed, 02 Mar 2022 15:57:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646265457; cv=none; d=google.com; s=arc-20160816; b=HvpDP2BweIJyTb+xBE/GfdXi93ioMuXHJLqh9dzBIHc0YswhQgO9OUGbNv0Q0jbqY0 2iH2IXRhBS83TvgZ05V3f2E1b0G0EVnT0QMZj2X61ovdtcmbTOLh9Sia3vh33EN9ZSKU 5XMiUCA7jPqsabxG6YMvKT2lVpTKU2CZ4kpcrNJRl13VBnp0LbVBSN9EIrAgRvTkm1HP pulMrcud2Funn5YIitqC4ABiYHTj5U45OLehRYw4ZTDkzxp5NsIdAc2z5FAI6WKyx2Eh /3M8rpSxDeoieKNKz9Ap84QrGXL8Z42pjMsdckA9EKgAxCmqcZIqG7sddkSAhX+f37ju KAsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=2lluEkC2IYldaISdqe06rNauGzvoaf++UFPThwQahFY=; b=sT70+fNGSyCz6Rc+mDCnmPxiqKCEtPR43IZZ7TzFnZcLPG4cblnxW1BNFx6OZZxZIO ezjERlEHPnwDb5adVDh5ITzcPhq6xvlEZE4OwYkN4Md1T54ExE+t6CZkqw2bglc3UOQG iEOmTSBT6mlfDnIKs41e97vIzjQ0Rz0lzi9RVbVRfi2aGzEfLHJitN0yQsbLjOxTW+Gy uiwWIhphN1qhfnGq/16N9+9Peik2FaJgdd63XvFR63mJiD2cQ6cvuGJofWmJZRZl6MOo hkTRGZPofkpaKhszQbdlGsuin5mLozPXBqUBuVXnYH04rReuzdTHwBRqEFDWIYRB01IT G6bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=epNbTqWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s32-20020a634520000000b00372d5be9b30si455310pga.481.2022.03.02.15.57.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Mar 2022 15:57:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=epNbTqWf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C1576192CA0; Wed, 2 Mar 2022 15:17:24 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238268AbiCBR36 (ORCPT + 99 others); Wed, 2 Mar 2022 12:29:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243917AbiCBR3J (ORCPT ); Wed, 2 Mar 2022 12:29:09 -0500 Received: from m43-7.mailgun.net (m43-7.mailgun.net [69.72.43.7]) by lindbergh.monkeyblade.net (Postfix) with UTF8SMTPS id 740E64BFCB for ; Wed, 2 Mar 2022 09:28:07 -0800 (PST) DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1646242087; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=2lluEkC2IYldaISdqe06rNauGzvoaf++UFPThwQahFY=; b=epNbTqWfdlUaHxn4ZvCBzGZN2OaOKoF+2fwrhSteCNl0Hg0QjAopa3vg4KYs/BaE2KbTHgvW NPQRWLWfGCAgWIDWkuUjgEuIkg50qRQ8iauGUJA9qNp3bvH7u+tN+ViI7lsO+pi7Sz7PE4QP oAwptlfgmEcMeNqVBptwivYOv80= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n04.prod.us-west-2.postgun.com with SMTP id 621fa9260f85aa2ea38aa026 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Wed, 02 Mar 2022 17:28:06 GMT Sender: quic_akhilpo=quicinc.com@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 660C9C43637; Wed, 2 Mar 2022 17:28:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Received: from hyd-lnxbld559.qualcomm.com (unknown [202.46.22.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: akhilpo) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7B66AC4338F; Wed, 2 Mar 2022 17:28:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 smtp.codeaurora.org 7B66AC4338F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=quicinc.com From: Akhil P Oommen To: freedreno , dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, Rob Clark , Dmitry Baryshkov , Bjorn Andersson Cc: Abhinav Kumar , Daniel Vetter , David Airlie , Jonathan Marek , Jordan Crouse , Sean Paul , linux-kernel@vger.kernel.org Subject: [PATCH v1 03/10] drm/msm/a6xx: Avoid gmu lock in pm ops Date: Wed, 2 Mar 2022 22:57:29 +0530 Message-Id: <20220302225551.v1.3.Ic49018db022d364e899a9fba8baa869d88a54b7f@changeid> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1646242056-2456-1-git-send-email-quic_akhilpo@quicinc.com> References: <1646242056-2456-1-git-send-email-quic_akhilpo@quicinc.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We don't really need gmu lock in runtime pm ops because these operations are serialized anyway and also with other paths where we take this lock. This patch will help to simplify the locking order when we introduce crashstate_lock in the upcoming patch. Signed-off-by: Akhil P Oommen --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index 3faf551..8c3cb31 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c @@ -1530,9 +1530,7 @@ static int a6xx_pm_resume(struct msm_gpu *gpu) trace_msm_gpu_resume(0); - mutex_lock(&a6xx_gpu->gmu.lock); ret = a6xx_gmu_resume(a6xx_gpu); - mutex_unlock(&a6xx_gpu->gmu.lock); if (ret) return ret; @@ -1555,9 +1553,7 @@ static int a6xx_pm_suspend(struct msm_gpu *gpu) msm_devfreq_suspend(gpu); - mutex_lock(&a6xx_gpu->gmu.lock); ret = a6xx_gmu_stop(a6xx_gpu); - mutex_unlock(&a6xx_gpu->gmu.lock); if (ret) return ret; -- 2.7.4