Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/nouveau: Do not implement mode_set_base_atomic callback

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>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Simona Vetter <simona.vetter@ffwll.ch>
Acked-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
Link: https://patch.msgid.link/20251125130634.1080966-3-tzimmermann@suse.de

+4 -20
+4 -20
drivers/gpu/drm/nouveau/dispnv04/crtc.c
··· 837 837 static int 838 838 nv04_crtc_do_mode_set_base(struct drm_crtc *crtc, 839 839 struct drm_framebuffer *passed_fb, 840 - int x, int y, bool atomic) 840 + int x, int y) 841 841 { 842 842 struct nouveau_crtc *nv_crtc = nouveau_crtc(crtc); 843 843 struct drm_device *dev = crtc->dev; ··· 850 850 NV_DEBUG(drm, "index %d\n", nv_crtc->index); 851 851 852 852 /* no fb bound */ 853 - if (!atomic && !crtc->primary->fb) { 853 + if (!crtc->primary->fb) { 854 854 NV_DEBUG(drm, "No FB bound\n"); 855 855 return 0; 856 856 } 857 857 858 - /* If atomic, we want to switch to the fb we were passed, so 859 - * now we update pointers to do that. 860 - */ 861 - if (atomic) { 862 - drm_fb = passed_fb; 863 - } else { 864 - drm_fb = crtc->primary->fb; 865 - } 858 + drm_fb = crtc->primary->fb; 866 859 867 860 nvbo = nouveau_gem_object(drm_fb->obj[0]); 868 861 nv_crtc->fb.offset = nvbo->offset; ··· 913 920 int ret = nv_crtc_swap_fbs(crtc, old_fb); 914 921 if (ret) 915 922 return ret; 916 - return nv04_crtc_do_mode_set_base(crtc, old_fb, x, y, false); 917 - } 918 - 919 - static int 920 - nv04_crtc_mode_set_base_atomic(struct drm_crtc *crtc, 921 - struct drm_framebuffer *fb, 922 - int x, int y, enum mode_set_atomic state) 923 - { 924 - return nv04_crtc_do_mode_set_base(crtc, fb, x, y, true); 923 + return nv04_crtc_do_mode_set_base(crtc, old_fb, x, y); 925 924 } 926 925 927 926 static void nv04_cursor_upload(struct drm_device *dev, struct nouveau_bo *src, ··· 1259 1274 .commit = nv_crtc_commit, 1260 1275 .mode_set = nv_crtc_mode_set, 1261 1276 .mode_set_base = nv04_crtc_mode_set_base, 1262 - .mode_set_base_atomic = nv04_crtc_mode_set_base_atomic, 1263 1277 .disable = nv_crtc_disable, 1264 1278 .get_scanout_position = nouveau_display_scanoutpos, 1265 1279 };