gpu: pvr: remove ABI compatibility hack from SGXInitPart2 IOCTL
authorImre Deak <imre.deak@nokia.com>
Wed, 9 Feb 2011 23:43:50 +0000 (01:43 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:43:02 +0000 (21:43 +0300)
By now everyone should have a recent enough kernel/user space library,
so this isn't needed.

This reverts commit 743ccd092b08b1e033c0a95648033afa057887d8.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
pvr/bridged_pvr_bridge.c
pvr/bridged_sgx_bridge.c
pvr/bridged_sgx_bridge.h
pvr/perproc.h
pvr/sgx_bridge_km.h
pvr/sgxinit.c

index f95335f..7409816 100644 (file)
@@ -3225,7 +3225,7 @@ static int bridged_ioctl(struct file *filp, u32 cmd, void *in, void *out,
                err = SGXGetInfoForSrvinitBW(cmd, in, out, per_proc);
                break;
        case PVRSRV_BRIDGE_SGX_DEVINITPART2:
-               err = SGXDevInitPart2BW(cmd, in, out, in_size, per_proc);
+               err = SGXDevInitPart2BW(cmd, in, out, per_proc);
                break;
 
        case PVRSRV_BRIDGE_SGX_FINDSHAREDPBDESC:
index 37c2b89..dabcaa4 100644 (file)
@@ -519,8 +519,7 @@ int SGXReadDiffCountersBW(u32 ui32BridgeID,
                                psSGXReadDiffCountersIN->ui32CountersReg,
                                &psSGXReadDiffCountersOUT->ui32Time,
                                &psSGXReadDiffCountersOUT->bActive,
-                               &psSGXReadDiffCountersOUT->sDiffs,
-                               psPerProc->edm_compat_abi);
+                               &psSGXReadDiffCountersOUT->sDiffs);
 
        return 0;
 }
@@ -572,38 +571,9 @@ int SGXReadHWPerfCBBW(u32 ui32BridgeID,
        return 0;
 }
 
