From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796382182; b=zEZ1DoVupFz8k8Il0JO56nRIQ1v/FfVTQ0T70Lve9p2Ln77Fy+QKJjRhjoLWN5Ro8+m6 M8y4rZxWyesCSZCIcWJ8zi21c0x1cE0EIllr7Z8F3s0GXchhv3JI1SrywkF62mH+qHCC4 7MutnPHlJg+npn1lSgqHhH7oFluN9ElNp1Swr679dXKHizmiDxJm1Xs4wZvPNHBXuFg48 WYItSJOPop6An2o0CaaN8Urg/GniqnpbqTsnTYK5QRMWMtzdmDh5FH2JRMf/CMrEJ7lnX Bj2STPIpLQuolZJK5p0X2ep4LglmPlbNkxO/BhgLX0TwYHS71J76XDaopTdoFLaeOLQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796382182; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=CG/DEcRfquc77YE8/44hhV5x9AbNq/4rGXzJN9CAL2I=; b=WZ4yPzh3rH5Vb+887ZNcqvQQpW6f3zjVLP7nbJIPtw5nLANDl6IJMZY4DRGjZHkUa9d9 CrXQJKu4vSisSWYXXjzaTORFZhLtX3cRmTcD11FwI74/6gTMlHtMkgl7A9e6aHU+3PSwo 9WyZrVTA5k5K4JFyCDggYa2XcWZ2i3asH2MNn6u/n8E6DeSSY+yE6zY8YkaVeDt0Vc8Dz 4tUaKJPmXyhKRUAHCcX66MJmlvPfSj2OCO0mvhzSNG/3ByLmWIemZV5+2gwFsfIZI8TbC jhXYVcNbnDJKF2puPaBjPr1wp+1gJ1c3Ir2v5eESY2dJUzesL6kZVqwYYhSiL2lZKzg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=EYSVyqzg; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 55E2F606A322; Fri, 4 Dec 2026 11:03:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=EYSVyqzg Received: by smtp.kernel.org (Postfix) with ESMTPSA id E11791F00897; Fri, 4 Dec 2026 11:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796382182; bh=CG/DEcRfquc77YE8/44hhV5x9AbNq/4rGXzJN9CAL2I=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=EYSVyqzgCap5yMGKD4C7+XlaX2jQD40qEfCW578Gh9N1EdL9iOBrSdMSJ9OFz9ZNt mSTr9ISVht16JWRnVISZM2TFgs2mIoInHV0BGUNEji5RgkuUhQkbVcVnj2h68AHGsc 1OlTzGia18mEHCkjzOKRQFfbCpKHSyrAHD4bOZlE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Ruben Wauters , Lyude Paul , Dave Airlie Subject: [PATCH 6.18 344/703] drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit) (attempt 2) Date: Fri, 4 Dec 2026 19:04:03 +0900 Message-ID: <20261204100636.937385829@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100627.522266145@linuxfoundation.org> References: <20261204100627.522266145@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Dave Airlie commit ed7fb901fce31588bd12ab95adc36ebcb51bc8ea upstream. commit 604826acb3f5 attempted to add these flags but commit 6c65db809796 reverted it due to it failing on hw from pre-atomic times. So use a second set of functions. original commit msg from Lyude: "Apparently we never actually filled these in, despite the fact that we do in fact technically support atomic modesetting. Since not having these filled in causes us to potentially forget to disable fbdev and friends during suspend/resume, let's fix it." Reported-by: Ruben Wauters Closes: https://gitlab.freedesktop.org/drm/nouveau/-/work_items/517 Fixes: 6c65db809796 ("Revert "drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit)"") Cc: stable@vger.kernel.org Reviewed-by: Lyude Paul Signed-off-by: Dave Airlie Link: https://patch.msgid.link/20261111-nouveau-atomic-fix-v1-1-118e65d3a2f5@redhat.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/nouveau/nouveau_display.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c @@ -353,6 +353,11 @@ static const struct drm_mode_config_func .fb_create = nouveau_user_framebuffer_create, }; +static const struct drm_mode_config_funcs nouveau_mode_config_funcs_atomic = { + .fb_create = nouveau_user_framebuffer_create, + .atomic_commit = drm_atomic_helper_commit, + .atomic_check = drm_atomic_helper_check, +}; struct nouveau_drm_prop_enum_list { u8 gen_mask; @@ -653,7 +658,11 @@ nouveau_display_create(struct drm_device drm_mode_create_scaling_mode_property(dev); drm_mode_create_dvi_i_properties(dev); - dev->mode_config.funcs = &nouveau_mode_config_funcs; + /* this only gets set if the driver has the ATOMIC flag */ + if (drm_drv_uses_atomic_modeset(dev)) + dev->mode_config.funcs = &nouveau_mode_config_funcs_atomic; + else + dev->mode_config.funcs = &nouveau_mode_config_funcs; dev->mode_config.min_width = 0; dev->mode_config.min_height = 0;