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=1796383809; b=3wa3xDZzRuOh4CNBrx5UvEYPVAjuqMwjRxsV0gNf+8Z3pOP79pn/CX3ZWV7cGFbaXj/I MEUbX7RnpNJmUyqnzZD5kbpVu83IfcuZUEE87iGr9UdLCo7aUc7pShnriPHGpcDUt3mlR W4XGKn0CODObqEwE+1ZO2Tljng0A4gYBqhRrhMobzLpgFtIfviuyyeYXnB+HK7G0Uxr2I WNalYdTldAFtBf6xvqDGXYRtR5H6tcdDD3HHeLlk/0G31axrd06aNT3VY5IlAr1JW0XL9 J158JBx+jDh3DXNhzGUkhusye2luSM5QnTxQ4HRTwzfzoAoDqE39p+pDUue+I+t/axQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796383809; 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=SIF3XvcizRM0/3sd4bH4UWF7mtus5+0PwpCNYgFIHls=; b=Z+UgKhSBvwovCf1b9OG10BMa60bF6Ce+uBNx41CIoeY6CXapDeSV4tNjr4bsaJyAmFto dkvBGdIRjkSZA6qubd/aDGpeaVTWbFN8dUNrxnlU0r+2cpfm3IvoFyuDq1Vx+1E/E34dT gegMy7ha13XI3AXCacGVzoBDKNtAHdAt3cbBsqW1gIyfvAU6MGAFZa2B6jGmFJGHxGUwG rMqU41QwHGKZaH41jc+ydbbIqcKteyHKP5JDowQ6y5kYAMErGdSJ2oxxx7kSXqpgWTxoD 7qJodcqt77A+mFtGejxcXVLd3FjZiXy48edAoStGfeIfqVKFVZktLbHypO9s2JHwDiQ== 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=le2DoKYv; 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 3DFC5606A338; Fri, 4 Dec 2026 11:30:09 +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=le2DoKYv Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE25E1F000C2; Fri, 4 Dec 2026 11:30:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796383809; bh=SIF3XvcizRM0/3sd4bH4UWF7mtus5+0PwpCNYgFIHls=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=le2DoKYva1wXqo22I7XQcnylrAKnVmYahnAfClK6lt1IPU1nWqEdUCBuq3Ch0doal pTUshdS2W/QB8cWGVUbHgH0LYvKJQWqNdgnukptHEsQ+4pXeh+gLS+UZPOKpi2deVG N/AkZKF0oALX3VSAcYTm/D3eH6BDWvLi4cVxAwSE= 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.12 324/555] drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit) (attempt 2) Date: Fri, 4 Dec 2026 19:06:07 +0900 Message-ID: <20261204100622.108946918@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100603.988357525@linuxfoundation.org> References: <20261204100603.988357525@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.12-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 @@ -393,6 +393,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; @@ -693,7 +698,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;