]> git.openpandora.org Git - sgx.git/commitdiff
gpu: pvr: remove unused function args from PVRSRVSetDevicePowerStateKM
authorImre Deak <imre.deak@nokia.com>
Mon, 5 Apr 2010 21:49:06 +0000 (00:49 +0300)
committerGrazvydas Ignotas <notasas@gmail.com>
Sun, 20 May 2012 18:09:40 +0000 (21:09 +0300)
The CallerID parameter was anyway a horrible concept in terms of
understanding what the function is supposed to do when ISR_ID, KERNEL_ID
or TIMER_ID is passed. Function arguments should never have such "high
level" meaning, but rather denote much more concrete things. In this case
for example whether we should mutex_lock() or mutex_trylock() for a
certain lock. Better yet we should have separate functions for the two
cases to keep the function body as simple as possible.

Happily the CallerID and RetainMutex arguments are unused now, so they
can be removed.

Signed-off-by: Imre Deak <imre.deak@nokia.com>
CC: Mark Underwood <mark.underwood@imgtec.com>
CC: Mark Riding <mark.riding@imgtec.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@nokia.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@nokia.com>
pvr/power.c
pvr/power.h
pvr/pvr_debug.c
pvr/pvrsrv.c
pvr/sgxinit.c
pvr/sgxutils.c

index 8a0821eba1e1aba763a5b17e0e124f9546cc4a41..a33e0de81c47a0f1d4a0bddd4b72c7a392b3205f 100644 (file)
@@ -208,8 +208,7 @@ static enum PVRSRV_ERROR PVRSRVDevicePostPowerStateKM(IMG_BOOL bAllDevices,
 }
 
 enum PVRSRV_ERROR PVRSRVSetDevicePowerStateKM(u32 ui32DeviceIndex,
-                                    enum PVR_POWER_STATE eNewPowerState,
-                                    u32 ui32CallerID, IMG_BOOL bRetainMutex)
+                                    enum PVR_POWER_STATE eNewPowerState)
 {
        enum PVRSRV_ERROR eError;
        struct SYS_DATA *psSysData;
index 53dd6a35e8925ddf8ebe0193817cece23d46788a..a5d00e2a1a94d3a2ad088e0179088d40b9e531d5 100644 (file)
@@ -61,8 +61,7 @@ enum PVRSRV_ERROR PVRSRVSetInitServerState(enum PVRSRV_INIT_SERVER_STATE
                IMG_BOOL bState);
 
 enum PVRSRV_ERROR PVRSRVSetDevicePowerStateKM(u32 ui32DeviceIndex,
-               enum PVR_POWER_STATE eNewPowerState, u32 ui32CallerID,
-               IMG_BOOL bRetainMutex);
+               enum PVR_POWER_STATE eNewPowerState);
 
 enum PVRSRV_ERROR PVRSRVSystemPrePowerStateKM(
                enum PVR_POWER_STATE eNewPowerState);
index b3a05a2a2a4c10901603c27609786cfbf8428395..469d522cb940fe687ee31b024c4d663bc4687d9e 100644 (file)
@@ -289,8 +289,7 @@ static int pvr_dbg_reset(void *data, u64 val)
        }
 
        err = PVRSRVSetDevicePowerStateKM(node->sDevId.ui32DeviceIndex,
-                                            PVRSRV_POWER_STATE_D0,
-                                            KERNEL_ID, IMG_TRUE);
+                                            PVRSRV_POWER_STATE_D0);
        if (err != PVRSRV_OK) {
                r = -EIO;
                goto exit;
index 2a11fe6451c6e4ba1999de53cbcbcc95da2a4f81..30d9c631e8f540acc68fe4197541ce275eeb6e70 100644 (file)
@@ -316,10 +316,9 @@ enum PVRSRV_ERROR PVRSRVFinaliseSystem(IMG_BOOL bInitSuccessful)
                psDeviceNode = psSysData->psDeviceNodeList;
                while (psDeviceNode) {
                        eError =
-                           PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId.
-                                               ui32DeviceIndex,
-                                               PVRSRV_POWER_Unspecified,
-                                               KERNEL_ID, IMG_FALSE);
+                           PVRSRVSetDevicePowerStateKM(
+                                       psDeviceNode->sDevId.ui32DeviceIndex,
+                                       PVRSRV_POWER_Unspecified);
                        if (eError != PVRSRV_OK)
                                PVR_DPF(PVR_DBG_ERROR, "PVRSRVFinaliseSystem: "
                                        "Failed PVRSRVSetDevicePowerStateKM "
@@ -439,8 +438,7 @@ enum PVRSRV_ERROR PVRSRVDeinitialiseDevice(u32 ui32DevIndex)
 FoundDevice:
 
        eError = PVRSRVSetDevicePowerStateKM(ui32DevIndex,
-                                            PVRSRV_POWER_STATE_D3,
-                                            KERNEL_ID, IMG_FALSE);
+                                            PVRSRV_POWER_STATE_D3);
        if (eError != PVRSRV_OK) {
                PVR_DPF(PVR_DBG_ERROR, "PVRSRVDeinitialiseDevice: "
                                "Failed PVRSRVSetDevicePowerStateKM call");
index a84c7ee07d0d6dc0b8d078072d4ec89c6f0dc2b7..5fa2e0f7bd02c1781874ea1c781d35d21566bfb9 100644 (file)
@@ -911,8 +911,7 @@ static void SGX_MISRHandler(void *pvData)
         * released when returning from the function.
         */
        dev_idx = psDeviceNode->sDevId.ui32DeviceIndex;
-       err = PVRSRVSetDevicePowerStateKM(dev_idx, PVRSRV_POWER_STATE_D0,
-                                         ISR_ID, IMG_FALSE);
+       err = PVRSRVSetDevicePowerStateKM(dev_idx, PVRSRV_POWER_STATE_D0);
        BUG_ON(err != PVRSRV_OK);
 
        l1 = readl(&psSGXHostCtl->ui32InterruptFlags);
index aac6d51e7c0e1c4be39c2b9a5e3577f7141614f6..beb8a57ee962b8ba5b95aab7f383639f63f2d9e9 100644 (file)
@@ -89,10 +89,9 @@ void SGXTestActivePowerEvent(struct PVRSRV_DEVICE_NODE *psDeviceNode,
 
        PDUMPSUSPEND();
 
-       eError = PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId.
-                                       ui32DeviceIndex,
-                                       PVRSRV_POWER_STATE_D3,
-                                       ui32CallerID, IMG_FALSE);
+       eError = PVRSRVSetDevicePowerStateKM(
+                                       psDeviceNode->sDevId.ui32DeviceIndex,
+                                       PVRSRV_POWER_STATE_D3);
        if (eError == PVRSRV_OK)
                SGXPostActivePowerEvent(psDeviceNode, ui32CallerID);
        if (eError == PVRSRV_ERROR_RETRY) {
@@ -269,8 +268,7 @@ enum PVRSRV_ERROR SGXScheduleCCBCommandKM(
 
        eError =
            PVRSRVSetDevicePowerStateKM(psDeviceNode->sDevId.ui32DeviceIndex,
-                                       PVRSRV_POWER_STATE_D0, ui32CallerID,
-                                       IMG_TRUE);
+                                       PVRSRV_POWER_STATE_D0);
 
        PDUMPRESUME();