Overlay plane: position not updated when CRTC_X is negative
Brief summary of the problem:
I'm using an overlay plane to display a 24x24 buffer. I'm moving it around by changing its position (CRTC_X
and CRTC_Y
).
Sometimes I set a negative position for the plane. For instance:
│ ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 227
│ ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = -4
This seems to work fine as long as CRTC_Y
is negative. However, when I set CRTC_X
to a negative value like so:
│ ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = -4
│ ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 123
The update is ignored by amdgpu, and the overlay is stuck in the previous positive position.
In other words, after setting CRTC_X
to a negative value, all CRTC_Y
changes are ignored.
Hardware description:
- CPU: AMD Ryzen 5 3500U
- GPU: APU (PCI 1002:15d8 Advanced Micro Devices, Inc. [AMD/ATI] Picasso)
- System Memory: 6GiB
- Display(s): integrated screen
- Type of Diplay Connection: eDP
System infomration:
- Distro name and Version: Arch Linux
- Kernel version: ~agd5f/linux, drm-next branch, commit 7ff818f97c30
- Custom kernel: N/A
- AMD package version: N/A
How to reproduce the issue:
- Clone gamescope
- Apply this patch to stop setting
ALLOW_MODESET
on all commits: https://l.sr.ht/DHTC.txt - Build gamescope
- Run it with Steam and enable use of KMS planes:
build/gamescope -e -l -d -- steam -tenfoot -steamos >gamescope.log 2>&1
- Start Portal 1
- Move the cursor to the left edge of the screen, then move it vertically
Edited by Simon Ser