.
										   ScenHw));
				if ((Disable.
				     PipeMask & CamPipeMgr_GtePipeLockTable(CamPipeMgr.Mode.ScenSw,
									    CamPipeMgr.Mode.
									    ScenHw))!=
				    Disable.PipeMask) {
					LOG_ERR("DISABLE_PIPE:Some pipe are not available");
					Ret = -EFAULT;
				} else {
					CamPipeMgr_SpinLock();
					CamPipeMgr.PipeLockTable[CamPipeMgr.Mode.ScenHw] &=
					    (~Disable.PipeMask);
					CamPipeMgr_SpinUnlock();
				}
			} else {
				LOG_ERR("DISABLE_PIPE:copy_from_user fail");
				Ret = -EFAULT;
			}
			break;
		}
		/*  */
	case CAM_PIPE_MGR_VENCPLL_CTRL:
		{
			if (copy_from_user
			    (&vencpll_ctrlEnum, (void *)Param,
			     sizeof(CAM_PIPE_MGR_CMD_VECNPLL_CTRL_ENUM)) == 0) {
			    unsigned int segment_code = (get_devinfo_with_index(47) >> 25) & 0x7F;
				LOG_MSG("VPLL CTRL(%d)", vencpll_ctrlEnum);
				if (vencpll_ctrlEnum == CAM_PIPE_MGR_CMD_VECNPLL_CTRL_SET_HIGH) {
					switch (segment_code) {
					   case 0x4A:
					   case 0x4B:
					   case 0x52:
					   case 0x53:
						mmdvfs_set_step(MMDVFS_SCEN_ISP, MMDVFS_VOLTAGE_HIGH); /* Voltage: can't be skip */
						mmdvfs_set_mmsys_clk(MMDVFS_SCEN_ISP, MMSYS_CLK_HIGH);
						//err = mt_dfs_vencpll(0x1713B1);	/* 300MHz */
						break;
					   default:
						err = mt_dfs_vencpll(0x1713B1);	/* 300MHz */
						if (err) {
							LOG_ERR("DISABLE_PIPE SET HIGH fail");
							Ret = -EFAULT;
						}
						break;
					}
				} else if (vencpll_ctrlEnum ==
					   CAM_PIPE_MGR_CMD_VECNPLL_CTRL_SET_LOW) {
					switch (segment_code) {
					   case 0x4A:
					   case 0x4B:
					   case 0x52:
					   case 0x53:
						mmdvfs_set_mmsys_clk(MMDVFS_SCEN_ISP, MMSYS_CLK_LOW); /* Frequency */
						mmdvfs_set_step(MMDVFS_SCEN_ISP, MMDVFS_VOLTAGE_LOW); /* Voltage: for power saving*/
						break;
					   default:
						err = mt_dfs_vencpll(0xE0000);	/* 182MHz */
						if (err) {
							LOG_ERR("DISABLE_PIPE SET LOW fail");
							Ret = -EFAULT;
						}
						break;
					}
				}
			} else {
				LOG_ERR("VENCPLL_CTRL:copy_from_user fail");
				Ret = -EFAULT;
			}
			break;
		}
		/*  */
	default:
		{
			LOG_ERR("Unknown cmd");
			Ret = -EFAULT;
			break;
		}
	}
	/*  */
EXIT:
	if (Ret!= 0) {
		if ((CamPipeMgr.LogMask & Lock.PipeMask) ||
		    (CamPipeMgr.Mode.ScenSw == CAM_PIPE_MGR_SCEN_SW_NONE)) {
			LOG_ERR("Fail");
			LOG_ERR("Cur:Name(%s),pid(%d),tgid(%d),Time(%ld.%06ld)",
				current->comm, current->pid, current->tgid, Sec, USec);
			if (pFile->private_data!= NULL) {
				LOG_ERR
				    ("Proc:Name(%s),Pid(%d),Tgid(%d),PipeMask(0x%lX),Time(%ld.%06ld)",
				     pProc->ProcName, pProc->Pid, pProc->Tgid, pProc->PipeMask, Sec,
				     USec);
			}
			CamPipeMgr_DumpPipeInfo();
		}
	}
	return Ret;
}

#ifdef CONFIG_COMPAT

static int compat_get_campipe_lock_data(compat_CAM_PIPE_MGR_LOCK_STRUCT __user *data32,
					CAM_PIPE_MGR_LOCK_STRUCT __user *data)
{
	compat_uint_t tmp;
	int err;

	err = get_user(tmp, &data32->PipeMask);
	err |= put_user(tmp, &data->PipeMask);
	err |= get_user(tmp, &data32->Timeout);
	err |= put_user(tmp, &data->Timeout);
	return err;
}


static int compat_put_campipe_lock_data(compat_CAM_PIPE_MGR_LOCK_STRUCT __user *data32,
					CAM_PIPE_MGR_LOCK_STRUCT __user *data)
{
	compat_uint_t tmp;
	int err;

	err = get_user(tmp, &data->PipeMask);
	err |= put_user(tmp, &data32->PipeMask);
	err |= get_user(tmp, &data->Timeout);
	err |= put_user(tmp, &data32->Timeout);
	return err;
}

static int compat_get_campipe_unlock_data(compat_CAM_PIPE_MGR_UNLOCK_STRUCT __user *data32,
					  CAM_PIPE_MGR_UNLOCK_STRUCT __user *data)
{
	compat_uint_t tmp;
	int err;

	err = get_user(tmp, &data32->PipeMask);
	err |= put_user(tmp, &data->PipeMask);
	return err;
}


static int compat_put_campipe_unlock_data(compat_CAM_PIPE_MGR_UNLOCK_STRUCT __user *data32,
					  CAM_PIPE_MGR_UNLOCK_STRUCT __user *data)
{
	compat_uint_t tmp;
	int err;

	err = get_user(tmp, &data->PipeMask);
	err |= put_user(tmp, &data32->PipeMask);
	return err;
}

static int compat_get_campipe_mode_data(compat_CAM_PIPE_MGR_MODE_STRUCT __user *data32,
					CAM_PIPE_MGR_MODE_STRUCT __user *data)
{
	compat_uint_t tmp;
	int err;

	err = get_user(tmp, &data32->ScenSw);
	err |= put_user(tmp, &data->ScenSw);
	err = get_user(tmp, &data32->ScenHw);
	err |= put_user(tmp, &data->ScenHw);
	err = get_user(tmp, &data32->Dev);
	err |= put_user(tmp, &data->Dev);
	return err;
}


static int compat_put_campipe_mode_data(compat_CAM_PIPE_MGR_MODE_STRUCT __user *data32,
					CAM_PIPE_MGR_MODE_STRUCT __user *data)
{
	compat_uint_t tmp;
	int err;

	err = get_user(tmp, &data->ScenSw);
	err |= put_user(tmp, &data32->ScenSw);
	err = get_user(tmp, &data->ScenHw);
	err |= put_user(tmp, &data32->ScenHw);
	err = get_user(tmp, &data->Dev);
	err |= put_user(tmp, &data32->Dev);
	return err;
}

static int compat_get_campipe_enpipe_data(compat_CAM_PIPE_MGR_ENABLE_STRUCT __user *data32