You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Negative coordinate on a vc4 cursor plane is causing giant cursor to be displayed #3735
I discovered that strange behavior while trying to enable 2 monitors for RPi4 in wlroot (swaywm/wlroots#1943). When a vc4 drm cursor plane is set to a negative position larger than its size (so it should be completely invisible) then the giant version appears on screen. Negative coordinates are unusual but not illegal.
In most clients, the cursor plane is automatically disabled when it leaves the screen so the best way to reproduce the problem is probably to edit the sources of an existing X11 or Wayland compositor by adding a negative offset to the cursor plane coordinates. The video was obtained with sway/wlroot by subtracting 100 from conn->cursor_x at https://github.com/swaywm/wlroots/blob/751a21d94f1b4f0345d040ddfd54b723631d5991/backend/drm/atomic.c#L234
so something has gone very odd in the translation. I think the function to clamp negative offsets doesn't deal with totally offscreen elements well. It's tried to scale down the source rectangle so that the dest rectangle has positive offsets, but has failed to notice that it then leaves both rectangles with daft values in.
An offscreen element obviously doesn't want to get passed to the composition pipeline because it's going to do nothing, but if I kill it at the KMS level then I make the situation in resolving the vsync callback issue. Such fun.
Activity
schauveau commentedon Jul 18, 2020
In forgot to indicate that I am currently on ubuntu 20.04
6by9 commentedon Aug 5, 2020
Yup, something goes funny in the cropping.
The kernel is logging
which is as I'd expect (source rect is *65536).
The firmware is then listing that resource as
so something has gone very odd in the translation. I think the function to clamp negative offsets doesn't deal with totally offscreen elements well. It's tried to scale down the source rectangle so that the dest rectangle has positive offsets, but has failed to notice that it then leaves both rectangles with daft values in.
An offscreen element obviously doesn't want to get passed to the composition pipeline because it's going to do nothing, but if I kill it at the KMS level then I make the situation in resolving the vsync callback issue. Such fun.
6by9 commentedon Aug 5, 2020
OK, found the cause, and it wasn't as hideous as I thought.
Firmware patch posted internally for review, and it'll get released in due course.
firmware: arm_loader: Don't try to load to 0 a.k.a. NULL
firmware: arm_loader: Don't try to load to 0 a.k.a. NULL
popcornmix commentedon Aug 5, 2020
rpi-update firmware should have a fix for this
verup and ...