Created attachment 132255 [details] journal trace GP108 I'm trying to make nouveau working with this card. I'm only interested in modesetting. On an unmodified kernel the chipset is not recognized and at boot I get [ 0.874915] nouveau 0000:01:00.0: unknown chipset (138000a1) [ 0.874918] nouveau: probe of 0000:01:00.0 failed with error -12 I also tried to use the same settings as for the NV137 adding in base.c: case 0x138: device->chip = &nv137_chipset; break; With this change at boot I get a black screen and nouveau timeouts. In attachment the journal using nouveau.bebug=trace (with the kernel modification).
Created attachment 132256 [details] VBIOS VBIOS exctracted with nvagetbios -s prom
Created attachment 132283 [details] log_gf119_disp_pioc_init_returns_0 The problem is that gf119_disp_pioc_init() is returning -EBUSY. Modesetting works fine (let's say 90% of the times) if I force gf119_disp_pioc_init() to return 0. Of course I highly doubt this is a reasonable fix but at least it could give an hint where the real issue is. In attachment the log with this ugly change (but at least I was able to have a reasonable resolution).
Created attachment 132286 [details] MMIOTRACE In attachment mmiotrace (modprobe + xorg start)
So it seems like there are only 2 heads instead of 4. Carlo hardcoded the heads from 4 to 2 in gf119_disp_new_ and crtc's to 2 in nv50_display_create and was able to get something up and running. 22448 indeed returns 4. Looking over the mmiotrace, 2245c returns 2. No clue if that just happens to be 2 or if that's the number of heads.
Created attachment 132292 [details] [review] patch to check if heads are there before initialization Based on comments from Ben, I wrote this patch against drm-next. Entirely untested. (Won't apply to 4.12, sadly.)
Created attachment 132293 [details] log patch drm-next > Based on comments from Ben, I wrote this patch against drm-next. Entirely > untested. (Won't apply to 4.12, sadly.) The patch doesn't seem to work fine. In attachment the log. For reference: # ./nvapeek 612004 00612004: 30700f03
Created attachment 132296 [details] [review] backport fix Well, your patch backported to 4.12 works fine. Attached the patch I'm using.
Ok, tested again the latest drm-next __without__ the patch proposed by Ilia and it fails with the same error: nouveau 0000:01:00.0: DRM: curs917a allocation failed: -16 nouveau: probe of 0000:01:00.0 failed with error -16 So the problem is not related to your patch (that at this point I'm fairly confident it should work fine since it works correctly backporting it) but with drm-next itself I guess.
drm-next appears to be hitting this logic in nv50_disp_chan_ctor: if (disp->chan[chan->chid.user]) { chan->chid.user = -1; return -EBUSY; } when constructing the cursor for head 1. drm/nouveau/nvkm/engine/disp/nv50.h: struct nv50_disp_chan *chan[17]; Oops. That should be [21]. It was reading/writing random memory :(
https://patchwork.freedesktop.org/patch/164205/ See if that helps with drm-next (in addition to the other patch).
Yeah, that solved the issue. So your patch works fine with that fix on top and adding: case 0x138: device->chip = &nv137_chipset; break; Thanks,
Hey guys, anything else we can do to help you upstreaming the patch? We have a bunch of nvidia boards around, just ask if you need any more test / data / trace. thanks,
Note that the preparatory patches are in Ben's tree now, should show up in 4.13 or 4.14. The one to actually enable GP108 is being delayed as he'd like some time with the mmiotrace to double-check a few things.
BTW, this is the patch I sent to enable GP108: https://patchwork.freedesktop.org/patch/164973/ And this is Ben's tree with the updated versions of those patches: https://github.com/skeggsb/nouveau/commits/master
The patch titled " disp/gf119-: avoid creating non-existent heads " is not in linux-next, does this mean it's no longer planned for inclusion in 4.14? Also I guess the GP108 one is still pending the mmiotrace analysis?
(In reply to Daniel Drake from comment #15) > The patch titled " disp/gf119-: avoid creating non-existent heads " is not > in linux-next, does this mean it's no longer planned for inclusion in 4.14? > > Also I guess the GP108 one is still pending the mmiotrace analysis? A drm-next nouveau pull for 4.14 has not been submitted yet. You can see the current queue at https://github.com/skeggsb/nouveau/commits/master
"disp/gf119-: avoid creating non-existent heads" is still not in linus tree, is there any news here?
(In reply to Daniel Drake from comment #17) > "disp/gf119-: avoid creating non-existent heads" is still not in linus tree, > is there any news here? It is definitely in Linus’ tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?h=v4.14&id=eba5e56db65b7a44d57a98f5f382b2a2b9991321 and looking at the source from 4.14, the patch seems to be there as well: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/nouveau/nv50_display.c?h=v4.14#n4457
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/357.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.