msm: camera: isp: Remove IFE HW mgr reference from ISP ctx

Removes IFE HW manager reference from ISP context and moves some
LDAR dump functionality for stream info to IFE HW manager.

CRs-Fixed: 3210247
Change-Id: I311c7cd8d8684a68ba0bfbe279ef9ba55cfbbe82
Signed-off-by: Joshua Florez <quic_jflorez@quicinc.com>
This commit is contained in:
Joshua Florez
2022-05-25 15:43:05 -07:00
committed by Camera Software Integration
orang tua c8a2b3a9a8
melakukan 8f297a31ea
3 mengubah file dengan 88 tambahan dan 50 penghapusan

Melihat File

@@ -11977,6 +11977,59 @@ end:
return rc;
}
static void *cam_ife_mgr_user_dump_stream_info(
void *dump_struct, uint8_t *addr_ptr)
{
struct cam_ife_hw_mgr_ctx *hw_mgr_ctx = NULL;
struct cam_isp_hw_mgr_res *hw_mgr_res = NULL;
struct cam_isp_resource_node *hw_res = NULL;
int32_t *addr;
int i;
int hw_idx[CAM_ISP_HW_SPLIT_MAX] = { -1, -1 };
int sfe_hw_idx[CAM_ISP_HW_SPLIT_MAX] = { -1, -1 };
hw_mgr_ctx = (struct cam_ife_hw_mgr_ctx *)dump_struct;
if (!list_empty(&hw_mgr_ctx->res_list_ife_src)) {
hw_mgr_res = list_first_entry(&hw_mgr_ctx->res_list_ife_src,
struct cam_isp_hw_mgr_res, list);
for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
hw_res = hw_mgr_res->hw_res[i];
if (hw_res && hw_res->hw_intf)
hw_idx[i] = hw_res->hw_intf->hw_idx;
}
}
if (!list_empty(&hw_mgr_ctx->res_list_sfe_src)) {
hw_mgr_res = list_first_entry(&hw_mgr_ctx->res_list_sfe_src,
struct cam_isp_hw_mgr_res, list);
for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
hw_res = hw_mgr_res->hw_res[i];
if (hw_res && hw_res->hw_intf)
sfe_hw_idx[i] = hw_res->hw_intf->hw_idx;
}
}
addr = (int32_t *)addr_ptr;
*addr++ = hw_mgr_ctx->flags.is_dual;
*addr++ = hw_mgr_ctx->ctx_type;
*addr++ = hw_idx[CAM_ISP_HW_SPLIT_LEFT];
*addr++ = hw_idx[CAM_ISP_HW_SPLIT_RIGHT];
*addr++ = sfe_hw_idx[CAM_ISP_HW_SPLIT_LEFT];
*addr++ = sfe_hw_idx[CAM_ISP_HW_SPLIT_RIGHT];
*addr++ = hw_mgr_ctx->flags.is_sfe_shdr;
*addr++ = hw_mgr_ctx->flags.is_sfe_fs;
*addr++ = hw_mgr_ctx->flags.dsp_enabled;
*addr++ = hw_mgr_ctx->flags.is_offline;
return addr;
}
static int cam_ife_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
{
int rc = 0;
@@ -12056,6 +12109,12 @@ static int cam_ife_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
&isp_hw_cmd_args->u.sof_ts.boot,
&isp_hw_cmd_args->u.sof_ts.prev);
break;
case CAM_ISP_HW_MGR_DUMP_STREAM_INFO:
rc = cam_common_user_dump_helper(
(void *)(isp_hw_cmd_args->cmd_data),
cam_ife_mgr_user_dump_stream_info, ctx,
sizeof(int32_t), "ISP_STREAM_INFO_FROM_IFE_HW_MGR:");
break;
default:
CAM_ERR(CAM_ISP, "Invalid HW mgr command:0x%x",
hw_cmd_args->cmd_type);

Melihat File

@@ -365,6 +365,7 @@ enum cam_isp_hw_mgr_command {
CAM_ISP_HW_MGR_GET_LAST_CDM_DONE,
CAM_ISP_HW_MGR_CMD_PROG_DEFAULT_CFG,
CAM_ISP_HW_MGR_GET_SOF_TS,
CAM_ISP_HW_MGR_DUMP_STREAM_INFO,
CAM_ISP_HW_MGR_CMD_MAX,
};