]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
nouveau/dpcd: return EBUSY for aux xfer if the device is asleep
authorDave Airlie <airlied@redhat.com>
Tue, 24 Feb 2026 03:17:50 +0000 (13:17 +1000)
committerDanilo Krummrich <dakr@kernel.org>
Wed, 4 Mar 2026 21:08:01 +0000 (22:08 +0100)
If we have runtime suspended, and userspace wants to use /dev/drm_dp_*
then just tell it the device is busy instead of crashing in the GSP
code.

WARNING: CPU: 2 PID: 565741 at drivers/gpu/drm/nouveau/nvkm/subdev/gsp/rm/r535/rpc.c:164 r535_gsp_msgq_wait+0x9a/0xb0 [nouveau]
CPU: 2 UID: 0 PID: 565741 Comm: fwupd Not tainted 6.18.10-200.fc43.x86_64 #1 PREEMPT(lazy)
Hardware name: LENOVO 20QTS0PQ00/20QTS0PQ00, BIOS N2OET65W (1.52 ) 08/05/2024
RIP: 0010:r535_gsp_msgq_wait+0x9a/0xb0 [nouveau]

This is a simple fix to get backported. We should probably engineer a
proper power domain solution to wake up devices and keep them awake
while fw updates are happening.

Cc: stable@vger.kernel.org
Fixes: 8894f4919bc4 ("drm/nouveau: register a drm_dp_aux channel for each dp connector")
Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patch.msgid.link/20260224031750.791621-1-airlied@gmail.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
drivers/gpu/drm/nouveau/nouveau_connector.c

index 00d4530aea7173afdbeb662202286645746ad832..cc239492c7f0b88b832ac9e6f4610b4833cc3b78 100644 (file)
@@ -1230,6 +1230,9 @@ nouveau_connector_aux_xfer(struct drm_dp_aux *obj, struct drm_dp_aux_msg *msg)
        u8 size = msg->size;
        int ret;
 
+       if (pm_runtime_suspended(nv_connector->base.dev->dev))
+               return -EBUSY;
+
        nv_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP);
        if (!nv_encoder)
                return -ENODEV;