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

drm/vc4: Add async update support for cursor planes #5141

Merged
merged 2 commits into from
Aug 24, 2022

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Aug 23, 2022

Now that cursors are implemented as regular planes, all cursor
movements result in atomic updates. As the firmware-kms driver
doesn't support asynchronous updates, these are synchronous, which
limits the update rate to the screen refresh rate. Xorg seems unaware
of this (or at least of the effect of this), because if the mouse is
configured with a higher update rate than the screen then continuous
mouse movement results in an increasing backlog of mouse events -
cue extreme lag.

Add minimal support for asynchronous updates - limited to cursor
planes - to eliminate the lag.

Signed-off-by: Phil Elwell [email protected]

@pelwell pelwell changed the title drm/vc4: Add async update support cursor planes drm/vc4: Add async update support for cursor planes Aug 23, 2022
@pelwell
Copy link
Contributor Author

pelwell commented Aug 23, 2022

How does this look to you, @mripard? It has the desired effect in the limited testing I have done (with usbhid.mousepoll=5 to increase the severity of the problem).

@popcornmix
Copy link
Collaborator

For background #4971 introduced the issue with fkms.
It was reported in #4988, so @Dark-Sky may be interested in testing.
We've seen a few reports on forum as 4971 has made it to apt.

While the issue only affects fkms users (which is deprecated), its still useful as a debugging test or a workaround for an upstream bug, so I agree this workaround is worthwhile (it fixed the issue in my testing).

Now that cursors are implemented as regular planes, all cursor
movements result in atomic updates. As the firmware-kms driver
doesn't support asynchronous updates, these are synchronous, which
limits the update rate to the screen refresh rate. Xorg seems unaware
of this (or at least of the effect of this), because if the mouse is
configured with a higher update rate than the screen then continuous
mouse movement results in an increasing backlog of mouse events -
cue extreme lag.

Add minimal support for asynchronous updates - limited to cursor
planes - to eliminate the lag.

See: raspberrypi#4971
     raspberrypi#4988

Signed-off-by: Phil Elwell <[email protected]>
@pelwell pelwell marked this pull request as ready for review August 24, 2022 09:08
@pelwell pelwell merged commit 004a1de into raspberrypi:rpi-5.15.y Aug 24, 2022
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Aug 24, 2022
See: raspberrypi/linux#5141

kernel: rpi-simple-soundcard: limits sample rate of Merus Amp board
See: raspberrypi/linux#5144
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Aug 24, 2022
See: raspberrypi/linux#5141

kernel: rpi-simple-soundcard: limits sample rate of Merus Amp board
See: raspberrypi/linux#5144
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

Successfully merging this pull request may close these issues.

3 participants