<html><body>Dear nouveau mailing list,<br><br>on my notebook with the GeForce GT 240M graphics card, I am failing to start sddm since linux kernel 6.5.0.<br>The screen typically goes black or white, mouse pointer is typically visible and can be moved.<br>This happens about 90% of times I try to start the system; in about 10%, everything works fine.<br>If the start fails, dmesg shows output such as:<br>[ 20.260153] nouveau 0000:01:00.0: fifo: DMA_PUSHER - ch 6 [sddm-greeter[3136]] get 0000216088 put 0000217a3c ib_get 00000009 ib_put 0000000a state 80000024 (err: INVALID_CMD) push 00400040<br>[ 20.262191] nouveau 0000:01:00.0: fifo: DMA_PUSHER - ch 6 [sddm-greeter[3136]] get 0000217a3c put 0000219820 ib_get 0000000b ib_put 0000000c state 80000024 (err: INVALID_CMD) push 00400040<br>[ 20.265970] nouveau 0000:01:00.0: fifo: DMA_PUSHER - ch 6 [sddm-greeter[3136]] get 0000219820 put 0000219e50 ib_get 0000000d ib_put 0000000e state 80000024 (err: INVALID_CMD) push 00400040<br><br><br>I've bisected this to:<br>0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c is the first bad commit<br>commit 0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c<br>Author: Christoph Hellwig <hch@lst.de><br>Date: Fri Apr 7 08:31:30 2023 +0200<br><br> drm/nouveau: stop using is_swiotlb_active<br><br> Drivers have no business looking into dma-mapping internals and check<br> what backend is used. Unfortunstely the DRM core is still broken and<br> tries to do plain page allocations instead of using DMA API allocators<br> by default and uses various bandaids on when to use dma_alloc_coherent.<br><br> Switch nouveau to use the same (broken) scheme as amdgpu and radeon<br> to remove the last driver user of is_swiotlb_active.<br><br> Signed-off-by: Christoph Hellwig <hch@lst.de><br> Reviewed-by: Lyude Paul <lyude@redhat.com><br><br> drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 +++-------<br> 1 file changed, 3 insertions(+), 7 deletions(-)<br><br><br>I've tried various kernel (both vanilla or gentoo-patched), with custom or distro configuration; I didn't observe any difference since 6.5.<br><br>I didn't check what the return value of drm_need_swiotlb() is when sddm starts fine; but<br><br>+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c<br>@@ -302,7 +302,7 @@ nouveau_ttm_init(struct nouveau_drm *drm)<br> ret = ttm_device_init(&drm->ttm.bdev, &nouveau_bo_driver, drm->dev->dev,<br> dev->anon_inode->i_mapping,<br> dev->vma_offset_manager,<br>- drm_need_swiotlb(drm->client.mmu.dmabits),<br>+ 1,<br> drm->client.mmu.dmabits <= 32);<br> if (ret) {<br> NV_ERROR(drm, "error initialising bo driver, %d\n", ret);<br><br>seem to prevent this problem for me<br><br>I welcome any help with this problem<br><br>Best regards,<br>Zdenek Sojka<br></body></html>