-static int fixup_compat_format(struct PVRSRV_PER_PROCESS_DATA *psPerProc,
-                              struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2 *info,
-                              size_t size)
-{
-       void **edm_buf;
-
-       if (size == sizeof(*info)) {
-               psPerProc->edm_compat_abi = 0;
-               return 0;
-       }
-
-       edm_buf = &info->sInitInfo.hKernelEDMStatusBufferMemInfo;
-
-       if (size + sizeof(*edm_buf) != sizeof(*info))
-               return -EFAULT;
-
-       /*
-        * remainder of the compat struct size after the
-        * hKernelEDMStatusBufferMemInfo field
-        */
-       size -= offsetof(struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2,
-                        sInitInfo.hKernelEDMStatusBufferMemInfo);
-       memmove(edm_buf + 1, edm_buf, size);
-       *edm_buf = NULL;
-       psPerProc->edm_compat_abi = 1;
-
-       return 0;
-}
-
 int SGXDevInitPart2BW(u32 ui32BridgeID,
                struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2 *psSGXDevInitPart2IN,
-               struct PVRSRV_BRIDGE_RETURN *psRetOUT, size_t in_size,
+               struct PVRSRV_BRIDGE_RETURN *psRetOUT,
                struct PVRSRV_PER_PROCESS_DATA *psPerProc)
 {
        void *hDevCookieInt;
@@ -622,11 +592,6 @@ int SGXDevInitPart2BW(u32 ui32BridgeID,
                return 0;
        }
 
-       if (fixup_compat_format(psPerProc, psSGXDevInitPart2IN, in_size) < 0) {
-               psRetOUT->eError = PVRSRV_ERROR_INVALID_PARAMS;
-               return 0;
-       }
-
        psRetOUT->eError = PVRSRVLookupHandle(psPerProc->psHandleBase,
                                                &hDevCookieInt,
                                                psSGXDevInitPart2IN->hDevCookie,
index 4806cb4..91e5b67 100644 (file)
@@ -77,7 +77,7 @@ int SGXReadHWPerfCBBW(u32 ui32BridgeID,
 
 int SGXDevInitPart2BW(u32 ui32BridgeID,
        struct PVRSRV_BRIDGE_IN_SGXDEVINITPART2 *psSGXDevInitPart2IN,
-       struct PVRSRV_BRIDGE_RETURN *psRetOUT, size_t in_size,
+       struct PVRSRV_BRIDGE_RETURN *psRetOUT,
        struct PVRSRV_PER_PROCESS_DATA *psPerProc);
 
 int SGXRegisterHWRenderContextBW(u32 ui32BridgeID,
index 11b132a..a89b0e4 100644 (file)
@@ -45,11 +45,6 @@ struct PVRSRV_PER_PROCESS_DATA {
        IMG_BOOL bInitProcess;
 
        void *hOsPrivateData;
-
-       int edm_compat_abi;             /*
-                                        * set if old ABI is used to pass the
-                                        * EDM trace buffer address.
-                                        */
 };
 
 struct PVRSRV_PER_PROCESS_DATA *PVRSRVPerProcessData(u32 ui32PID);
index 2990521..3389b0c 100644 (file)
@@ -61,8 +61,7 @@ enum PVRSRV_ERROR SGXReadDiffCountersKM(void *hDevHandle, u32 ui32Reg,
                            u32 *pui32Old, IMG_BOOL bNew, u32 ui32New,
                            u32 ui32NewReset, u32 ui32CountersReg,
                            u32 *pui32Time, IMG_BOOL *pbActive,
-                           struct PVRSRV_SGXDEV_DIFF_INFO *psDiffs,
-                           int edm_compat_abi);
+                           struct PVRSRV_SGXDEV_DIFF_INFO *psDiffs);
 enum PVRSRV_ERROR SGXReadHWPerfCBKM(void *hDevHandle, u32 ui32ArraySize,
                            struct PVRSRV_SGX_HWPERF_CB_ENTRY *psHWPerfCBData,
                            u32 *pui32DataCount, u32 *pui32ClockSpeed,
index 7f591a6..0896c32 100644 (file)
@@ -1540,8 +1540,7 @@ enum PVRSRV_ERROR SGXReadDiffCountersKM(void *hDevHandle, u32 ui32Reg,
                                   u32 *pui32Old, IMG_BOOL bNew, u32 ui32New,
                                   u32 ui32NewReset, u32 ui32CountersReg,
                                   u32 *pui32Time, IMG_BOOL *pbActive,
-                                  struct PVRSRV_SGXDEV_DIFF_INFO *psDiffs,
-                                  int edm_compat_abi)
+                                  struct PVRSRV_SGXDEV_DIFF_INFO *psDiffs)
 {
        struct SYS_DATA *psSysData;
        struct PVRSRV_POWER_DEV *psPowerDevice;
@@ -1581,7 +1580,6 @@ enum PVRSRV_ERROR SGXReadDiffCountersKM(void *hDevHandle, u32 ui32Reg,
                sNew.ui32Time[0] = OSClockus();
                *pui32Time = sNew.ui32Time[0];
                if (sNew.ui32Time[0] != psPrev->ui32Time[0] && bPowered) {
-                       u32 __iomem *time_wraps;
 
                        *pui32Old =
                            OSReadHWReg(psDevInfo->pvRegsBaseKM, ui32Reg);
@@ -1608,10 +1606,8 @@ enum PVRSRV_ERROR SGXReadDiffCountersKM(void *hDevHandle, u32 ui32Reg,
                        sNew.ui32Marker[0] = psDevInfo->ui32KickTACounter;
                        sNew.ui32Marker[1] = psDevInfo->ui32KickTARenderCounter;
 
-                       time_wraps = &psDevInfo->psSGXHostCtl->ui32TimeWraps;
-                       if (edm_compat_abi)
-                               time_wraps -= 1;
-                       sNew.ui32Time[1] = readl(time_wraps);
+                       sNew.ui32Time[1] = readl(
+                               &psDevInfo->psSGXHostCtl->ui32TimeWraps);
 
                        for (i = 0; i < PVRSRV_SGX_DIFF_NUM_COUNTERS; ++i) {
                                psDiffs->aui32Counters[i] =