From patchwork Tue Feb 21 10:14:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 13147605 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CAB9C6379F for ; Tue, 21 Feb 2023 10:16:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233739AbjBUKQr (ORCPT ); Tue, 21 Feb 2023 05:16:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233675AbjBUKQr (ORCPT ); Tue, 21 Feb 2023 05:16:47 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E31C23334; Tue, 21 Feb 2023 02:16:46 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 01A0B60FC8; Tue, 21 Feb 2023 10:16:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5799BC4339C; Tue, 21 Feb 2023 10:16:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1676974605; bh=LUsoC6iSVQT5Y3MM/3YfkP1p/LvHRVSyJ+N/makA+N8=; h=From:To:Cc:Subject:Date:From; b=rcXnBgvhaj6iNKopEWQjVQr3aV4U3Ca/n+r22TxKwIJyrYcLABchJSvyK9nBAxfbh DT6GvN7i1hDH4Cc70yAAUXa1+Taa5/TYX6qjZiahdTllrZP10/EtnE0k4FtOTxBFPz Ghh1zezU4xyboYI4ZUFnPT2DS610X3SRE5NeqUUpdt3WdD5HTjnDO59YAEmybpZNxE 4mjUudbWBy1BTeN0v6GSsiN9bIFAPlNhzKjOj62RtwjbS9TioWGvSKZ6iaQ9pc9CRW G6q6etakyCVKw4RXU6XcrJfZ2bgC2Dtq8ur+JnI9q6KsgywauRm7YpdnVmW6caiNSj eTrgbD87u43gg== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1pUPhX-0003oD-5w; Tue, 21 Feb 2023 11:16:47 +0100 From: Johan Hovold To: Rob Clark , Abhinav Kumar , Dmitry Baryshkov Cc: Sean Paul , David Airlie , Daniel Vetter , Bjorn Andersson , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH 0/4] drm/msm/adreno: fix runtime PM imbalance at unbind Date: Tue, 21 Feb 2023 11:14:26 +0100 Message-Id: <20230221101430.14546-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org As reported by Bjorn, we can end up with an unbalanced runtime PM disable count if unbind() is called before the drm device is opened (e.g. if component bind fails due to the panel driver not having been loaded yet). As runtime PM must currently stay disabled until the firmware has been loaded, fix this by making the runtime PM disable call at unbind() conditional. The rest of the series removes a bogus pm_runtime_set_active() call and drops the redundant pm_runtime_disable() from adreno_gpu_cleanup(). Included is also a related indentation cleanup. Johan Johan Hovold (4): drm/msm/adreno: fix runtime PM imbalance at unbind drm/msm/adreno: drop bogus pm_runtime_set_active() drm/msm/adreno: drop redundant pm_runtime_disable() drm/msm/adreno: clean up component ops indentation drivers/gpu/drm/msm/adreno/adreno_device.c | 10 ++++------ drivers/gpu/drm/msm/adreno/adreno_gpu.c | 5 ----- 2 files changed, 4 insertions(+), 11 deletions(-)