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

Commit fe46d93a authored by Raja Mallik's avatar Raja Mallik Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Add bulk changes for new spectra camera support for sdm845



msm: cam: isp: Add state machine for FS2
msm: camera: isp: Improve logging by adding context info
msm: camera: icp: Reduce delay between subsequent HFI polls
msm: camera: cdm: Avoid presence of stale tags in BL_FIFO
msm: camera: lrme: correct fetch engine width size for P010 format
msm: camera: fd: Add mutex protection to frame done processing
msm: camera: crm: Fix use-after-free for link
msm: camera: reqmgr: Modify frame sync logic
msm: camera: reqmgr: Fix frame sync issue on SAT mode
msm: camera: reqmgr: Validate num links in link control
msm: camera: reqmgr: Validate num links in link control
msm: camera: reqmgr: Fix frame skip condition
msm: camera: reqmgr: Deliver matching frames for master-slave sync
msm: camera: reject request id earlier than last flush request
msm: camera: core: Cleanup the logic for shutdown
msm: camera: Add stride info as part of pf dump
msm: camera: Enable fetch engine to support FS2 feature for IFE sdm845
msm: camera: isp: Change epoch to 2/3rd frame
msm: camera: memmgr: Allow alloc flags with 0

Changes added from camera from msm-4.14 'commit <a50bf345b0cb38>
("msm: camera: flash: Moving flash off operation in stop dev ioctl")'
till 'commit <efd1feba4e3813> ("msm: camera: ife: clean up HW manager
sequence")'

Retain existing ION, CMA alloc, SMMU, for camera modules for msm-4.9.
Retain cpas hw tcsr specific changes for sdm670.

Change-Id: I053a47b2662fb2b545f694633afac784f641d14f
Signed-off-by: default avatarSuresh Vankadara <svankada@codeaurora.org>
Signed-off-by: default avatarAlok Pandey <akumarpa@codeaurora.org>
Signed-off-by: default avatarRaja Mallik <rmallik@codeaurora.org>
parent ff6c75b8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -15,7 +15,8 @@ First Level Node - CAM IFE CSID device
- compatible
  Usage: required
  Value type: <string>
  Definition: Should be "qcom,csid170" or "qcom,csid-lite170".
  Definition: Should be "qcom,csid170", "qcom,csid175", "qcom,csid175_200",
		"qcom,csid-lite170" or "qcom,csid-lite175".

- cell-index
  Usage: required
+2 −1
Original line number Diff line number Diff line
@@ -17,7 +17,8 @@ Required properties:
  Usage: required
  Value type: <string>
  Definition: Should specify the compatibility string for matching the
    driver. e.g. "qcom,vfe170", "qcom,vfe-lite170".
	driver. e.g. "qcom,vfe175", "qcom,vfe170", "qcom,vfe175_130",
		"qcom,vfe-lite175", "qcom,vfe-lite175_130", "qcom,vfe-lite170".

- cell-index
  Usage: required
