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

Use DRM_CAP_CURSOR_{WIDTH,HEIGTH} for cursor buffer #135

Merged
merged 2 commits into from Dec 11, 2020

Conversation

emersion
Copy link
Collaborator

@emersion emersion commented Dec 2, 2020

This makes it so the buffer for the cursor can pass amdgpu's size checks.

Tested with:

build/gamescope -e -l -d -w 1920 -h 1080 -- steam -tenfoot -steamos

(-w and -h are necessary to remove any scaling because the cursor plane can't be used together with primary plane scaling.)

Then check that the cursor plane is used with drm_info.

This is not ready to be merged because amdgpu prints some errors, oops and the cursor isn't displayed properly. https://gitlab.freedesktop.org/drm/amd/-/issues/1390

@emersion
Copy link
Collaborator Author

emersion commented Dec 2, 2020

Allocating the buffer with VK_IMAGE_TILING_LINEAR fixes all of the amdgpu issues. Will update this patch to properly do it.

@emersion emersion marked this pull request as ready for review December 3, 2020 11:09
@emersion
Copy link
Collaborator Author

emersion commented Dec 3, 2020

This is now working properly on Linux 5.9.10. This is ready for review.

romangg and others added 2 commits December 11, 2020 12:37
Hardware often has cursor plane limitations for the buffer size.

Co-authored-by: Simon Ser <contact@emersion.fr>
The cursor plane needs to be linear on amdgpu.
@emersion
Copy link
Collaborator Author

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7898 is now merged and CC'ed to mesa-stable, so this PR should now work on kernel+mesa latest commit too.

@emersion emersion merged commit 83900ac into ValveSoftware:master Dec 11, 2020
@emersion emersion deleted the cursor-plane branch December 11, 2020 11:39
@jbeich jbeich mentioned this pull request Dec 11, 2020
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.

None yet

2 participants