Open TuxThePenguin0 opened 2 years ago
It's not unlikely that I'll switch to 5.15 but I don't know when I get around to doing that. Maybe this patch that I hacked up at some point can help you out in the meantime: 0006-Use-dma_buf_map_memcpy_to-fix-vunmap.patch
Thanks for that, the kernel compiles with the patch applied After some testing I did get the GUD host driver to see that the client device was connected but the only thing visible on the client, even when the host thinks it's outputting video, is a static mess of garbage data I'm not sure if that's down to misconfiguration on my part, something else in the GUD client not working on 5.15, or the device I'm testing on having other unrelated issues (2012 Nexus 7 running a mainline kernel, hence the need for 5.15) I've ordered some extra bits to let me properly test this on a raspberry pi to verify that my host is properly setup but it won't arrive for a while
So I tested with an RPI using the premade image and it worked great, which means something is wrong with the setup on 5.15, I tried to compile a 5.10 kernel using the patches in the repo to verify that the problem is specific to 5.15 but from what I can tell, 0002-drm-Add-GUD-USB-Display-driver.patch
seems to rely on a header file (drm_gem_atomic_helper.h
) that was added in 5.13?
Yeah, you're right, didn't know that. Downstream rpi backports a lot of drm patches, so that's the reason I didn't spot it I guess.
I did a quick test using downstream rpi-5.15.y, ~which is at -rc2~, and that worked at least. That's all I had time to do now, don't know when I can do a pure mainline 5.15 test.
Try modetest on the Nexus to make sure that works, it uses the same dumb buffer that gud_gadget does: https://github.com/notro/gud/wiki/Debug#modetest
The example uses -M gud
to pick the driver, your's would be different ofc, maybe modetest already supports it directly.
I was able to build a kernel in between some other stuff and mainline 5.15.0 is working for me as a gud gadget on a Pi4.
Running the modetest test image locally on the N7 seems to work fine, although it gets stuck and just displays garbage when trying to do the same over GUD. Also something to note is that the tegra drm driver only has a few properties available (EDID, DPMS, link-status, non-desktop and TILE) but I don't think that should cause problems for basic use with GUD. I didn't see anything of note in the host device kernel log and I don't have a good way of watching the log on the nexus but I didn't see anything of note when checking it after testing.
Oh and I think there's more going on than just DRM trouble, connecting the Nexus crashes Gnome when it's running in Wayland (hotplugs and works fine from an RPI) and in X11 to get it to even try outputting anything I have to manually set the provider source with xrandr
Maybe this patch that I hacked up at some point can help you out in the meantime: 0006-Use-dma_buf_map_memcpy_to-fix-vunmap.patch
This patch works for me. See https://gist.github.com/ZenithalHourlyRate/220186818bae434386e80c62ee1bc7bc
Oh and I think there's more going on than just DRM trouble, connecting the Nexus crashes Gnome when it's running in Wayland (hotplugs and works fine from an RPI) and in X11 to get it to even try outputting anything I have to manually set the provider source with xrandr
Same bad experience under Nvidia setup. You may refer to my setup on this crashing issue, I have no idea currently.
The patchset available seems to only work on Linux versions up to 5.10, beyond that it fails to compile, seemingly related to some DRM changes that got made in 5.11.
Are there any plans to support newer kernels? Especially since 5.15 is an LTS release.