Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6524e925 authored by Anomalchik's avatar Anomalchik Committed by Razziell
Browse files

camera_v2_markw: extended camera debug

parent f06cd142
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2604,10 +2604,10 @@ CONFIG_MSM_VIDC_GOVERNORS=y
# QTI MSM Camera And Video & AIS
#
CONFIG_MSM_CAMERA=y
# CONFIG_MSM_CAMERA_DEBUG is not set
CONFIG_MSM_CAMERA_DEBUG=y
# CONFIG_MSM_CAMERA_AUTOMOTIVE is not set
CONFIG_MSMB_CAMERA=y
# CONFIG_MSMB_CAMERA_DEBUG is not set
CONFIG_MSMB_CAMERA_DEBUG=y
CONFIG_MSM_CAMERA_SENSOR=y
CONFIG_MSM_CPP=y
CONFIG_MSM_CCI=y
@@ -2832,7 +2832,7 @@ CONFIG_FB_MSM=y
# CONFIG_FB_SIMPLE is not set
# CONFIG_MSM_BA_V4L2 is not set
CONFIG_MSM_DBA=y
CONFIG_MSM_DBA_ADV7533=y
# CONFIG_MSM_DBA_ADV7533 is not set
CONFIG_FB_MSM_MDSS_COMMON=y
# CONFIG_FB_MSM_MDP is not set
CONFIG_FB_MSM_MDSS=y
+42 −11
Original line number Diff line number Diff line
@@ -100,8 +100,11 @@ static int camera_v4l2_querycap(struct file *filep, void *fh,
		MSM_CAMERA_PRIV_QUERY_CAP, -1, &event);

	rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
	if (rc < 0)

	if (rc < 0){
		pr_err("%s:%d camera_v4l2_querycap failed\n", __func__, __LINE__);
		return rc;
	}

	rc = camera_check_event_status(&event);

@@ -123,8 +126,10 @@ static int camera_v4l2_s_crop(struct file *filep, void *fh,
			MSM_CAMERA_PRIV_S_CROP, -1, &event);

		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_s_crop failed\n", __func__, __LINE__);
			return rc;
		}

		rc = camera_check_event_status(&event);
	}
@@ -146,8 +151,10 @@ static int camera_v4l2_g_crop(struct file *filep, void *fh,
			MSM_CAMERA_PRIV_G_CROP, -1, &event);

		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_g_crop failed\n", __func__, __LINE__);
			return rc;
		}

		rc = camera_check_event_status(&event);
	}
@@ -170,8 +177,10 @@ static int camera_v4l2_queryctrl(struct file *filep, void *fh,
			ctrl->id, -1, &event);

		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_queryctrl failed\n", __func__, __LINE__);
			return rc;
		}

		rc = camera_check_event_status(&event);
	}
@@ -195,8 +204,10 @@ static int camera_v4l2_g_ctrl(struct file *filep, void *fh,
					ctrl->id, -1, &event);

			rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
			if (rc < 0)
			if (rc < 0){
				pr_err("%s:%d camera_v4l2_g_ctrl failed\n", __func__, __LINE__);
				return rc;
			}

			rc = camera_check_event_status(&event);
		}
@@ -216,8 +227,10 @@ static int camera_v4l2_s_ctrl(struct file *filep, void *fh,
		ctrl->value, &event);

		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_s_ctrl failed\n", __func__, __LINE__);
			return rc;
		}
		event_data = (struct msm_v4l2_event_data *)event.u.data;
		ctrl->value = event_data->ret_value;
		rc = camera_check_event_status(&event);
@@ -301,8 +314,10 @@ static int camera_v4l2_streamon(struct file *filep, void *fh,
		MSM_CAMERA_PRIV_STREAM_ON, -1, &event);

	rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
	if (rc < 0)
	if (rc < 0){
		pr_err("%s:%d camera_v4l2_streamon failed\n", __func__, __LINE__);
		return rc;
	}

	rc = camera_check_event_status(&event);
	return rc;
@@ -320,8 +335,10 @@ static int camera_v4l2_streamoff(struct file *filep, void *fh,
			MSM_CAMERA_PRIV_STREAM_OFF, -1, &event);

		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_streamoff failed\n", __func__, __LINE__);
			return rc;
		}
		rc = camera_check_event_status(&event);
	}
	mutex_lock(&sp->lock);
@@ -345,8 +362,10 @@ static int camera_v4l2_g_fmt_vid_cap_mplane(struct file *filep, void *fh,
			MSM_CAMERA_PRIV_G_FMT, -1, &event);

		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_g_fmt_vid_cap_mplane failed\n", __func__, __LINE__);
			return rc;
		}

		rc = camera_check_event_status(&event);
	}
@@ -387,8 +406,10 @@ static int camera_v4l2_s_fmt_vid_cap_mplane(struct file *filep, void *fh,
				MSM_CAMERA_PRIV_S_FMT, -1, &event);

			rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
			if (rc < 0)
			if (rc < 0) {
				pr_err("%s:%d camera_v4l2_s_fmt_vid_cap_mplane failed\n", __func__, __LINE__);
				return rc;
			}

			rc = camera_check_event_status(&event);
			if (rc < 0)
@@ -433,8 +454,10 @@ static int camera_v4l2_s_parm(struct file *filep, void *fh,

	if (msm_is_daemon_present() != false) {
		rc = msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		if (rc < 0)
		if (rc < 0){
			pr_err("%s:%d camera_v4l2_s_parm failed\n", __func__, __LINE__);
			goto error;
		}

		rc = camera_check_event_status(&event);
		if (rc < 0)
@@ -727,6 +750,7 @@ static unsigned int camera_v4l2_poll(struct file *filep,

static int camera_v4l2_close(struct file *filep)
{
    int ret = 0;
	struct v4l2_event event;
	struct msm_video_device *pvdev = video_drvdata(filep);
	struct camera_v4l2_private *sp = fh_to_private(filep->private_data);
@@ -760,6 +784,9 @@ static int camera_v4l2_close(struct file *filep)
				0, -1, &event);
			msm_post_event(&event, MSM_POST_EVT_TIMEOUT);
		}
		if(ret < 0){
			pr_err("%s:%d camera_v4l2_close_1 failed\n", __func__, __LINE__);
		}
		msm_delete_command_ack_q(pvdev->vdev->num, 0);
		msm_delete_stream(pvdev->vdev->num, sp->stream_id);
		mutex_unlock(&session->close_lock);
@@ -770,6 +797,10 @@ static int camera_v4l2_close(struct file *filep)

		pm_relax(&pvdev->vdev->dev);
	} else {
		if(ret < 0){
			pr_err("%s:%d camera_v4l2_close_2 failed\n", __func__, __LINE__);
		}

		msm_delete_command_ack_q(pvdev->vdev->num,
			sp->stream_id);