drm/vc4: Fix race between page flip completion event and clean-up
There was a small window where a userspace program could submit a pageflip after receiving a pageflip completion event yet still receive EBUSY. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:

committed by
Eric Anholt

parent
c778cc5df9
commit
26fc78f6fe
@@ -669,6 +669,14 @@ void vc4_disable_vblank(struct drm_device *dev, unsigned int crtc_id)
|
||||
CRTC_WRITE(PV_INTEN, 0);
|
||||
}
|
||||
|
||||
/* Must be called with the event lock held */
|
||||
bool vc4_event_pending(struct drm_crtc *crtc)
|
||||
{
|
||||
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
|
||||
|
||||
return !!vc4_crtc->event;
|
||||
}
|
||||
|
||||
static void vc4_crtc_handle_page_flip(struct vc4_crtc *vc4_crtc)
|
||||
{
|
||||
struct drm_crtc *crtc = &vc4_crtc->base;
|
||||
|
Reference in New Issue
Block a user