+14 −16
Original line number Diff line number Diff line
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2019, 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
@@ -509,8 +509,8 @@ int cam_hw_cdm_submit_bl(struct cam_hw_info *cdm_hw,

		if (!rc) {
			CAM_DBG(CAM_CDM,
				"write BL success for cnt=%d with tag=%d",
				i, core->bl_tag);
				"write BL success for cnt=%d with tag=%d total_cnt=%d",
				i, core->bl_tag, req->data->cmd_arrary_count);

			CAM_DBG(CAM_CDM, "Now commit the BL");
			if (cam_hw_cdm_commit_bl_write(cdm_hw)) {
@@ -550,18 +550,16 @@ static void cam_hw_cdm_work(struct work_struct *work)
		cdm_hw = payload->hw;
		core = (struct cam_cdm *)cdm_hw->core_info;

		CAM_DBG(CAM_CDM, "IRQ status=%x", payload->irq_status);
		CAM_DBG(CAM_CDM, "IRQ status=0x%x", payload->irq_status);
		if (payload->irq_status &
			CAM_CDM_IRQ_STATUS_INFO_INLINE_IRQ_MASK) {
			struct cam_cdm_bl_cb_request_entry *node;
			struct cam_cdm_bl_cb_request_entry *node, *tnode;

			CAM_DBG(CAM_CDM, "inline IRQ data=%x",
			CAM_DBG(CAM_CDM, "inline IRQ data=0x%x",
				payload->irq_data);
			mutex_lock(&cdm_hw->hw_mutex);
			node = cam_cdm_find_request_by_bl_tag(
					payload->irq_data,
					&core->bl_request_list);
			if (node) {
			list_for_each_entry_safe(node, tnode,
					&core->bl_request_list, entry) {
				if (node->request_type ==
					CAM_HW_CDM_BL_CB_CLIENT) {
					cam_cdm_notify_clients(cdm_hw,
@@ -574,11 +572,11 @@ static void cam_hw_cdm_work(struct work_struct *work)
						node->request_type);
				}
				list_del_init(&node->entry);
				if (node->bl_tag == payload->irq_data) {
					kfree(node);
					break;
				}
				kfree(node);
			} else {
				CAM_ERR(CAM_CDM,
					"Inval node, inline_irq st=%x data=%x",
					payload->irq_status, payload->irq_data);
			}
			mutex_unlock(&cdm_hw->hw_mutex);
		}
@@ -684,7 +682,7 @@ irqreturn_t cam_hw_cdm_irq(int irq_num, void *data)
			CAM_ERR(CAM_CDM, "Failed to Write CDM HW IRQ cmd");
		work_status = queue_work(cdm_core->work_queue, &payload->work);
		if (work_status == false) {
			CAM_ERR(CAM_CDM, "Failed to queue work for irq=%x",
			CAM_ERR(CAM_CDM, "Failed to queue work for irq=0x%x",
				payload->irq_status);
			kfree(payload);
		}
+1 −3
Original line number Diff line number Diff line
@@ -43,7 +43,6 @@ int cam_context_shutdown(struct cam_context *ctx)
	int rc = 0;
	struct cam_release_dev_cmd cmd;

	mutex_lock(&ctx->ctx_mutex);
	if (ctx->state > CAM_CTX_AVAILABLE && ctx->state < CAM_CTX_STATE_MAX) {
		cmd.session_handle = ctx->session_hdl;
		cmd.dev_handle = ctx->dev_hdl;
@@ -60,7 +59,6 @@ int cam_context_shutdown(struct cam_context *ctx)
			ctx->dev_name, ctx->ctx_id, ctx->state);
		rc = -EINVAL;
	}
	mutex_unlock(&ctx->ctx_mutex);

	rc = cam_destroy_device_hdl(ctx->dev_hdl);
	if (rc)
@@ -458,7 +456,6 @@ int cam_context_handle_start_dev(struct cam_context *ctx,
	}

	mutex_lock(&ctx->ctx_mutex);
	ctx->last_flush_req = 0;
	if (ctx->state_machine[ctx->state].ioctl_ops.start_dev)
		rc = ctx->state_machine[ctx->state].ioctl_ops.start_dev(
			ctx, cmd);
@@ -531,6 +528,7 @@ int cam_context_init(struct cam_context *ctx,
	ctx->dev_name = dev_name;
	ctx->dev_id = dev_id;
	ctx->ctx_id = ctx_id;
	ctx->last_flush_req = 0;
	ctx->ctx_crm_intf = NULL;
	ctx->crm_ctx_intf = crm_node_intf;
	ctx->hw_mgr_intf = hw_mgr_intf;
+0 −44
Original line number Diff line number Diff line
/* Copyright (c) 2017-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
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

#ifndef _CAM_CORE_DEFS_H_
#define _CAM_CORE_DEFS_H_

#define CAM_CORE_TRACE_ENABLE 0

#if (CAM_CORE_TRACE_ENABLE == 1)
	#define CAM_CORE_DBG(fmt, args...) do { \
	trace_printk("%d: [cam_core_dbg] "fmt"\n", __LINE__, ##args); \
	pr_debug("%s:%d "fmt"\n", __func__, __LINE__, ##args); \
	} while (0)

	#define CAM_CORE_WARN(fmt, args...) do { \
	trace_printk("%d: [cam_core_warn] "fmt"\n", __LINE__, ##args); \
	pr_warn("%s:%d "fmt"\n", __func__, __LINE__, ##args); \
	} while (0)

	#define CAM_CORE_ERR(fmt, args...) do { \
	trace_printk("%d: [cam_core_err] "fmt"\n", __LINE__, ##args); \
	pr_err("%s:%d "fmt"\n", __func__, __LINE__, ##args);\
	} while (0)
#else
	#define CAM_CORE_DBG(fmt, args...) pr_debug("%s:%d "fmt"\n", \
	__func__, __LINE__, ##args)

	#define CAM_CORE_WARN(fmt, args...) pr_warn("%s:%d "fmt"\n", \
	__func__, __LINE__, ##args)

	#define CAM_CORE_ERR(fmt, args...) pr_err("%s:%d "fmt"\n", \
	__func__, __LINE__, ##args)
#endif

#endif /* _CAM_CORE_DEFS_H_ */
Loading