msm: camera: ife: Get consumed address info during hw_mgr init

This change checks whether the context supports last consumed
address during hw_mgr init.

CRs-Fixed: 2749254
Change-Id: I238893eb2d661014a2a51758bcf71c3e4d00f2d5
Signed-off-by: Depeng Shao <depengs@codeaurora.org>
Bu işleme şunda yer alıyor:
Depeng Shao
2020-08-07 14:54:24 +08:00
ebeveyn 2395072fee
işleme 494ace8da7
3 değiştirilmiş dosya ile 17 ekleme ve 28 silme

Dosyayı Görüntüle

@@ -1233,6 +1233,8 @@ static void __cam_isp_ctx_buf_done_match_req(
CAM_DBG(CAM_ISP,
"buf done num handles %d match count %d for next req:%lld",
done->num_handles, match_count, req->request_id);
CAM_DBG(CAM_ISP,
"irq_delay_detected %d", *irq_delay_detected);
}
static int __cam_isp_ctx_handle_buf_done_verify_addr(

Dosyayı Görüntüle

@@ -2982,32 +2982,6 @@ static int cam_ife_mgr_acquire_get_unified_structure(
return 0;
}
static bool cam_ife_mgr_is_consumed_addr_supported(
struct cam_ife_hw_mgr_ctx *ctx)
{
bool support_consumed_addr = false;
struct cam_isp_hw_mgr_res *isp_hw_res = NULL;
struct cam_hw_intf *hw_intf = NULL;
isp_hw_res = &ctx->res_list_ife_out[0];
if (!isp_hw_res || !isp_hw_res->hw_res[0]) {
CAM_ERR(CAM_ISP, "Invalid ife out res.");
goto end;
}
hw_intf = isp_hw_res->hw_res[0]->hw_intf;
if (hw_intf && hw_intf->hw_ops.process_cmd) {
hw_intf->hw_ops.process_cmd(hw_intf->hw_priv,
CAM_ISP_HW_CMD_IS_CONSUMED_ADDR_SUPPORT,
&support_consumed_addr,
sizeof(support_consumed_addr));
}
end:
return support_consumed_addr;
}
/* entry function: acquire_hw */
static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
{
@@ -3171,7 +3145,7 @@ static int cam_ife_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)
atomic_set(&ife_ctx->cdm_done, 1);
acquire_args->support_consumed_addr =
cam_ife_mgr_is_consumed_addr_supported(ife_ctx);
g_ife_hw_mgr.support_consumed_addr;
acquire_args->ctxt_to_hw_map = ife_ctx;
acquire_args->custom_enabled = ife_ctx->custom_enabled;
@@ -7677,6 +7651,7 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
{
int rc = -EFAULT;
int i, j;
bool support_consumed_addr = false;
struct cam_iommu_handle cdm_handles;
struct cam_ife_hw_mgr_ctx *ctx_pool;
struct cam_isp_hw_mgr_res *res_list_ife_out;
@@ -7695,11 +7670,19 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
for (i = 0, j = 0; i < CAM_IFE_HW_NUM_MAX; i++) {
rc = cam_vfe_hw_init(&g_ife_hw_mgr.ife_devices[i], i);
if (!rc) {
struct cam_hw_intf *ife_device =
g_ife_hw_mgr.ife_devices[i];
struct cam_hw_info *vfe_hw =
(struct cam_hw_info *)
g_ife_hw_mgr.ife_devices[i]->hw_priv;
ife_device->hw_priv;
struct cam_hw_soc_info *soc_info = &vfe_hw->soc_info;
if (j == 0)
ife_device->hw_ops.process_cmd(
vfe_hw,
CAM_ISP_HW_CMD_IS_CONSUMED_ADDR_SUPPORT,
&support_consumed_addr,
sizeof(support_consumed_addr));
j++;
g_ife_hw_mgr.cdm_reg_map[i] = &soc_info->reg_map[0];
@@ -7716,6 +7699,8 @@ int cam_ife_hw_mgr_init(struct cam_hw_mgr_intf *hw_mgr_intf, int *iommu_hdl)
return -EINVAL;
}
g_ife_hw_mgr.support_consumed_addr = support_consumed_addr;
/* fill csid hw intf information */
for (i = 0, j = 0; i < CAM_IFE_CSID_HW_NUM_MAX; i++) {
rc = cam_ife_csid_hw_init(&g_ife_hw_mgr.csid_devices[i], i);

Dosyayı Görüntüle

@@ -172,6 +172,7 @@ struct cam_ife_hw_mgr_ctx {
* @ife_dev_caps ife device capability per core
* @work q work queue for IFE hw manager
* @debug_cfg debug configuration
* @support_consumed_addr indicate whether hw supports last consumed address
*/
struct cam_ife_hw_mgr {
struct cam_isp_hw_mgr mgr_common;
@@ -192,6 +193,7 @@ struct cam_ife_hw_mgr {
struct cam_req_mgr_core_workq *workq;
struct cam_ife_hw_mgr_debug debug_cfg;
spinlock_t ctx_lock;
bool support_consumed_addr;
};
/**