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

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

Merge 196f4e6b on remote branch

Change-Id: I4c51f1bef181ae411d5bf35e43d3b9caa57fb092
parents d084f570 196f4e6b
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -864,6 +864,18 @@ static int __cam_isp_ctx_handle_buf_done_for_req_list(
		list_add_tail(&req->list, &ctx->free_req_list);
		req_isp->reapply = false;
		req_isp->cdm_reset_before_apply = false;
		req_isp->num_acked = 0;
		req_isp->num_deferred_acks = 0;
		req_isp->bubble_detected = false;
		/*
		 * Only update the process_bubble and bubble_frame_cnt
		 * when bubble is detected on this req, in case the other
		 * request is processing bubble.
		 */
		if (req_isp->bubble_detected) {
			atomic_set(&ctx_isp->process_bubble, 0);
			ctx_isp->bubble_frame_cnt = 0;
		}

		CAM_DBG(CAM_REQ,
			"Move active request %lld to free list(cnt = %d) [all fences done], ctx %u",
@@ -2101,6 +2113,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp,
					ctx_isp->frame_id, ctx->ctx_id);
			}
		}
		atomic_set(&ctx_isp->process_bubble, 1);
	}

	/*
@@ -2336,6 +2349,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied(
					ctx_isp->frame_id, ctx->ctx_id);
			}
		}
		atomic_set(&ctx_isp->process_bubble, 1);
	}

	/*
+4 −6
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -985,6 +985,7 @@ static int32_t cam_cci_burst_read(struct v4l2_subdev *sd,
	}

	mutex_lock(&cci_dev->cci_master_info[master].mutex_q[queue]);
	cci_dev->is_burst_read[master] = true;
	reinit_completion(&cci_dev->cci_master_info[master].report_q[queue]);

	soc_info = &cci_dev->soc_info;
@@ -1256,6 +1257,7 @@ static int32_t cam_cci_read(struct v4l2_subdev *sd,
	}

	mutex_lock(&cci_dev->cci_master_info[master].mutex_q[queue]);
	cci_dev->is_burst_read[master] = false;
	reinit_completion(&cci_dev->cci_master_info[master].report_q[queue]);

	soc_info = &cci_dev->soc_info;
@@ -1622,7 +1624,7 @@ static int32_t cam_cci_read_bytes_v_1_2(struct v4l2_subdev *sd,
		else
			read_cfg->num_byte = read_bytes;

		cci_dev->is_burst_read = false;
		cci_dev->is_burst_read[master] = false;
		rc = cam_cci_read(sd, c_ctrl);
		if (rc) {
			CAM_ERR(CAM_CCI, "failed to read rc:%d", rc);
@@ -1639,7 +1641,6 @@ static int32_t cam_cci_read_bytes_v_1_2(struct v4l2_subdev *sd,
	} while (read_bytes);

ERROR:
	cci_dev->is_burst_read = false;
	return rc;
}

@@ -1704,10 +1705,8 @@ static int32_t cam_cci_read_bytes(struct v4l2_subdev *sd,
			read_cfg->num_byte = read_bytes;

		if (read_cfg->num_byte >= CCI_READ_MAX) {
			cci_dev->is_burst_read = true;
			rc = cam_cci_burst_read(sd, c_ctrl);
		} else {
			cci_dev->is_burst_read = false;
			rc = cam_cci_read(sd, c_ctrl);
		}
		if (rc) {
@@ -1726,7 +1725,6 @@ static int32_t cam_cci_read_bytes(struct v4l2_subdev *sd,
	} while (read_bytes);

ERROR:
	cci_dev->is_burst_read = false;
	return rc;
}

+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

#include "cam_cci_dev.h"
@@ -112,7 +112,7 @@ irqreturn_t cam_cci_irq(int irq_num, void *data)
		(!rd_done_th_assert)) {
		cci_dev->cci_master_info[MASTER_0].status = 0;
		rd_done_th_assert = true;
		if (cci_dev->is_burst_read)
		if (cci_dev->is_burst_read[MASTER_0])
			complete(
			&cci_dev->cci_master_info[MASTER_0].th_complete);
		complete(&cci_dev->cci_master_info[MASTER_0].rd_done);
@@ -168,7 +168,7 @@ irqreturn_t cam_cci_irq(int irq_num, void *data)
		(!rd_done_th_assert)) {
		cci_dev->cci_master_info[MASTER_1].status = 0;
		rd_done_th_assert = true;
		if (cci_dev->is_burst_read)
		if (cci_dev->is_burst_read[MASTER_1])
			complete(
			&cci_dev->cci_master_info[MASTER_1].th_complete);
		complete(&cci_dev->cci_master_info[MASTER_1].rd_done);
+4 −4
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

#ifndef _CAM_CCI_DEV_H_
@@ -50,8 +50,8 @@
#define CCI_READ_MAX 256
#define CCI_READ_MAX_V_1_2 0xE
#define CCI_I2C_READ_MAX_RETRIES 3
#define CCI_I2C_MAX_READ 10240
#define CCI_I2C_MAX_WRITE 10240
#define CCI_I2C_MAX_READ 20480
#define CCI_I2C_MAX_WRITE 20480
#define CCI_I2C_MAX_BYTE_COUNT 65535

#define CAMX_CCI_DEV_NAME "cam-cci-driver"
@@ -224,7 +224,7 @@ struct cci_device {
	uint32_t cpas_handle;
	uint32_t irq_status1;
	spinlock_t lock_status;
	bool is_burst_read;
	bool is_burst_read[MASTER_MAX];
	uint32_t irqs_disabled;
	struct mutex init_mutex;
	uint64_t  dump_en;
+2 −1
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
 */

#include "cam_cci_dev.h"
@@ -76,6 +76,7 @@ static int cam_cci_init_master(struct cci_device *cci_dev,

		cci_dev->cci_master_info[master].status = 0;
		cci_dev->cci_master_info[master].is_initilized = true;
		cci_dev->is_burst_read[master] = false;
	}

	return 0;
Loading