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

Commit d9cbe94a authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 808693b4 on remote branch

Change-Id: Id0f4794558a14e01361b9f916956753bc79bd17e
parents 18b35a54 808693b4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2868,7 +2868,7 @@ static ssize_t debugfs_trace_method_get(struct file *file, char __user *buf,
	else if (c->trace_method == XOR_PACKET)
		len = snprintf(debug_buf, sizeof(debug_buf), "xor\n");

	rc = simple_read_from_buffer((void __user *) buf, len, ppos,
	rc = simple_read_from_buffer((void __user *) buf, count, ppos,
				     (void *) debug_buf, len);

	mutex_unlock(&debug_buf_mutex);
+2 −2
Original line number Diff line number Diff line
/*
 * Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -2691,7 +2691,7 @@ static ssize_t debugfs_trace_method_get(struct file *file, char __user *buf,
	else if (c->trace_method == XOR_PACKET)
		len = snprintf(debug_buf, sizeof(debug_buf), "xor\n");

	rc = simple_read_from_buffer((void __user *) buf, len, ppos,
	rc = simple_read_from_buffer((void __user *) buf, count, ppos,
				     (void *) debug_buf, len);

	mutex_unlock(&debug_buf_mutex);
+3 −3
Original line number Diff line number Diff line
@@ -1381,13 +1381,13 @@ static int _execute_reg_sequence(struct adreno_device *adreno_dev,

	/* todo double check the reg writes */
	while ((cur - opcode) < length) {
		if (cur[0] == 1 && ((cur + 4) - opcode) <= length) {
		if (cur[0] == 1 && (length - (cur - opcode) >= 4)) {
			/* Write a 32 bit value to a 64 bit reg */
			reg = cur[2];
			reg = (reg << 32) | cur[1];
			kgsl_regwrite(KGSL_DEVICE(adreno_dev), reg, cur[3]);
			cur += 4;
		} else if (cur[0] == 2 && ((cur + 5) - opcode) <= length) {
		} else if (cur[0] == 2 && (length - (cur - opcode) >= 5)) {
			/* Write a 64 bit value to a 64 bit reg */
			reg = cur[2];
			reg = (reg << 32) | cur[1];
@@ -1395,7 +1395,7 @@ static int _execute_reg_sequence(struct adreno_device *adreno_dev,
			val = (val << 32) | cur[3];
			kgsl_regwrite(KGSL_DEVICE(adreno_dev), reg, val);
			cur += 5;
		} else if (cur[0] == 3 && ((cur + 2) - opcode) <= length) {
		} else if (cur[0] == 3 && (length - (cur - opcode) >= 2)) {
			/* Delay for X usec */
			udelay(cur[1]);
			cur += 2;
+11 −1
Original line number Diff line number Diff line
@@ -3101,12 +3101,18 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev_ioctl,
		return -EINVAL;

	msm_isp_get_timestamp(&timestamp, vfe_dev_ioctl);

	mutex_lock(&vfe_dev_ioctl->buf_mgr->lock);
	for (i = 0; i < stream_cfg_cmd->num_streams; i++) {
		if (stream_cfg_cmd->stream_handle[i] == 0)
			continue;
		stream_info = msm_isp_get_stream_common_data(vfe_dev_ioctl,
			HANDLE_TO_IDX(stream_cfg_cmd->stream_handle[i]));

		if (!stream_info) {
			pr_err("%s: stream_info is NULL", __func__);
			mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);
			return -EINVAL;
		}
		if (SRC_TO_INTF(stream_info->stream_src) < VFE_SRC_MAX)
			src_state = axi_data->src_info[
				SRC_TO_INTF(stream_info->stream_src)].active;
@@ -3114,6 +3120,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev_ioctl,
		else {
			ISP_DBG("%s: invalid src info index\n", __func__);
			rc = -EINVAL;
			mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);
			goto error;
		}
		spin_lock_irqsave(&stream_info->lock, flags);
@@ -3125,6 +3132,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev_ioctl,
		}
		if (rc) {
			spin_unlock_irqrestore(&stream_info->lock, flags);
			mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);
			goto error;
		}

@@ -3147,6 +3155,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev_ioctl,
				HANDLE_TO_IDX(
				stream_cfg_cmd->stream_handle[i]));
			spin_unlock_irqrestore(&stream_info->lock, flags);
			mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);
			goto error;
		}
		for (k = 0; k < stream_info->num_isp; k++) {
@@ -3205,6 +3214,7 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev_ioctl,
		spin_unlock_irqrestore(&stream_info->lock, flags);
		streams[num_streams++] = stream_info;
	}
	mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);

	for (i = 0; i < MAX_VFE; i++) {
		vfe_dev = update_vfes[i];
+4 −0
Original line number Diff line number Diff line
@@ -1102,6 +1102,7 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev_ioctl,
	struct vfe_device *vfe_dev;

	msm_isp_get_timestamp(&timestamp, vfe_dev_ioctl);
	mutex_lock(&vfe_dev_ioctl->buf_mgr->lock);

	num_stats_comp_mask =
		vfe_dev_ioctl->hw_info->stats_hw_info->num_stats_comp_mask;
@@ -1120,6 +1121,7 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev_ioctl,
		}
		if (rc) {
			spin_unlock_irqrestore(&stream_info->lock, flags);
			mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);
			goto error;
		}
		rc = msm_isp_init_stats_ping_pong_reg(
@@ -1127,6 +1129,7 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev_ioctl,
		if (rc < 0) {
			spin_unlock_irqrestore(&stream_info->lock, flags);
			pr_err("%s: No buffer for stream%d\n", __func__, idx);
			mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);
			return rc;
		}
		init_completion(&stream_info->active_comp);
@@ -1161,6 +1164,7 @@ static int msm_isp_start_stats_stream(struct vfe_device *vfe_dev_ioctl,
				stats_data->num_active_stream);
		streams[num_stream++] = stream_info;
	}
	mutex_unlock(&vfe_dev_ioctl->buf_mgr->lock);

	for (k = 0; k < MAX_VFE; k++) {
		if (!update_vfes[k] || num_active_streams[k])
Loading