Beispiel #1
0
static long msm_axi_subdev_ioctl(struct v4l2_subdev *sd,
			unsigned int cmd, void *arg)
{
	int rc = -ENOIOCTLCMD;
	switch (cmd) {
	case VIDIOC_MSM_AXI_INIT:
		rc = msm_axi_subdev_init(sd,
			(struct msm_cam_media_controller *)arg);
		break;
	case VIDIOC_MSM_AXI_CFG:
		rc = msm_axi_config(sd, arg);
		break;
	case VIDIOC_MSM_AXI_IRQ:
		msm_axi_process_irq(sd, arg);
		rc = 0;
		break;
	case VIDIOC_MSM_AXI_BUF_CFG:
		msm_axi_buf_cfg(sd, arg);
		rc = 0;
		break;
	case VIDIOC_MSM_AXI_RELEASE:
		msm_axi_subdev_release(sd);
		rc = 0;
		break;
	default:
		pr_err("%s: command not found\n", __func__);
	}
	return rc;
}
/* config function simliar to origanl msm_ioctl_config*/
static int msm_isp_config(struct msm_cam_media_controller *pmctl,
			 unsigned int cmd, unsigned long arg)
{

	int rc = -EINVAL;
	void __user *argp = (void __user *)arg;
	struct v4l2_subdev *sd = pmctl->isp_sdev->sd;

	D("%s: cmd %d\n", __func__, _IOC_NR(cmd));
	switch (cmd) {
	case MSM_CAM_IOCTL_PICT_PP_DONE:
		/* Release the preview of snapshot frame
		 * that was grabbed.
		 */
		/*rc = msm_pp_release(pmsm->sync, arg);*/
		break;

	case MSM_CAM_IOCTL_CONFIG_VFE:
		/* Coming from config thread for update */
		rc = msm_config_vfe(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_CONFIG_VPE:
		/* Coming from config thread for update */
		/*rc = msm_config_vpe(pmsm->sync, argp);*/
		rc = 0;
		break;

	case MSM_CAM_IOCTL_AXI_CONFIG:
		D("Received MSM_CAM_IOCTL_AXI_CONFIG\n");
		rc = msm_axi_config(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_RELEASE_STATS_BUFFER:
		rc = msm_put_stats_buffer(sd, pmctl, argp);
		break;

/* HTC_START */
	case MSM_CAM_IOCTL_ENABLE_DROP_FRAME :
		rc = msm_enable_dropframe(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_SET_DROP_FRAME_NUM :
		rc = msm_set_dropframe_num(sd, pmctl, argp);
		break;
/* HTC_END */

	default:
		break;
	}

	D("%s: cmd %d DONE\n", __func__, _IOC_NR(cmd));

	return rc;
}
Beispiel #3
0
static int msm_isp_config(struct msm_cam_media_controller *pmctl,
			 unsigned int cmd, unsigned long arg)
{

	int rc = -EINVAL;
	void __user *argp = (void __user *)arg;
	struct v4l2_subdev *sd = pmctl->isp_sdev->sd;

	D("%s: cmd %d\n", __func__, _IOC_NR(cmd));
	switch (cmd) {
	case MSM_CAM_IOCTL_PICT_PP_DONE:
		
		break;

	case MSM_CAM_IOCTL_CONFIG_VFE:
		
		rc = msm_config_vfe(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_CONFIG_VPE:
		
		
		rc = 0;
		break;

	case MSM_CAM_IOCTL_AXI_CONFIG:
		D("Received MSM_CAM_IOCTL_AXI_CONFIG\n");
		rc = msm_axi_config(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_RELEASE_STATS_BUFFER:
		rc = msm_put_stats_buffer(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_ENABLE_DROP_FRAME :
		rc = msm_enable_dropframe(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_SET_DROP_FRAME_NUM :
		rc = msm_set_dropframe_num(sd, pmctl, argp);
		break;

	default:
		break;
	}

	D("%s: cmd %d DONE\n", __func__, _IOC_NR(cmd));

	return rc;
}
Beispiel #4
0
/* config function simliar to origanl msm_ioctl_config*/
int msm_isp_config(struct msm_cam_media_controller *pmctl,
                   unsigned int cmd, unsigned long arg)
{

    int rc = -EINVAL;
    void __user *argp = (void __user *)arg;
    struct v4l2_subdev *sd;
    if (!pmctl->vfe_sdev) {
        pr_err("%s vfe subdev is NULL\n", __func__);
        return -ENXIO;
    }
    sd = pmctl->vfe_sdev;
    D("%s: cmd %d\n", __func__, _IOC_NR(cmd));
    switch (cmd) {
    case MSM_CAM_IOCTL_CONFIG_VFE:
        /* Coming from config thread for update */
        rc = msm_config_vfe(sd, pmctl, argp);
        break;

    case MSM_CAM_IOCTL_AXI_CONFIG:
#if	0//def F_PANTECH_CAMERA_DEADBEEF_ERROR_FIX
        D("Received MSM_CAM_IOCTL_AXI_CONFIG\n");
#else
        pr_err("%s: Received MSM_CAM_IOCTL_AXI_CONFIG\n", __func__);
#endif
        rc = msm_axi_config(sd, pmctl, argp);
        break;

    case MSM_CAM_IOCTL_RELEASE_STATS_BUFFER:
        rc = msm_put_stats_buffer(sd, pmctl, argp);
        break;

    case MSM_CAM_IOCTL_STATS_REQBUF:
    case MSM_CAM_IOCTL_STATS_ENQUEUEBUF:
    case MSM_CAM_IOCTL_STATS_FLUSH_BUFQ:
    case MSM_CAM_IOCTL_STATS_UNREG_BUF:
        rc = msm_vfe_stats_buf_ioctl(sd, cmd, pmctl, argp);
        break;

    default:
        break;
    }

    D("%s: cmd %d DONE\n", __func__, _IOC_NR(cmd));

    return rc;
}
Beispiel #5
0
/* config function simliar to origanl msm_ioctl_config*/
static int msm_isp_config(struct msm_cam_media_controller *pmctl,
			 unsigned int cmd, unsigned long arg)
{

	int rc = -EINVAL;
	void __user *argp = (void __user *)arg;
	struct v4l2_subdev *sd;

	if (!pmctl->isp_sdev->sd) {
		pr_err("%s vfe subdev is NULL\n", __func__);
		return -ENXIO;
	}
	sd = pmctl->isp_sdev->sd;
	D("%s: cmd %d\n", __func__, _IOC_NR(cmd));
	switch (cmd) {
	case MSM_CAM_IOCTL_PICT_PP_DONE:
		/* Release the preview of snapshot frame
		 * that was grabbed.
		 */
		/*rc = msm_pp_release(pmsm->sync, arg);*/
		break;

	case MSM_CAM_IOCTL_CONFIG_VFE:
		/* Coming from config thread for update */
		rc = msm_config_vfe(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_AXI_CONFIG:
		D("Received MSM_CAM_IOCTL_AXI_CONFIG\n");
		rc = msm_axi_config(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_RELEASE_STATS_BUFFER:
		rc = msm_put_stats_buffer(sd, pmctl, argp);
		break;

	default:
		break;
	}

	D("%s: cmd %d DONE\n", __func__, _IOC_NR(cmd));

	return rc;
}
Beispiel #6
0
/* config function simliar to origanl msm_ioctl_config*/
static int msm_isp_config(struct msm_cam_media_controller *pmctl,
			 unsigned int cmd, unsigned long arg)
{

	int rc = -EINVAL;
	void __user *argp = (void __user *)arg;
	struct v4l2_subdev *sd = pmctl->isp_sdev->sd;

	D("%s: cmd %d\n", __func__, _IOC_NR(cmd));
	switch (cmd) {
	case MSM_CAM_IOCTL_CONFIG_VFE:
		/* Coming from config thread for update */
		rc = msm_config_vfe(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_AXI_CONFIG:
		D("Received MSM_CAM_IOCTL_AXI_CONFIG\n");
		rc = msm_axi_config(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_RELEASE_STATS_BUFFER:
		rc = msm_put_stats_buffer(sd, pmctl, argp);
		break;

	case MSM_CAM_IOCTL_STATS_REQBUF:
	case MSM_CAM_IOCTL_STATS_ENQUEUEBUF:
	case MSM_CAM_IOCTL_STATS_FLUSH_BUFQ:
	case MSM_CAM_IOCTL_STATS_UNREG_BUF:
		rc = msm_vfe_stats_buf_ioctl(sd, cmd, pmctl, argp);
		break;

	default:
		break;
	}

	D("%s: cmd %d DONE\n", __func__, _IOC_NR(cmd));

	return rc;
}