From: Thomas Zimmermann <tzimmermann@suse.de>
To: simona@ffwll.ch, airlied@gmail.com, alexander.deucher@amd.com,
christian.koenig@amd.com, lyude@redhat.com, dakr@kernel.org,
deller@gmx.de, mripard@kernel.org,
maarten.lankhorst@linux.intel.com, jason.wessel@windriver.com,
danielt@kernel.org, dianders@chromium.org
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
nouveau@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Thomas Zimmermann <tzimmermann@suse.de>
Subject: [PATCH 2/5] drm/nouveau: Do not implement mode_set_base_atomic callback
Date: Tue, 25 Nov 2025 13:52:14 +0100 [thread overview]
Message-ID: <20251125130634.1080966-3-tzimmermann@suse.de> (raw)
In-Reply-To: <20251125130634.1080966-1-tzimmermann@suse.de>
Remove the implementation of the CRTC helper mode_set_base_atomic
from nouveau. It pretends to provide mode setting for kdb debugging,
but has been broken for some time.
Kdb output has been supported only for non-atomic mode setting since
commit 9c79e0b1d096 ("drm/fb-helper: Give up on kgdb for atomic drivers")
from 2017.
While nouveau provides non-atomic mode setting for some devices, kdb
assumes that the GEM buffer object is at a fixed location in video
memory. This has not been the case since
commit 4a16dd9d18a0 ("drm/nouveau/kms: switch to drm fbdev helpers")
from 2022. Fbdev-ttm helpers use a shadow buffer with a movable GEM
buffer object. Triggering kdb does therefore not update the display.
Hence remove the whole kdb support from nouveau.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 24 ++++--------------------
1 file changed, 4 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index c063756eaea3..80493224eb6c 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -837,7 +837,7 @@ nv_crtc_gamma_set(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
static int
nv04_crtc_do_mode_set_base(struct drm_crtc *crtc,
struct drm_framebuffer *passed_fb,
- int x, int y, bool atomic)
+ int x, int y)
{
struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc);
struct drm_device *dev = crtc->dev;
@@ -850,19 +850,12 @@ nv04_crtc_do_mode_set_base(struct drm_crtc *crtc,
NV_DEBUG(drm, "index %d\n", nv_crtc->index);
/* no fb bound */
- if (!atomic && !crtc->primary->fb) {
+ if (!crtc->primary->fb) {
NV_DEBUG(drm, "No FB bound\n");
return 0;
}
- /* If atomic, we want to switch to the fb we were passed, so
- * now we update pointers to do that.
- */
- if (atomic) {
- drm_fb = passed_fb;
- } else {
- drm_fb = crtc->primary->fb;
- }
+ drm_fb = crtc->primary->fb;
nvbo = nouveau_gem_object(drm_fb->obj[0]);
nv_crtc->fb.offset = nvbo->offset;
@@ -920,15 +913,7 @@ nv04_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
int ret = nv_crtc_swap_fbs(crtc, old_fb);
if (ret)
return ret;
- return nv04_crtc_do_mode_set_base(crtc, old_fb, x, y, false);
-}
-
-static int
-nv04_crtc_mode_set_base_atomic(struct drm_crtc *crtc,
- struct drm_framebuffer *fb,
- int x, int y, enum mode_set_atomic state)
-{
- return nv04_crtc_do_mode_set_base(crtc, fb, x, y, true);
+ return nv04_crtc_do_mode_set_base(crtc, old_fb, x, y);
}
static void nv04_cursor_upload(struct drm_device *dev, struct nouveau_bo *src,
@@ -1274,7 +1259,6 @@ static const struct drm_crtc_helper_funcs nv04_crtc_helper_funcs = {
.commit = nv_crtc_commit,
.mode_set = nv_crtc_mode_set,
.mode_set_base = nv04_crtc_mode_set_base,
- .mode_set_base_atomic = nv04_crtc_mode_set_base_atomic,
.disable = nv_crtc_disable,
.get_scanout_position = nouveau_display_scanoutpos,
};
--
2.51.1
next prev parent reply other threads:[~2025-11-25 13:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 12:52 [PATCH 0/5] drm: Remove remaining support for kdb Thomas Zimmermann
2025-11-25 12:52 ` [PATCH 1/5] drm/amdgpu: Do not implement mode_set_base_atomic callback Thomas Zimmermann
2025-11-25 12:52 ` Thomas Zimmermann [this message]
2025-11-26 23:07 ` [PATCH 2/5] drm/nouveau: " Lyude Paul
2025-11-25 12:52 ` [PATCH 3/5] drm/radeon: " Thomas Zimmermann
2025-11-25 12:52 ` [PATCH 4/5] drm/fbdev-helper: Remove drm_fb_helper_debug_enter/_leave() Thomas Zimmermann
2025-11-25 12:52 ` [PATCH 5/5] fbcon: Remove fb_debug_enter/_leave from struct fb_ops Thomas Zimmermann
2025-11-25 13:10 ` [PATCH 0/5] drm: Remove remaining support for kdb Thomas Zimmermann
2025-11-25 13:16 ` Christian König
2025-11-25 14:24 ` Thomas Zimmermann
2025-11-25 15:26 ` Doug Anderson
2025-11-25 16:22 ` Thomas Zimmermann
2025-11-26 12:19 ` Daniel Thompson
2025-11-26 13:32 ` Thomas Zimmermann
2025-11-26 14:20 ` Daniel Thompson
2025-11-25 16:25 ` Maarten Lankhorst
2025-11-26 7:44 ` Thomas Zimmermann
2025-12-01 16:41 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251125130634.1080966-3-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dakr@kernel.org \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jason.wessel@windriver.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lyude@redhat.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®