Nouveau Archive mirror
 help / color / mirror / Atom feed
From: "Zdenek Sojka" <zsojka@seznam.cz>
To: <nouveau@lists.freedesktop.org>
Subject: GT216M [GeForce GT 240M] (NV50/Tesla) sddm fails to start since commit 0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c
Date: Tue, 30 Jan 2024 07:08:38 +0100 (CET)	[thread overview]
Message-ID: <6qQ.2DW}.7fbyaXLxaf0.1bk99c@seznam.cz> (raw)

[-- Attachment #1: Type: text/plain, Size: 3066 bytes --]

Dear nouveau mailing list,

on my notebook with the GeForce GT 240M graphics card, I am failing to start
sddm since linux kernel 6.5.0.
The screen typically goes black or white, mouse pointer is typically visible
and can be moved.
This happens about 90% of times I try to start the system; in about 10%, 
everything works fine.
If the start fails, dmesg shows output such as:
[   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
[   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
[   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


I've bisected this to:
0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c is the first bad commit
commit 0a2f6372a43ff5e948b8b10be34d4473f6c2ef6c
Author: Christoph Hellwig <hch@lst.de>
Date:   Fri Apr 7 08:31:30 2023 +0200

    drm/nouveau: stop using is_swiotlb_active

    Drivers have no business looking into dma-mapping internals and check
    what backend is used.  Unfortunstely the DRM core is still broken and
    tries to do plain page allocations instead of using DMA API allocators
    by default and uses various bandaids on when to use dma_alloc_coherent.

    Switch nouveau to use the same (broken) scheme as amdgpu and radeon
    to remove the last driver user of is_swiotlb_active.

    Signed-off-by: Christoph Hellwig <hch@lst.de>
    Reviewed-by: Lyude Paul <lyude@redhat.com>

 drivers/gpu/drm/nouveau/nouveau_ttm.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)


I've tried various kernel (both vanilla or gentoo-patched), with custom or
distro configuration; I didn't observe any difference since 6.5.

I didn't check what the return value of drm_need_swiotlb() is when sddm 
starts fine; but

+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -302,7 +302,7 @@ nouveau_ttm_init(struct nouveau_drm *drm)
        ret = ttm_device_init(&drm->ttm.bdev, &nouveau_bo_driver, drm->dev->
dev,
                                  dev->anon_inode->i_mapping,
                                  dev->vma_offset_manager,
-                                 drm_need_swiotlb(drm->client.mmu.dmabits),
+                                 1,
                                  drm->client.mmu.dmabits <= 32);
        if (ret) {
                NV_ERROR(drm, "error initialising bo driver, %d\n", ret);

seem to prevent this problem for me

I welcome any help with this problem

Best regards,
Zdenek Sojka

[-- Attachment #2: Type: text/html, Size: 4157 bytes --]

                 reply	other threads:[~2024-01-30  6:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='6qQ.2DW}.7fbyaXLxaf0.1bk99c@seznam.cz' \
    --to=zsojka@seznam.cz \
    --cc=nouveau@lists.freedesktop.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).