}
static void
-psb_intel_flip_complete(struct pending_flip *pending_flip)
+psb_intel_flip_complete(struct pending_flip *pending_flip,
+ bool failed_vblank_get)
{
if (pending_flip) {
struct drm_crtc *crtc = pending_flip->crtc;
int pipe = psb_intel_crtc->pipe;
send_page_flip_event(dev, pipe, pending_flip);
- drm_vblank_put(dev, pipe);
+ if (!failed_vblank_get)
+ drm_vblank_put(dev, pipe);
increase_read_ops_completed(pending_flip->old_mem_info);
PVRSRVScheduleDeviceCallbacks();
pending_flip = xchg(&psb_intel_crtc->pending_flip, NULL);
- psb_intel_flip_complete(pending_flip);
+ psb_intel_flip_complete(pending_flip, false);
}
static void
write_scanout_regs(pending_flip, pending_flip->offset);
- drm_vblank_get(dev, psb_intel_crtc->pipe);
+ if (drm_vblank_get(dev, psb_intel_crtc->pipe)) {
+ psb_intel_flip_complete(pending_flip, true);
+ pending_flip = NULL;
+ }
pending_flip = xchg(&psb_intel_crtc->pending_flip, pending_flip);
- psb_intel_flip_complete(pending_flip);
+ psb_intel_flip_complete(pending_flip, false);
}
int