aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
diff options
context:
space:
mode:
authorImagination Technologies Ltd <gpl-support@imgtec.com>2011-06-14 18:59:37 +0100
committerRebecca Schultz Zavin <rebecca@android.com>2011-07-11 17:00:30 -0700
commited393a429c7523371bc4ccfbd7feb2dd7fb9dec0 (patch)
treea3663ece710501d4bf2410934ed7bbc32b170113 /drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
parentec45c8c302de71829ce72fea64f0da2b3c87d5e7 (diff)
downloadkernel_samsung_tuna-ed393a429c7523371bc4ccfbd7feb2dd7fb9dec0.zip
kernel_samsung_tuna-ed393a429c7523371bc4ccfbd7feb2dd7fb9dec0.tar.gz
kernel_samsung_tuna-ed393a429c7523371bc4ccfbd7feb2dd7fb9dec0.tar.bz2
gpu: pvr: Update to DDK 1.8.18.581 Signed-off-by: Imagination Technologies Ltd <gpl-support@imgtec.com> Signed-off-by: Imagination Technologies Ltd <gpl-support@imgtec.com>
Diffstat (limited to 'drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c')
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c57
1 files changed, 50 insertions, 7 deletions
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index 47d8a30..ceea662 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -771,28 +771,71 @@ static IMG_BOOL ProcessFlip(IMG_HANDLE hCmdCookie,
IMG_UINT32 ui32DataSize,
IMG_VOID *pvData)
{
- DISPLAYCLASS_FLIP_COMMAND2 *psFlipCmd;
- OMAPLFB_DEVINFO *psDevInfo;
- OMAPLFB_BUFFER *psBuffer;
+ DISPLAYCLASS_FLIP_COMMAND *psFlipCmd;
+ OMAPLFB_BUFFER *psBuffer = IMG_NULL;
OMAPLFB_SWAPCHAIN *psSwapChain;
+ OMAPLFB_DEVINFO *psDevInfo;
+
if(!hCmdCookie || !pvData)
{
return IMG_FALSE;
}
- psFlipCmd = (DISPLAYCLASS_FLIP_COMMAND2*)pvData;
+ psFlipCmd = (DISPLAYCLASS_FLIP_COMMAND*)pvData;
- if (psFlipCmd == IMG_NULL || sizeof(DISPLAYCLASS_FLIP_COMMAND2) != ui32DataSize)
+ if (psFlipCmd == IMG_NULL)
{
return IMG_FALSE;
}
psDevInfo = (OMAPLFB_DEVINFO*)psFlipCmd->hExtDevice;
- psBuffer = (OMAPLFB_BUFFER*)psFlipCmd->hExtBuffer;
- psSwapChain = (OMAPLFB_SWAPCHAIN*) psFlipCmd->hExtSwapChain;
+ psSwapChain = (OMAPLFB_SWAPCHAIN*)psFlipCmd->hExtSwapChain;
+
+ if(psFlipCmd->hExtBuffer)
+ {
+
+ psBuffer = (OMAPLFB_BUFFER*)psFlipCmd->hExtBuffer;
+ }
+ else
+ {
+
+ typedef struct {
+ IMG_PVOID pvLinAddr;
+ } PVRSRV_KERNEL_MEM_INFO;
+
+ DISPLAYCLASS_FLIP_COMMAND2 *psFlipCmd2;
+ PVRSRV_KERNEL_MEM_INFO *psMemInfo;
+ unsigned long i;
+
+
+ psFlipCmd2 = (DISPLAYCLASS_FLIP_COMMAND2 *)pvData;
+
+
+ psMemInfo = (PVRSRV_KERNEL_MEM_INFO *)psFlipCmd2->ppvMemInfos[0];
+
+
+ for(i = 0; i < psSwapChain->ulBufferCount; i++)
+ {
+ if(psMemInfo->pvLinAddr == psSwapChain->psBuffer[i].sCPUVAddr)
+ {
+ psBuffer = &psSwapChain->psBuffer[i];
+ break;
+ }
+ }
+
+
+ if(!psBuffer)
+ {
+ printk(KERN_WARNING DRIVER_PREFIX
+ ": %s: Device %u: Asked to post unknown buffer\n",
+ __FUNCTION__, psDevInfo->uiFBDevID);
+ psDevInfo->sPVRJTable.pfnPVRSRVCmdComplete(hCmdCookie, IMG_TRUE);
+ return IMG_TRUE;
+ }
+ }
OMAPLFBCreateSwapChainLock(psDevInfo);