Graphic: fix mutex starvation issue when changing live wallpaper many times.
authorPan Zhenjie <zhenjie.pan@intel.com>
Tue, 20 Mar 2012 04:57:16 +0000 (12:57 +0800)
committerbuildbot <buildbot@intel.com>
Fri, 23 Mar 2012 10:34:36 +0000 (03:34 -0700)
BZ: 26394

PVRSRV_BridgeDispatchKM and PVRDRMUnprivCmd have mutex protection in themselves.
So should use DRM_UNLOCKED.
Wallpaper and surfaceflinger will call drm_ioctl.
If do not use DRM_UNLOCKED, PVRSRV_BridgeDispatchKM will be protected by another mutex.
And it will cause mutex starvation issue.

Change-Id: I060f78db4bfeede32cabe581cd86634ac208091f
Signed-off-by: Pan Zhenjie <zhenjie.pan@intel.com>
Reviewed-on: http://android.intel.com:8080/39710
Reviewed-by: Shi, Yang A <yang.a.shi@intel.com>
Reviewed-by: Xu, Randy <randy.xu@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/psb_drv.c

index 5fcb39b..de0a538 100644 (file)
@@ -507,11 +507,11 @@ static struct drm_ioctl_desc psb_ioctls[] = {
        PSB_IOCTL_DEF(DRM_IOCTL_PSB_GETPAGEADDRS,
        psb_getpageaddrs_ioctl,
        DRM_AUTH),
-       PSB_IOCTL_DEF(PVR_DRM_SRVKM_IOCTL, PVRSRV_BridgeDispatchKM, 0),
+       PSB_IOCTL_DEF(PVR_DRM_SRVKM_IOCTL, PVRSRV_BridgeDispatchKM, DRM_UNLOCKED),
        PSB_IOCTL_DEF(PVR_DRM_DISP_IOCTL, PVRDRM_Dummy_ioctl, 0),
        PSB_IOCTL_DEF(PVR_DRM_BC_IOCTL, PVRDRM_Dummy_ioctl, 0),
        PSB_IOCTL_DEF(PVR_DRM_IS_MASTER_IOCTL, PVRDRMIsMaster, DRM_MASTER),
-       PSB_IOCTL_DEF(PVR_DRM_UNPRIV_IOCTL, PVRDRMUnprivCmd, 0),
+       PSB_IOCTL_DEF(PVR_DRM_UNPRIV_IOCTL, PVRDRMUnprivCmd, DRM_UNLOCKED),
        PSB_IOCTL_DEF(DRM_IOCTL_PSB_HIST_ENABLE,
        psb_hist_enable_ioctl,
        DRM_AUTH),