From: Ville Syrjälä Date: Thu, 22 Dec 2011 17:06:20 +0000 (+0200) Subject: staging: mrst: Fix BUG_ON() triggering in drm_vblank_put() X-Git-Tag: 2.1b_release~405 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfacdc4dfcaf155f22f61578c326c750624b7912;p=kernel%2Fkernel-mfld-blackbay.git staging: mrst: Fix BUG_ON() triggering in drm_vblank_put() 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ä Reviewed-by: Pauli Nieminen Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/staging/mrst/drv/psb_page_flip.c b/drivers/staging/mrst/drv/psb_page_flip.c index ccc6b80..08a56ad 100644 --- a/drivers/staging/mrst/drv/psb_page_flip.c +++ b/drivers/staging/mrst/drv/psb_page_flip.c @@ -175,10 +175,10 @@ sync_callback(struct pvr_pending_sync *pending_sync) 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); }