msm: camera: isp: Maintain clock rate relation between CSIPHY, CSID and TFE

Adds checks to confirm CSID frequency greater than
CSIPHY frequency, TFE frequency greater than CSID
frequency. Also TFE frequency should be such that
it can accommodate PHY data rate .

CRs-Fixed: 2847155
Change-Id: I5d3dcc53a6f27129f4b82cba1254445f58f6d0cf
Signed-off-by: Shravya Samala <quic_shravyas@quicinc.com>
Signed-off-by: Shardul Bankar <quic_sharbank@quicinc.com>
Signed-off-by: Gaurav Jindal <quic_gjindal@quicinc.com>
Signed-off-by: Alok Chauhan <quic_alokc@quicinc.com>
这个提交包含在:
Gaurav Jindal
2020-12-21 13:28:38 +05:30
提交者 Sridhar Gujje
父节点 e9530314ea
当前提交 050d6d7a8a
修改 14 个文件,包含 242 行新增3 行删除

查看文件

@@ -23,6 +23,7 @@
#include "cam_req_mgr_debug.h"
#include "cam_cpas_api.h"
#include "cam_ife_hw_mgr.h"
#include "cam_subdev.h"
static const char isp_dev_name[] = "cam-isp";
@@ -36,6 +37,8 @@ static int cam_isp_context_dump_requests(void *data,
void *pf_args);
static int cam_isp_context_hw_recovery(void *priv, void *data);
static int cam_isp_context_handle_message(void *context,
uint32_t msg_type, void *data);
static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx,
struct cam_start_stop_dev_cmd *cmd);
@@ -8858,6 +8861,7 @@ static struct cam_ctx_ops
.pagefault_ops = cam_isp_context_dump_requests,
.dumpinfo_ops = cam_isp_context_info_dump,
.evt_inject_ops = cam_isp_context_inject_evt,
.msg_cb_ops = cam_isp_context_handle_message,
},
/* Activated */
{
@@ -8882,6 +8886,7 @@ static struct cam_ctx_ops
.dumpinfo_ops = cam_isp_context_info_dump,
.recovery_ops = cam_isp_context_hw_recovery,
.evt_inject_ops = cam_isp_context_inject_evt,
.msg_cb_ops = cam_isp_context_handle_message,
},
};
@@ -9009,6 +9014,34 @@ end:
return rc;
}
static int cam_isp_context_handle_message(void *context,
uint32_t msg_type, void *data)
{
int rc = -EINVAL;
struct cam_hw_cmd_args hw_cmd_args = {0};
struct cam_isp_hw_cmd_args isp_hw_cmd_args = {0};
struct cam_context *ctx = (struct cam_context *)context;
hw_cmd_args.ctxt_to_hw_map = ctx->ctxt_to_hw_map;
switch (msg_type) {
case CAM_SUBDEV_MESSAGE_CLOCK_UPDATE:
hw_cmd_args.cmd_type = CAM_HW_MGR_CMD_INTERNAL;
isp_hw_cmd_args.cmd_type = CAM_ISP_HW_MGR_CMD_UPDATE_CLOCK;
isp_hw_cmd_args.cmd_data = data;
hw_cmd_args.u.internal_args = (void *)&isp_hw_cmd_args;
rc = ctx->hw_mgr_intf->hw_cmd(ctx->hw_mgr_intf->hw_mgr_priv,
&hw_cmd_args);
if (rc)
CAM_ERR(CAM_ISP, "Update clock rate failed rc: %d", rc);
break;
default:
CAM_ERR(CAM_ISP, "Invalid message type %d", msg_type);
}
return rc;
}
static int cam_isp_context_debug_register(void)
{
int rc = 0;