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=1796380620; b=B8bXgd18CWgXNzlEvLFby2NISBccptBI7wFotvvQ+gE27xerm40mNu3g2G/oUtrEf/Br EuyaUkQKHqRvqVIB6j1G6xGV9rikurxBHDFOoKXDJrfkIQtZ6DDhRbk2JChc/2BawFyqF 8xukMwV3keGMsEW0vmTJIeqt3l2paFW9oDDWXu+pp0BdepOvn9QzhIoJK/Y56VykqNosF C5a3eQ1EYzKBUyHkg6m7McX/7Z8Nd+QuC9PZyL/u3et+3hcpGNXESgYtfBKExUsIapaVH q03SuP55aY8oIf0KwYKadM5lCT4KfkhhkYxcl7F4Tym3QUjmubeMgJoHmRQgJQJIbdQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380620; 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=MyA+L2OSyjgbAcW48RG8diuwR3/roOkVQyxcLf42fS8=; b=DEdFguS79QPinB/ZzS90ZXv87MmxdCDxxhZQj9/Id2GAH7F8BOshdsB4pm6g5X9oEmSA wGAgY+utxGekq7cU1QXMHBaFA1JoWlGRfPxWVTEQlUglcZbKrLy/rhjCMtcohpcrwPHMR hAgOqbHIvgeNlXMopIUfxyAncLajHL4YEoNrHvJEixxLjPc6KLeffUTaGvvs6CulniM3o ArQmzaxKCoKj7YBspaLk2rlBkU1hzWXAOADhVaOB5e+M9MkBxcwIJ/E/IyljtCZ3t7Hh9 ulbmsjGla6nkzen+WsRuzD1pXdDt09IhsSSfQX7h+sS7pee83a2aeuRxBBqI/TIM5Qg== 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=vgm8KEi2; 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 ACE2E606A33A; Fri, 4 Dec 2026 10:37:00 +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=vgm8KEi2 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 267101F000C2; Fri, 4 Dec 2026 10:37:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380620; bh=MyA+L2OSyjgbAcW48RG8diuwR3/roOkVQyxcLf42fS8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=vgm8KEi2vS5nggTOgGAWArRWkbTZbGPph1/7Ud7MDokWzCVonazGzvUi668i7KQii T2tBxFXgtm7DL7010ilpTRug5dvfqsfjOq/1L3inWfjttRV7Wsp8/KHYZyrzvcDtkf 0Dh0bqjpz2hQbykiZQf5O9pPHCZDIrkjVpOZ4pfc= 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 7.3 351/742] drm/nouveau/disp: Set drm_mode_config_funcs.atomic_(check|commit) (attempt 2) Date: Fri, 4 Dec 2026 19:03:35 +0900 Message-ID: <20261204100644.393527025@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@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 7.3-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 @@ -354,6 +354,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; @@ -654,7 +659,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;