From: Jani Nikula Date: Thu, 5 Jan 2012 13:35:37 +0000 (+0200) Subject: pvr: unifdef pvr power management code for improved readability X-Git-Tag: 2.1b_release~376 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db35dda35277593ce0188e05c2d5e0b25ecb3780;p=kernel%2Fkernel-mfld-blackbay.git pvr: unifdef pvr power management code for improved readability The PVR power management code is difficult to read due to excess #ifdef 1 and #ifdef 0. Remove them. Signed-off-by: Jani Nikula Acked-by: Pauli Nieminen Signed-off-by: Kirill A. Shutemov --- diff --git a/drivers/staging/mrst/pvr/services4/system/unified/sysconfig.c b/drivers/staging/mrst/pvr/services4/system/unified/sysconfig.c index a900e61..561fdd7211 100644 --- a/drivers/staging/mrst/pvr/services4/system/unified/sysconfig.c +++ b/drivers/staging/mrst/pvr/services4/system/unified/sysconfig.c @@ -1168,7 +1168,6 @@ PVRSRV_ERROR SysDevicePrePowerState(IMG_UINT32 ui32DeviceIndex, ospm_power_using_hw_end(OSPM_GRAPHICS_ISLAND); #endif } -#if 1 else if (ui32DeviceIndex == gui32MRSTMSVDXDeviceID) { if (ospm_power_is_hw_on(OSPM_DISPLAY_ISLAND)) { @@ -1178,12 +1177,6 @@ PVRSRV_ERROR SysDevicePrePowerState(IMG_UINT32 ui32DeviceIndex, ospm_power_island_down(OSPM_VIDEO_DEC_ISLAND); ospm_power_island_down(OSPM_DISPLAY_ISLAND); } -#if 0 -#if defined(SUPPORT_DRI_DRM_EXT) - ospm_power_using_hw_end(OSPM_VIDEO_DEC_ISLAND); - ospm_power_using_hw_end(OSPM_DISPLAY_ISLAND); -#endif -#endif } else if (ui32DeviceIndex == gui32MRSTTOPAZDeviceID) { @@ -1195,13 +1188,6 @@ PVRSRV_ERROR SysDevicePrePowerState(IMG_UINT32 ui32DeviceIndex, ospm_power_island_down(OSPM_DISPLAY_ISLAND); } } -#if 0 -#if defined(SUPPORT_DRI_DRM_EXT) - ospm_power_using_hw_end(OSPM_VIDEO_ENC_ISLAND); - ospm_power_using_hw_end(OSPM_DISPLAY_ISLAND); -#endif -#endif -#endif } return PVRSRV_OK; @@ -1223,7 +1209,6 @@ PVRSRV_ERROR SysDevicePostPowerState(IMG_UINT32 ui32DeviceIndex, #endif } -#if 1 else if (ui32DeviceIndex == gui32MRSTMSVDXDeviceID) { PVR_DPF((PVR_DBG_MESSAGE,"SysDevicePrePowerState: Restore MSVDX power")); @@ -1234,21 +1219,6 @@ PVRSRV_ERROR SysDevicePostPowerState(IMG_UINT32 ui32DeviceIndex, ospm_power_island_up(OSPM_VIDEO_DEC_ISLAND); ospm_power_island_down(OSPM_DISPLAY_ISLAND); } -#if 0 -#if defined(SUPPORT_DRI_DRM_EXT) - if (!ospm_power_using_hw_begin(OSPM_DISPLAY_ISLAND, true)) - { - return PVRSRV_ERROR_GENERIC; - } - - if (!ospm_power_using_hw_begin(OSPM_VIDEO_DEC_ISLAND, true)) - { - ospm_power_using_hw_end(OSPM_DISPLAY_ISLAND); - - return PVRSRV_ERROR_GENERIC; - } -#endif -#endif } else if (ui32DeviceIndex == gui32MRSTTOPAZDeviceID) { @@ -1260,23 +1230,7 @@ PVRSRV_ERROR SysDevicePostPowerState(IMG_UINT32 ui32DeviceIndex, ospm_power_island_up(OSPM_VIDEO_ENC_ISLAND); ospm_power_island_down(OSPM_DISPLAY_ISLAND); } -#if 0 -#if defined(SUPPORT_DRI_DRM_EXT) - if (!ospm_power_using_hw_begin(OSPM_DISPLAY_ISLAND, true)) - { - return PVRSRV_ERROR_GENERIC; - } - - if (!ospm_power_using_hw_begin(OSPM_VIDEO_ENC_ISLAND, true)) - { - ospm_power_using_hw_end(OSPM_DISPLAY_ISLAND); - - return PVRSRV_ERROR_GENERIC; - } -#endif -#endif } -#endif } return PVRSRV_OK;