Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drm/gma500: Fix crtc_vblank reference leak when userspace queues mult…
…iple events The gma500 page-flip code kinda assume that userspace never queues more then 1 vblank event. So basically it assume that userspace does: - page-flip - wait for vblank event - render - page-flip - etc. In the case where userspace would submit 2 page-flips without waiting for the first to finish, the current code will just overwrite gma_crtc->page_flip_event with the event from the 2nd page-flip. Before this patch if page-flips are submitted then drm_crtc_vblank_get() will get called twice, where drm_crtc_vblank_put(crtc) will only be run once, since only 1 event will get reported (the last event set in gma_crtc->page_flip_event). Fix the crtc_vblank reference leak by not calling drm_crtc_vblank_get() when replacing a still set gma_crtc->page_flip_event with a new one. And while at it add a warning for when userspace tries to queue multiple page-flips with events attached which gma500 currently does not support. Note this is not a real fix for the issue of the gma500 code not supporting multiple page-flips events being pending, but it at least improves the situation a bit. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
- Loading branch information