MRSTLFB_DEVINFO *psDevInfo = (MRSTLFB_DEVINFO *)arg;
unsigned long ulLockFlags;
MRSTLFB_SWAPCHAIN *psSwapChain;
- printk(KERN_WARNING "MRSTLFBFlipTimerFn trigered\n");
+ MRSTLFB_VSYNC_FLIP_ITEM *psLastItem;
spin_lock_irqsave(&psDevInfo->sSwapChainLock, ulLockFlags);
}
if (psSwapChain->ulRemoveIndex == psSwapChain->ulInsertIndex)
{
- printk(KERN_INFO "MRSTLFBFlipTimerFn: swapchain is empty\n");
- goto ExitUnlock;
+ psLastItem = &(psSwapChain->sLastItem);
+ if (psLastItem->bValid && psLastItem->bFlipped && psLastItem->bCmdCompleted == MRST_FALSE)
+ {
+ MRSTFBFlipComplete(psSwapChain, NULL, MRST_TRUE);
+ goto ExitUnlock;
+ }
}
- printk(KERN_WARNING "MRSTLFBFlipTimerFn: flush flip queue\n");
+ printk(KERN_WARNING "MRSTLFBFlipTimerFn: swapchain is not empty, flush queue\n");
FlushInternalVSyncQueue(psSwapChain, MRST_TRUE);
ExitUnlock:
spin_unlock_irqrestore(&psDevInfo->sSwapChainLock, ulLockFlags);
static MRST_BOOL MRSTLFBVSyncIHandler(MRSTLFB_DEVINFO *psDevInfo, int iPipe)
{
MRST_BOOL bStatus = MRST_FALSE;
- MRSTLFB_VSYNC_FLIP_ITEM *psFlipItem, *psLastItem;
+ MRSTLFB_VSYNC_FLIP_ITEM *psFlipItem;
unsigned long ulMaxIndex;
unsigned long ulLockFlags;
MRSTLFB_SWAPCHAIN *psSwapChain;
psFlipItem = &psSwapChain->psVSyncFlips[psSwapChain->ulRemoveIndex];
}
-
if (psSwapChain->ulRemoveIndex == psSwapChain->ulInsertIndex)
- {
bStatus = MRST_TRUE;
- del_timer(&psDevInfo->sFlipTimer);
- }
else
mod_timer(&psDevInfo->sFlipTimer, FLIP_TIMEOUT + jiffies);
ExitUnlock: