On 2/19/26 14:59, Michel Dänzer wrote:
Can't the issue be solved by fixing the pflip_status handling in the vblank
handler?
I guess that might also hit the second race condition:
- If vblank is disabled by the off-delay timer before the handler
runs, the PENDING cursor event is never delivered and the commit hangs.
That sounds like the drm_crtc_vblank_get/put handling might be incorrect in
amdgpu_dm.
In a nutshell, the vblank interrupt is kept enabled as long as there have been
more
drm_crtc_vblank_get calls than _put ones for the CRTC. I.e. amdgpu_dm needs to
call the former under circumstances where it needs the interrupt to be on, and
the latter only once it's no longer needed for those circumstances (in this
case when sending the event).
The get/put pairing seems correct, the issue is that cursor and pflip
share the same acrtc->event slot, so the pflip_status check in the
vblank handler can race. Adding a dedicated cursor_event field, separate
from event used by pflip, could maybe solve the whole thing?