From nobody Tue Sep 29 11:19:26 2026 Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2839347BDB for ; Sat, 8 Aug 2026 13:41:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786196520; cv=none; b=Kbt/xpbtua0LMBmoX/CvMK7DC94GEphoD9zxqNZZQ2J+i6izw049Tvt7yJG4qoFAw8ONWKwiY2F88fp6AuyjT9dfCwztg822CFP+iy6sWjcDCPytL7hrGrMjQ2gViJAz98h4q/wMdQy54TgDoNh9KTG1ziuwdnNBHSb6oSqOzXo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786196520; c=relaxed/simple; bh=fQj4a9TA622w7byO+NIhdfryBGnr7yGLH3EHFv+wGL8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Ki0VQPFGjvKedCL/2xtSOaBCytzJjD/fWJc3LowD+kbAiKWJLm9imKEBK1HEkBWzLeqze2oG6HU9OeOyDP127bUNPbqlpOfipHIrkv4aEhaCIaatIhdqxD080ivBDE1mHWWUxA6e10or5QxiXTBFAIpGIw7XH7PDI3CBkzzPLMM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kKam8xPB; arc=none smtp.client-ip=209.85.216.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kKam8xPB" Received: by mail-pj1-f47.google.com with SMTP id 98e67ed59e1d1-38d489b6b71so417044a91.0 for ; Sat, 08 Aug 2026 06:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786196518; x=1786801318; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=5x4mrfTwKDCuKeGOKJh1sjTyl1+66+prXU9ablIRt+g=; b=kKam8xPBhOr5bO8tDlovmMxtU58V1gjnQE3e+E1egzBiejrXFb1G2d0DQqhPu70cX6 aV5t7DRc1bteAn4CRty879WGnTrZPWZKO45gL5F41nAut2zzubvWOPrpnTh0p6MVWFIk tYgJQUqF+T+lpI363XNAV/0a2sCMaBWrK0zZ36NSKEPzY06XR09hOrtv4Cl7iCenHMaq JMibocnzZvytpmVYVCuj63QSLoa2Q8ekt0xnHv6sxfeq2Ujv4LDGr3HZPnZ0mQPlMl85 VoHJ3Oxy4atL2zTg9muk2XSS/1eWZBYrU0V2Xaff3ohOa0qn5B4wMoeIaip+DP83jO2c ojEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786196518; x=1786801318; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=5x4mrfTwKDCuKeGOKJh1sjTyl1+66+prXU9ablIRt+g=; b=f9zlQCRGFe16niQOmNlUbY6e2TfeIts2AdIKLdn4vlP/7/NOfy8L2B7T9RK6WMBjSO OnV7c2tpws6lDdTx9D2OImTcISBdzg6mf1t1IOgzIZ0fYWBwxxkdOzSjvlt4ImZVCzN+ 7xZam/ZCXBvo9SqH9re5XKN6iMd2Uf/0IHucjO887V8WS0FVl2BDuIy1r9MC0/ABhqFD jlwNxeuAZXc+XYEOUZFs+C5uL6F3bTqlW8AyDJaHRaAzake5vrxQ75msnQY2ZGGDdbOy prg4k3ampYNxxVUEEfixL63QweDWNOmmotmB5MuM4LIJMqzRRR1AIqml1u8nX9eOyjyq YdlQ== X-Forwarded-Encrypted: i=1; AHgh+Rqp3nP+Ui7M7i2Xd5u/hgRRlIevJUB9Y/A3Q5hmmoy9H9WJrxk9xTVYI14oCyom7l8RTiT9hQiQ+fP6Dy0=@vger.kernel.org X-Gm-Message-State: AOJu0YyUwKvT4FSZJFBdkP+7aR9w6giX2tmo/qW6HVxqvPV0ddPm6Yuf Tb181qJUg3vscRC20k688jiHmVVFRH1D5J7XSzTguU0Z19y6WceJ1hNC X-Gm-Gg: AR+sD13SSmWO3qIZtaVU9Ex+fJl64J8gZ5idQ1SCpygMsyPt4IsQydD06YOa55bR9zn 4BkKDRDLm8sxeD+CAnHhiUL1lA/RCXLE4tJgnSMHbjsg8oCvQMNiH7MHJIE9/TB/vp7O7X4eE9K 5PKx8jan8qoORpXDJp37FBFik/0y/XE7NYq5B2o3Z6YiorDmOwtxqpwbmG5csIy9HK3Jls8fpdJ imHf5Ts5hh/ATp80Z6+lHgeKXQ6hwtJtlPvKnWqtjUqJQql7rE7WxmJ///cm3l/lCFnC4ERrMvB MzyFGbukbXeVf99hp4c09OMk/uXlRHPCmswhClsKpj0ubZzMKSDxyHdFnJ+uacb4XnhrAW6qorV yA0vT+Yomhthf8ZbsI7Rf4Iyv6aHdE7K16MEJDX9fNx6zUZRwOTxlKXN+YYJu5xBZHUFpgvXY9c s241yrLgrAEDU8F6VaSLP7yIOCXUQPqxJbg4PvHwsylrc1nl5BOg== X-Received: by 2002:a17:90b:4e8d:b0:38d:ec31:4840 with SMTP id 98e67ed59e1d1-3903c5932femr32396260a91.13.1786196517998; Sat, 08 Aug 2026 06:41:57 -0700 (PDT) Received: from lgs.. ([152.32.188.52]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3925fc6f13dsm6278888a91.1.2026.08.08.06.41.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Aug 2026 06:41:57 -0700 (PDT) From: Guangshuo Li To: Lyude Paul , Danilo Krummrich , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Dave Airlie , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Guangshuo Li , stable@vger.kernel.org Subject: [PATCH] drm/nouveau: fix autosuspend cleanup during teardown Date: Sat, 8 Aug 2026 21:41:37 +0800 Message-ID: <20260808134137.2864847-1-lgs201920130244@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" nouveau_drm_device_init() calls pm_runtime_use_autosuspend(), but nouveau_drm_device_fini() does not call the matching pm_runtime_dont_use_autosuspend(). 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 the common device teardown path. This issue was found by manual code inspection. Fixes: 5addcf0a5f0f ("nouveau: add runtime PM support (v0.9)") Cc: stable@vger.kernel.org Signed-off-by: Guangshuo Li Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/nouveau_drm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouvea= u/nouveau_drm.c index e16f59b00f6f..1579a4b0785e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -585,6 +585,7 @@ nouveau_drm_device_fini(struct nouveau_drm *drm) if (nouveau_pmops_runtime()) { pm_runtime_get_sync(dev->dev); pm_runtime_forbid(dev->dev); + pm_runtime_dont_use_autosuspend(dev->dev); } =20 nouveau_led_fini(dev); --=20 2.43.0