From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 04E28492E5C; Wed, 23 Sep 2026 14:33:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790174021; cv=none; b=M2kzU5EVQAyIzqA+kRmaXrkhH7kpReaIklGmsA92QxBTF5NTu5S3Z+ftsnkYKf4g9vO0opdVu/LMVzHIQgNC5O7TdviDQeCOhPVBFvYxVOTTcA1E25ZY5FmxkkRprsKeiPq/ijgk3CkvmQG0AFbL6V8B5B/FIX+WrQ67yX3mhYA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790174021; c=relaxed/simple; bh=itm3AbwSNkKBTfikZVha/mtOgKKq069yuPILhL+69EA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UeezNoJ3DD+ogiWKYDsL25S4wG1LyKQ5rnjOJWu0nv0qwoD5DKjroO7beZcnO+ghYZadnaLAcNYysG5eD0gXQ0OPS4z4nu6pqlJ7EIpiz/FAP3H9PwvIinNB9X+6buvpyjDFncv7S9YGYR7Fl+iyAqRfTKvdaIScyXanTwmxbA8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=VC+IHIsj; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="VC+IHIsj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 066481F000FF; Wed, 23 Sep 2026 14:33:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790174019; bh=ZmB0m8MCgAE5iHvaNWzv7flEQ/IR6lpIYGoP3KtzbYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=VC+IHIsjOBSFOqEIeP8/V9kuL1bpUmyyCyMjo0kR/dIW+6Eh/0T3NfoVkLVABowzw X8Q5Vy7BttqoV+3d8k76hP+Bs4d4l+NbfT6NN7Q1Q4Dpi+xEqm+lqOp5YUr5UfiXT2 72i+ruNsWRaEqTgCnJi3ZMBbeFjyiaQ1zYCZqUEE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Guangshuo Li , Dmitry Baryshkov Subject: [PATCH 7.2 402/438] drm/msm/adreno: fix autosuspend cleanup during teardown Date: Wed, 23 Sep 2026 16:07:03 +0200 Message-ID: <20260923140655.314471456@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260923140644.756254324@linuxfoundation.org> References: <20260923140644.756254324@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Guangshuo Li commit 6fbbf1e152f34ad3913e4a6476680aba672c5068 upstream. adreno_gpu_init() calls pm_runtime_use_autosuspend(), but adreno_gpu_cleanup() does not call the matching pm_runtime_dont_use_autosuspend() during teardown. If the autosuspend delay is set to a negative value while autosuspend is enabled, the runtime PM core increments usage_count to prevent runtime suspend. Without calling pm_runtime_dont_use_autosuspend() during teardown, this reference is not dropped and usage_count remains unbalanced. The documentation for pm_runtime_use_autosuspend() also notes that it is important to undo it with pm_runtime_dont_use_autosuspend() at driver exit time, unless runtime PM was initially enabled with devm_pm_runtime_enable(). Add the missing pm_runtime_dont_use_autosuspend() call to adreno_gpu_cleanup(). This issue was found by manual code inspection. Fixes: eeb754746b14 ("drm/msm/gpu: use pm-runtime") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li Reviewed-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/745110/ Link: https://lore.kernel.org/r/20260808131624.2854412-1-lgs201920130244@gmail.com Signed-off-by: Dmitry Baryshkov Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/msm/adreno/adreno_gpu.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/msm/adreno/adreno_gpu.c +++ b/drivers/gpu/drm/msm/adreno/adreno_gpu.c @@ -1252,6 +1252,8 @@ void adreno_gpu_cleanup(struct adreno_gp for (i = 0; i < ARRAY_SIZE(adreno_gpu->info->fw); i++) release_firmware(adreno_gpu->fw[i]); + pm_runtime_dont_use_autosuspend(&gpu->pdev->dev); + if (priv && pm_runtime_enabled(&priv->gpu_pdev->dev)) pm_runtime_disable(&priv->gpu_pdev->dev);