summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb.h3
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c8
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_linux.c23
3 files changed, 21 insertions, 13 deletions
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb.h b/drivers/gpu/pvr/omaplfb/omaplfb.h
index f16e8e04098..7e46c9063ab 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb.h
+++ b/drivers/gpu/pvr/omaplfb/omaplfb.h
@@ -153,7 +153,8 @@ OMAP_ERROR OMAPLFBInit(void);
OMAP_ERROR OMAPLFBDeinit(void);
void *OMAPLFBAllocKernelMem(unsigned long ulSize);
void OMAPLFBFreeKernelMem(void *pvMem);
-void OMAPLFBWaitForSync(OMAPLFB_DEVINFO *psDevInfo);
+void OMAPLFBPresentSync(OMAPLFB_DEVINFO *psDevInfo,
+ OMAPLFB_FLIP_ITEM *psFlipItem);
OMAP_ERROR OMAPLFBGetLibFuncAddr(char *szFunctionName,
PFN_DC_GET_PVRJTABLE *ppfnFuncTable);
void OMAPLFBFlip(OMAPLFB_SWAPCHAIN *psSwapChain, unsigned long aPhyAddr);
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index 082e2d13f91..c5b0f79b15c 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -1039,13 +1039,9 @@ static void OMAPLFBSyncIHandler(struct work_struct *work)
ulMaxIndex = psSwapChain->ulBufferCount - 1;
/* Iterate through the flip items and flip them if necessary */
- while(psFlipItem->bValid)
- {
- /* Synchronize with the display */
- OMAPLFBWaitForSync(psDevInfo);
+ while (psFlipItem->bValid) {
/* Update display */
- OMAPLFBFlip(psSwapChain,
- (unsigned long)psFlipItem->sSysAddr->uiAddr);
+ OMAPLFBPresentSync(psDevInfo, psFlipItem);
psFlipItem->ulSwapInterval--;
psFlipItem->bFlipped = OMAP_TRUE;
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_linux.c b/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
index 90951f4f439..c8172532d6f 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_linux.c
@@ -229,12 +229,13 @@ void OMAPLFBFlip(OMAPLFB_SWAPCHAIN *psSwapChain, unsigned long aPhyAddr)
#endif
/*
- * Synchronize with the display to prevent tearing
- * On DSI panels the display->sync function is used to handle FRAMEDONE IRQ
- * On DPI panels the display->wait_vsync is used to handle VSYNC IRQ
+ * Present frame and synchronize with the display to prevent tearing
+ * On DSI panels the sync function is used to handle FRAMEDONE IRQ
+ * On DPI panels the wait_for_vsync is used to handle VSYNC IRQ
* in: psDevInfo
*/
-void OMAPLFBWaitForSync(OMAPLFB_DEVINFO *psDevInfo)
+void OMAPLFBPresentSync(OMAPLFB_DEVINFO *psDevInfo,
+ OMAPLFB_FLIP_ITEM *psFlipItem)
{
struct fb_info * framebuffer = psDevInfo->psLINFBInfo;
struct omap_dss_device *display = fb2display(framebuffer);
@@ -250,10 +251,20 @@ void OMAPLFBWaitForSync(OMAPLFB_DEVINFO *psDevInfo)
manager = display->manager;
if (driver && driver->sync &&
- driver->get_update_mode(display) == OMAP_DSS_UPDATE_MANUAL)
+ driver->get_update_mode(display) == OMAP_DSS_UPDATE_MANUAL) {
+ /* Wait first for the DSI bus to be released then update */
err = driver->sync(display);
- else if (manager && manager->wait_for_vsync)
+ OMAPLFBFlip(psDevInfo->psSwapChain,
+ (unsigned long)psFlipItem->sSysAddr->uiAddr);
+ } else if (manager && manager->wait_for_vsync) {
+ /*
+ * Update the video pipelines registers then wait until the
+ * frame is shown with a VSYNC
+ */
+ OMAPLFBFlip(psDevInfo->psSwapChain,
+ (unsigned long)psFlipItem->sSysAddr->uiAddr);
err = manager->wait_for_vsync(manager);
+ }
if (err)
WARNING_PRINTK("Unable to sync with display %u!",