We're calling drm_vblank_get() too late. It must be done before the
xchg() to avoid psb_flip_complete() from calling drm_vblank_put() before
drm_vblank_get(). This could trigger a a BUG_ON() in drm_vblank_get().
Earlier the pvr sync callbacks were usually executed with interrupts
disabled, which made the problem extremely unlikely to happen.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Pauli Nieminen <pauli.nieminen@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
write_scanout_regs(pending_flip, pending_flip->offset);
- pending_flip = xchg(&psb_intel_crtc->pending_flip, pending_flip);
-
drm_vblank_get(dev, psb_intel_crtc->pipe);
+ pending_flip = xchg(&psb_intel_crtc->pending_flip, pending_flip);
+
psb_intel_flip_complete(pending_flip);
}