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

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

msm: camera: Add new spectra camera changes



Changes added for camera driver from msm-4.14 'commit <efd1feba4e3813>
("msm: camera: ife: clean up HW manager sequence")' till 'commit
<f4ae227b611288> ("msm: camera: core: Avoid concurrency between
stop and pfdump")'

  commit 'f4ae227b611288fb8722838ee45638222dc0d57b':
  msm: camera: core: Avoid concurrency between stop and pfdump
  msm: camera: isp: Switching between rdi and pix rup for fs2 state machine
  msm: camera: icp: Increase number of supported contexts
  msm: camera: isp: Dump registers based on debugfs
  msm: camera: Listen to error interrupts once CSID is enabled
  msm: camera: cci: Add serialization of requests from diff i2c freq modes
  msm: camera: sync: Update error message in sync driver
  msm: camera: reqmgr: Move trace event post applying
  msm: camera: reqmgr: Correct the check for lower pd devices
  msm: camera: reqmgr: Reset sync link initial sync req
  msm: camera: icp: Add fw error message in kmd logging
  msm: camera: sync: Report error if getting sync obj reference fails
  msm: camera: icp: Update frame process command
  msm: camera: sensor: Add csi phy reset sequence
  msm: camera: core: Update the log level

Retain existing ION, CMA alloc, SMMU, for camera modules for msm-4.9.

Change-Id: I5fc3c798372ac824ded2c093f7da59da5816d015
Signed-off-by: default avatarRaja Mallik <rmallik@codeaurora.org>
parent 97c5848b
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -243,6 +243,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova,
		return -EINVAL;
	}

	mutex_lock(&ctx->ctx_mutex);
	if (ctx->state_machine[ctx->state].pagefault_ops) {
		rc = ctx->state_machine[ctx->state].pagefault_ops(ctx, iova,
			buf_info);
@@ -250,6 +251,7 @@ int cam_context_dump_pf_info(struct cam_context *ctx, unsigned long iova,
		CAM_WARN(CAM_CORE, "No dump ctx in dev %d, state %d",
			ctx->dev_hdl, ctx->state);
	}
	mutex_unlock(&ctx->ctx_mutex);

	return rc;
}
+1 −1
Original line number Diff line number Diff line
@@ -400,7 +400,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx,
		(uint32_t)cmd->offset);

	if (packet->header.request_id <= ctx->last_flush_req) {
		CAM_DBG(CAM_CORE,
		CAM_ERR(CAM_CORE,
			"request %lld has been flushed, reject packet",
			packet->header.request_id);
		rc = -EINVAL;
+1 −2
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
@@ -472,7 +472,6 @@ struct ica_stab_params {

struct frame_set {
	struct frame_buffer buffers[IPE_IO_IMAGES_MAX];
	struct ica_stab_params ica_params;
	uint32_t cdm_ica1_addr;
	uint32_t cdm_ica2_addr;
} __packed;
+18 −9
Original line number Diff line number Diff line
@@ -62,6 +62,8 @@

static struct cam_icp_hw_mgr icp_hw_mgr;

static void cam_icp_mgr_process_dbg_buf(unsigned int debug_lvl);

static int cam_icp_send_ubwc_cfg(struct cam_icp_hw_mgr *hw_mgr)
{
	struct cam_hw_intf *a5_dev_intf = NULL;
@@ -1834,12 +1836,13 @@ static int cam_icp_mgr_process_fatal_error(
	if (event_notify->event_id == HFI_EVENT_SYS_ERROR) {
		CAM_INFO(CAM_ICP, "received HFI_EVENT_SYS_ERROR");
		rc = cam_icp_mgr_trigger_recovery(hw_mgr);
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
	}

	return rc;
}

static void cam_icp_mgr_process_dbg_buf(void)
static void cam_icp_mgr_process_dbg_buf(unsigned int debug_lvl)
{
	uint32_t *msg_ptr = NULL, *pkt_ptr = NULL;
	struct hfi_msg_debug *dbg_msg;
@@ -1861,6 +1864,8 @@ static void cam_icp_mgr_process_dbg_buf(void)
			timestamp = ((((uint64_t)(dbg_msg->timestamp_hi) << 32)
				| dbg_msg->timestamp_lo) >> 16);
			trace_cam_icp_fw_dbg(dbg_buf, timestamp/2);
			if (!debug_lvl)
				CAM_INFO(CAM_ICP, "FW_DBG:%s", dbg_buf);
		}
		size_processed += (pkt_ptr[ICP_PACKET_SIZE] >>
			BYTE_WORD_SHIFT);
@@ -1986,9 +1991,7 @@ static int32_t cam_icp_mgr_process_msg(void *priv, void *data)
		}
	}

	if (icp_hw_mgr.a5_debug_type ==
		HFI_DEBUG_MODE_QUEUE)
		cam_icp_mgr_process_dbg_buf();
	cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);

	if ((task_data->irq_status & A5_WDT_0) ||
		(task_data->irq_status & A5_WDT_1)) {
@@ -2508,6 +2511,7 @@ static int cam_icp_mgr_abort_handle(
	if (!rem_jiffies) {
		rc = -ETIMEDOUT;
		CAM_ERR(CAM_ICP, "FW timeout/err in abort handle command");
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
		cam_hfi_queue_dump();
	}

@@ -2562,9 +2566,7 @@ static int cam_icp_mgr_destroy_handle(
		rc = -ETIMEDOUT;
		CAM_ERR(CAM_ICP, "FW response timeout: %d for %u",
			rc, ctx_data->ctx_id);
		if (icp_hw_mgr.a5_debug_type ==
			HFI_DEBUG_MODE_QUEUE)
			cam_icp_mgr_process_dbg_buf();
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
		cam_hfi_queue_dump();
	}
	kfree(destroy_cmd);
@@ -2871,6 +2873,7 @@ static int cam_icp_mgr_send_fw_init(struct cam_icp_hw_mgr *hw_mgr)
	if (!rem_jiffies) {
		rc = -ETIMEDOUT;
		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
		cam_hfi_queue_dump();
	}
	CAM_DBG(CAM_ICP, "Done Waiting for INIT DONE Message");
@@ -3122,6 +3125,7 @@ static int cam_icp_mgr_send_config_io(struct cam_icp_hw_ctx_data *ctx_data,
	if (!rem_jiffies) {
		rc = -ETIMEDOUT;
		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
		cam_hfi_queue_dump();
	}

@@ -3847,8 +3851,9 @@ static void cam_icp_mgr_print_io_bufs(struct cam_packet *packet,
			}

			CAM_INFO(CAM_ICP,
				"pln %d w %d h %d s %u sh %u size %d addr 0x%x offset 0x%x memh %x",
				j, io_cfg[i].planes[j].width,
				"pln %d dir %d w %d h %d s %u sh %u sz %d addr 0x%x off 0x%x memh %x",
				j, io_cfg[i].direction,
				io_cfg[i].planes[j].width,
				io_cfg[i].planes[j].height,
				io_cfg[i].planes[j].plane_stride,
				io_cfg[i].planes[j].slice_height,
@@ -4305,6 +4310,7 @@ static int cam_icp_mgr_create_handle(uint32_t dev_type,
	if (!rem_jiffies) {
		rc = -ETIMEDOUT;
		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
		cam_hfi_queue_dump();
	}

@@ -4351,6 +4357,7 @@ static int cam_icp_mgr_send_ping(struct cam_icp_hw_ctx_data *ctx_data)
	if (!rem_jiffies) {
		rc = -ETIMEDOUT;
		CAM_ERR(CAM_ICP, "FW response timed out %d", rc);
		cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
		cam_hfi_queue_dump();
	}

@@ -4624,6 +4631,7 @@ static int cam_icp_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
	hw_mgr->ctx_data[ctx_id].icp_dev_acquire_info = NULL;
acquire_info_failed:
	cam_icp_mgr_put_ctx(ctx_data);
	cam_icp_mgr_process_dbg_buf(icp_hw_mgr.a5_dbg_lvl);
	mutex_unlock(&ctx_data->ctx_mutex);
	mutex_unlock(&hw_mgr->hw_mgr_mutex);
	return rc;
@@ -4903,6 +4911,7 @@ static int cam_icp_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
			hw_mgr->iommu_sec_hdl,
			hw_cmd_args->u.pf_args.buf_info,
			hw_cmd_args->u.pf_args.mem_found);

		break;
	default:
		CAM_ERR(CAM_ICP, "Invalid cmd");
+2 −2
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
@@ -23,7 +23,7 @@

#define CAM_ICP_A5_BW_BYTES_VOTE 40000000

#define CAM_ICP_CTX_MAX          36
#define CAM_ICP_CTX_MAX          54

#define CPAS_IPE1_BIT            0x2000

Loading