Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client support for Linux >5.10 #7

Open
TuxThePenguin0 opened this issue Nov 7, 2021 · 9 comments
Open

Client support for Linux >5.10 #7

TuxThePenguin0 opened this issue Nov 7, 2021 · 9 comments

Comments

@TuxThePenguin0
Copy link

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.

@notro
Copy link
Owner

notro commented Nov 8, 2021

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

@TuxThePenguin0
Copy link
Author

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

@TuxThePenguin0
Copy link
Author

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?

@notro
Copy link
Owner

notro commented Nov 14, 2021

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.

@notro
Copy link
Owner

notro commented Nov 14, 2021

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.

@notro
Copy link
Owner

notro commented Nov 14, 2021

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.

@TuxThePenguin0
Copy link
Author

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.

@TuxThePenguin0
Copy link
Author

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

@ZenithalHourlyRate
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants