From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 4A37A4C9002 for ; Wed, 1 Jul 2026 18:29:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782930549; cv=none; b=ErSTuzajJhXk7ilAtTOGVsbYnKmsMb89a+M2tasqan5bdTdUHbDnA3CK0/OvO1tj5HTw6Fmgzi7vXMTueCjN01+Ctcx2KW8VfG99WDBgLSW2jq1QPlueKEtq1vr1VzMza0yeBcQ/pt3ajxI7JfCNkIMewQR9lXlTXh53T6F39Rs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782930549; c=relaxed/simple; bh=3X8ujv54BFzDrs2/OhtUVJOWo13RQ+42+HLs8PI/0/0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OFLmj0XwMNOF73bHi87K34qoLipHjaK89jhDlpvKsBlCbwogj3BEWYLdbGVfiLP76lS6OfRO7K+dyyblXh202rYPQTbRsrpPXZ64ZC3ISwPkrPWtoP4LYnZ6DHOHdo1n8rsoLmDr+kI32S1Wjv/ju9RVkz0iueal04nMgrZku5I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=A9S6jgSk; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="A9S6jgSk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1782930547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=a7e1k4RF0Xm/tkfPnX0cO2BLntyNgnQLBQqB6vQqdO0=; b=A9S6jgSkuApLuysHM6DUhoUfjUdWlgRN3Kmoy9Nz1jts2omZdQA6K2u20SAYBKLI46f+dI 6LOQf4E6sbnQ/uyQSPLRmDpoc3t3TwmvOkm7DLXtUS4OYret3B/Fw+185yFtmAdGb144yP hOGkC/ESBhPALXQAToKoqbC1ywCj0jA= Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-352-ZdBUyLAoMcSrEgAVTtFZ_Q-1; Wed, 01 Jul 2026 14:29:03 -0400 X-MC-Unique: ZdBUyLAoMcSrEgAVTtFZ_Q-1 X-Mimecast-MFC-AGG-ID: ZdBUyLAoMcSrEgAVTtFZ_Q_1782930541 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 63CCE193336E; Wed, 1 Jul 2026 18:29:01 +0000 (UTC) Received: from GoldenWind.redhat.com (unknown [10.22.89.127]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E1B01800592; Wed, 1 Jul 2026 18:28:58 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: "Timur Tabi" , "Dave Airlie" , "Andy Shevchenko" , "Maarten Lankhorst" , "Ben Skeggs" , "Kees Cook" , "Simona Vetter" , "David Airlie" , "Thomas Zimmermann" , "Maxime Ripard" , "Mel Henning" , "Danilo Krummrich" , "Lyude Paul" Subject: [PATCH v3 0/3] drm/nouveau/gsp/r570: Fix runtime PM Date: Wed, 1 Jul 2026 14:17:32 -0400 Message-ID: <20260701182857.190713-1-lyude@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 Runtime PM has been kind of unreliable with GSP for a while. It works well enough to shut the GPU off and turn it back on, but more often then not it ends up leaving the GPU in a broken state on resume - which makes it impossible to really do anything else with it. Recently however, I discovered that it's been failing much harder on some ampere systems. This lead me down a rabbit hole that lead me to figure out one of our previous fixes for runtime PM wasn't correct. After fixing that and combining it with some fixes we had tried in the past without success, I finally managed to get nouveau to handle runtime PM with the GSP perfectly. These are those fixes. Patch-series wide changes since V2: * Drop the patch for switching oldLevel from LEVEL_3 to LEVEL_4. If I'm understanding OpenRM correctly, LEVEL_3 corresponds to PCI D3 power state and is intended for use on systems with ACPI. To be clear, I mean ACPI support generally - it doesn't appear to specifically refer to laptop-specific ACPI handles like _DSM or the like. In an unexpected twist, it appears LEVEL_4 actually corresponds to APM (as in "Advanced Power Management", e.g. pre-ACPI)! After re-testing my local setups I wasn't able to find any significant behavior difference between LEVEL_3 and LEVEL_4, so let's be conservative and leave this be for now. It still may be worth looking into the future why I've seen OpenRM specifically call-out APM suspend being requested in debug builds instead of S3. I wouldn't expect APM to actually work with modern Nvidia hardware, but it's always possible there's some other reason they still use this Tested on a Lenovo P16 G1 (100 runtime PM cycles!), and RTX4000. Previous version of the patch series: https://patchwork.freedesktop.org/series/169457/ Lyude Paul (3): Revert "nouveau/gsp: fix suspend/resume regression on r570 firmware" drm/nouveau/gsp/r570: Never enter Gcoff state drm/nouveau/gsp/r570: Add missing state flags to GSP resume arguments drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/fbsr.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/gsp.c | 2 +- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/fbsr.c | 8 ++++---- drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/gsp.c | 3 ++- .../gpu/drm/nouveau/nvkm/subdev/gsp/rm/r570/nvrm/gsp.h | 8 ++++++++ drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/rm.h | 2 +- 6 files changed, 17 insertions(+), 8 deletions(-) base-commit: cff96362794a5c1f3adb013b4a46c7233149a629 -- 2.54.0