aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
diff options
context:
space:
mode:
authorBen Jones <ben.jones@imgtec.com>2011-11-01 17:38:09 +0000
committerErik Gilling <konkers@android.com>2011-11-07 18:10:17 -0800
commita4c720dc4898b089948dc887b9e3eab9987f62ba (patch)
tree98daa08f3cfa235670269dbab8984ae5e6fdfaff /drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
parentc2d94d033992f58410efb9f3df7f8b64b5adc3bf (diff)
downloadkernel_samsung_tuna-a4c720dc4898b089948dc887b9e3eab9987f62ba.zip
kernel_samsung_tuna-a4c720dc4898b089948dc887b9e3eab9987f62ba.tar.gz
kernel_samsung_tuna-a4c720dc4898b089948dc887b9e3eab9987f62ba.tar.bz2
gpu: pvr: Update to DDK 1.8@334506
- Cleaned up interface between OMAP third party display and PVR services. Change-Id: I83efbe2df6e4edb4b9861ffe805c00125fac167a
Diffstat (limited to 'drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c')
-rw-r--r--drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c44
1 files changed, 27 insertions, 17 deletions
diff --git a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
index 0d3a00c..c0a1183 100644
--- a/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
+++ b/drivers/gpu/pvr/omaplfb/omaplfb_displayclass.c
@@ -44,6 +44,9 @@ extern struct ion_client *gpsIONClient;
#endif
#if defined(CONFIG_TI_TILER)
#include <mach/tiler.h>
+#include <video/dsscomp.h>
+#include <plat/dsscomp.h>
+
#endif
#define OMAPLFB_COMMAND_COUNT 1
@@ -868,13 +871,11 @@ static IMG_BOOL ProcessFlipV1(IMG_HANDLE hCmdCookie,
static IMG_BOOL ProcessFlipV2(IMG_HANDLE hCmdCookie,
OMAPLFB_DEVINFO *psDevInfo,
- IMG_VOID **ppvMemInfos,
+ PDC_MEM_INFO *ppsMemInfos,
IMG_UINT32 ui32NumMemInfos,
struct dsscomp_setup_dispc_data *psDssData,
IMG_UINT32 uiDssDataLength)
{
- PVRSRV_KERNEL_MEM_INFO **ppsMemInfos =
- (PVRSRV_KERNEL_MEM_INFO **)ppvMemInfos;
struct tiler_pa_info *apsTilerPAs[5];
IMG_UINT32 i, k;
@@ -894,34 +895,36 @@ static IMG_BOOL ProcessFlipV2(IMG_HANDLE hCmdCookie,
for(i = k = 0; i < ui32NumMemInfos && k < ARRAY_SIZE(apsTilerPAs); i++, k++)
{
struct tiler_pa_info *psTilerInfo;
- LinuxMemArea *psLinuxMemArea;
+ IMG_CPU_VIRTADDR virtAddr;
+ IMG_CPU_PHYADDR phyAddr;
IMG_UINT32 ui32NumPages;
- IMG_UINT32 uiAddr;
+ IMG_SIZE_T uByteSize;
int j;
- psLinuxMemArea = ppsMemInfos[i]->sMemBlk.hOSMemHandle;
- ui32NumPages = (psLinuxMemArea->ui32ByteSize + PAGE_SIZE - 1) >> PAGE_SHIFT;
+ psDevInfo->sPVRJTable.pfnPVRSRVDCMemInfoGetByteSize(ppsMemInfos[i], &uByteSize);
+ ui32NumPages = (uByteSize + PAGE_SIZE - 1) >> PAGE_SHIFT;
apsTilerPAs[k] = NULL;
- uiAddr = (IMG_UINT32) LinuxMemAreaToCpuPAddr(psLinuxMemArea, 0).uiAddr;
+ psDevInfo->sPVRJTable.pfnPVRSRVDCMemInfoGetCpuPAddr(ppsMemInfos[i], 0, &phyAddr);
+
/* NV12 buffers do not need meminfos */
if(psDssData->ovls[k].cfg.color_mode == OMAP_DSS_COLOR_NV12)
{
/* must have still 2 meminfos in array */
BUG_ON(i + 1 >= ui32NumMemInfos);
- psDssData->ovls[k].ba = uiAddr;
+ psDssData->ovls[k].ba = (u32)phyAddr.uiAddr;
i++;
- psLinuxMemArea = ppsMemInfos[i]->sMemBlk.hOSMemHandle;
- psDssData->ovls[k].uv = (u32)LinuxMemAreaToCpuPAddr(psLinuxMemArea, 0).uiAddr;
+ psDevInfo->sPVRJTable.pfnPVRSRVDCMemInfoGetCpuPAddr(ppsMemInfos[i], 0, &phyAddr);
+ psDssData->ovls[k].uv = (u32)phyAddr.uiAddr;
continue;
}
/* check if it is a TILER buffer */
- else if(is_tiler_addr(uiAddr))
+ else if(is_tiler_addr((u32)phyAddr.uiAddr))
{
- psDssData->ovls[k].ba = uiAddr;
+ psDssData->ovls[k].ba = (u32)phyAddr.uiAddr;
continue;
}
@@ -943,12 +946,13 @@ static IMG_BOOL ProcessFlipV2(IMG_HANDLE hCmdCookie,
for(j = 0; j < ui32NumPages; j++)
{
- psTilerInfo->mem[j] =
- (u32)LinuxMemAreaToCpuPAddr(psLinuxMemArea, j << PAGE_SHIFT).uiAddr;
+ psDevInfo->sPVRJTable.pfnPVRSRVDCMemInfoGetCpuPAddr(ppsMemInfos[i], j << PAGE_SHIFT, &phyAddr);
+ psTilerInfo->mem[j] = (u32)phyAddr.uiAddr;
}
/* need base address for in-page offset */
- psDssData->ovls[k].ba = (u32)ppsMemInfos[i]->pvLinAddrKM;
+ psDevInfo->sPVRJTable.pfnPVRSRVDCMemInfoGetCpuVAddr(ppsMemInfos[i], &virtAddr);
+ psDssData->ovls[k].ba = (u32)virtAddr;
apsTilerPAs[k] = psTilerInfo;
}
@@ -956,6 +960,12 @@ static IMG_BOOL ProcessFlipV2(IMG_HANDLE hCmdCookie,
for(i = k; i < psDssData->num_ovls && i < ARRAY_SIZE(apsTilerPAs); i++)
{
unsigned int ix = psDssData->ovls[i].ba;
+ if(ix >= ARRAY_SIZE(apsTilerPAs))
+ {
+ WARN(1, "Invalid clone layer (%u); skipping all cloned layers", ix);
+ psDssData->num_ovls = k;
+ break;
+ }
apsTilerPAs[i] = apsTilerPAs[ix];
psDssData->ovls[i].ba = psDssData->ovls[ix].ba;
psDssData->ovls[i].uv = psDssData->ovls[ix].uv;
@@ -1011,7 +1021,7 @@ static IMG_BOOL ProcessFlip(IMG_HANDLE hCmdCookie,
psFlipCmd2 = (DISPLAYCLASS_FLIP_COMMAND2 *)pvData;
return ProcessFlipV2(hCmdCookie,
psDevInfo,
- psFlipCmd2->ppvMemInfos,
+ psFlipCmd2->ppsMemInfos,
psFlipCmd2->ui32NumMemInfos,
psFlipCmd2->pvPrivData,
psFlipCmd2->ui32PrivDataLength);