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

Commit c29fcea3 authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: ife: Improve IFE logs for better debugging" into camera-kernel.lnx.4.0

parents 37eb5e19 f3435b0e
Loading
Loading
Loading
Loading
+15 −12
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ static struct cam_isp_ctx_debug isp_ctx_debug;
	div_u64_rem(atomic64_add_return(1, head),\
	max_entries, (ret))

static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
static int cam_isp_context_dump_requests(void *data, unsigned long iova,
	uint32_t buf_info);

static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx,
@@ -3010,8 +3010,8 @@ static int __cam_isp_ctx_flush_req_in_top_state(
		ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT;
		spin_unlock_bh(&ctx->lock);

		CAM_INFO(CAM_ISP, "Last request id to flush is %lld",
			flush_req->req_id);
		CAM_INFO(CAM_ISP, "Last request id to flush is %lld, ctx_id:%d",
			flush_req->req_id, ctx->ctx_id);
		ctx->last_flush_req = flush_req->req_id;

		memset(&hw_cmd_args, 0, sizeof(hw_cmd_args));
@@ -4583,7 +4583,8 @@ static int __cam_isp_ctx_config_dev_in_flushed(struct cam_context *ctx,
			"Failed to re-start HW after flush rc: %d", rc);
	else
		CAM_INFO(CAM_ISP,
			"Received init after flush. Re-start HW complete.");
			"Received init after flush. Re-start HW complete in ctx:%d",
			ctx->ctx_id);

end:
	CAM_DBG(CAM_ISP, "next state %d sub_state:%d", ctx->state,
@@ -5152,7 +5153,7 @@ static struct cam_ctx_ops
			.dump_req = __cam_isp_ctx_dump_in_top_state,
		},
		.irq_ops = NULL,
		.pagefault_ops = cam_isp_context_dump_active_request,
		.pagefault_ops = cam_isp_context_dump_requests,
		.dumpinfo_ops = cam_isp_context_info_dump,
	},
	/* Ready */
@@ -5169,7 +5170,7 @@ static struct cam_ctx_ops
			.dump_req = __cam_isp_ctx_dump_in_top_state,
		},
		.irq_ops = NULL,
		.pagefault_ops = cam_isp_context_dump_active_request,
		.pagefault_ops = cam_isp_context_dump_requests,
		.dumpinfo_ops = cam_isp_context_info_dump,
	},
	/* Flushed */
@@ -5185,7 +5186,7 @@ static struct cam_ctx_ops
			.process_evt = __cam_isp_ctx_process_evt,
		},
		.irq_ops = NULL,
		.pagefault_ops = cam_isp_context_dump_active_request,
		.pagefault_ops = cam_isp_context_dump_requests,
		.dumpinfo_ops = cam_isp_context_info_dump,
	},
	/* Activated */
@@ -5204,13 +5205,13 @@ static struct cam_ctx_ops
			.dump_req = __cam_isp_ctx_dump_in_top_state,
		},
		.irq_ops = __cam_isp_ctx_handle_irq_in_activated,
		.pagefault_ops = cam_isp_context_dump_active_request,
		.pagefault_ops = cam_isp_context_dump_requests,
		.dumpinfo_ops = cam_isp_context_info_dump,
	},
};


static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
static int cam_isp_context_dump_requests(void *data, unsigned long iova,
	uint32_t buf_info)
{

@@ -5239,7 +5240,8 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;
		hw_update_data = &req_isp->hw_update_data;
		pf_dbg_entry = &(req->pf_data);
		CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);
		CAM_INFO(CAM_ISP, "Active List: req_id : %lld ",
			req->request_id);

		rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
			iova, buf_info, &mem_found);
@@ -5259,7 +5261,7 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;
		hw_update_data = &req_isp->hw_update_data;
		pf_dbg_entry = &(req->pf_data);
		CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);
		CAM_INFO(CAM_ISP, "Wait List: req_id : %lld ", req->request_id);

		rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
			iova, buf_info, &mem_found);
@@ -5289,7 +5291,8 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
		req_isp = (struct cam_isp_ctx_req *) req->req_priv;
		hw_update_data = &req_isp->hw_update_data;
		pf_dbg_entry = &(req->pf_data);
		CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);
		CAM_INFO(CAM_ISP, "Pending List: req_id : %lld ",
			req->request_id);

		rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
			iova, buf_info, &mem_found);
+17 −7
Original line number Diff line number Diff line
@@ -402,11 +402,13 @@ static int cam_ife_hw_mgr_start_hw_res(
				isp_hw_res->hw_res[i],
				sizeof(struct cam_isp_resource_node));
			if (rc) {
				CAM_ERR(CAM_ISP, "Can not start HW resources");
				CAM_ERR(CAM_ISP,
					"Can not start HW:%d resources",
					hw_intf->hw_idx);
				goto err;
			}
			CAM_DBG(CAM_ISP, "Start HW %d Res %d", hw_intf->hw_idx,
				isp_hw_res->hw_res[i]->res_id);
			} else
				CAM_INFO(CAM_ISP, "Started HW:%d",
					hw_intf->hw_idx);
		} else {
			CAM_ERR(CAM_ISP, "function null");
			goto err;
@@ -436,10 +438,13 @@ static void cam_ife_hw_mgr_stop_hw_res(
			CAM_ISP_RESOURCE_STATE_STREAMING)
			continue;

		if (hw_intf->hw_ops.stop)
		if (hw_intf->hw_ops.stop) {
			hw_intf->hw_ops.stop(hw_intf->hw_priv,
				isp_hw_res->hw_res[i],
				sizeof(struct cam_isp_resource_node));

			CAM_INFO(CAM_ISP, "Stopped Hw:%d", hw_intf->hw_idx);
		}
		else
			CAM_ERR(CAM_ISP, "stop null");
		if (hw_intf->hw_ops.process_cmd &&
@@ -645,8 +650,13 @@ static int cam_ife_hw_mgr_free_hw_res(
				sizeof(struct cam_isp_resource_node));
			if (rc)
				CAM_ERR(CAM_ISP,
					"Release hw resource id %d failed",
					isp_hw_res->res_id);
					"Release HW:%d resource id %d failed",
					hw_intf->hw_idx, isp_hw_res->res_id);
			else
				CAM_INFO(CAM_ISP,
					"Released HW:%d resource id %d",
					hw_intf->hw_idx, isp_hw_res->res_id);

			isp_hw_res->hw_res[i] = NULL;
		} else
			CAM_ERR(CAM_ISP, "Release null");
+3 −2
Original line number Diff line number Diff line
@@ -3934,8 +3934,9 @@ static int cam_ife_csid_sof_irq_debug(
		csid_hw->sof_irq_triggered = false;
	}

	CAM_INFO(CAM_ISP, "SOF freeze: CSID SOF irq %s",
		(sof_irq_enable == true) ? "enabled" : "disabled");
	CAM_INFO(CAM_ISP, "SOF freeze: CSID SOF irq %s, CSID HW:%d",
		(sof_irq_enable) ? "enabled" : "disabled",
		csid_hw->hw_intf->hw_idx);

	return 0;
}