Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +43 −39 Original line number Diff line number Diff line Loading @@ -288,6 +288,41 @@ static void cam_ife_hw_mgr_deinit_hw_res( } } static void cam_ife_hw_mgr_deinit_hw( struct cam_ife_hw_mgr_ctx *ctx) { struct cam_ife_hw_mgr_res *hw_mgr_res; int i = 0; if (!ctx->init_done) { CAM_WARN(CAM_ISP, "ctx is not in init state"); return; } /* Deinit IFE CID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_cid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE CSID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CSID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deint IFE MUX(SRC) */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) { cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE OUT */ for (i = 0; i < CAM_IFE_HW_OUT_RES_MAX; i++) cam_ife_hw_mgr_deinit_hw_res(&ctx->res_list_ife_out[i]); ctx->init_done = false; } static int cam_ife_hw_mgr_init_hw( struct cam_ife_hw_mgr_ctx *ctx) { Loading @@ -302,7 +337,7 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE CID(id :%d)", hw_mgr_res->res_id); return rc; goto deinit; } } Loading @@ -315,7 +350,7 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE CSID(id :%d)", hw_mgr_res->res_id); return rc; goto deinit; } } Loading @@ -327,7 +362,7 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE SRC (%d)", hw_mgr_res->res_id); return rc; goto deinit; } } Loading @@ -340,46 +375,15 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE OUT (%d)", ctx->res_list_ife_out[i].res_id); return rc; goto deinit; } } return rc; } static void cam_ife_hw_mgr_deinit_hw( struct cam_ife_hw_mgr_ctx *ctx) { struct cam_ife_hw_mgr_res *hw_mgr_res; int i = 0; if (!ctx->init_done) { CAM_WARN(CAM_ISP, "ctx is not in init state"); return; } /* Deinit IFE CID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_cid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE CSID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CSID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deint IFE MUX(SRC) */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) { cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE OUT */ for (i = 0; i < CAM_IFE_HW_OUT_RES_MAX; i++) cam_ife_hw_mgr_deinit_hw_res(&ctx->res_list_ife_out[i]); ctx->init_done = false; deinit: ctx->init_done = true; cam_ife_hw_mgr_deinit_hw(ctx); return rc; } static int cam_ife_hw_mgr_put_res( Loading Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +43 −39 Original line number Diff line number Diff line Loading @@ -288,6 +288,41 @@ static void cam_ife_hw_mgr_deinit_hw_res( } } static void cam_ife_hw_mgr_deinit_hw( struct cam_ife_hw_mgr_ctx *ctx) { struct cam_ife_hw_mgr_res *hw_mgr_res; int i = 0; if (!ctx->init_done) { CAM_WARN(CAM_ISP, "ctx is not in init state"); return; } /* Deinit IFE CID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_cid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE CSID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CSID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deint IFE MUX(SRC) */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) { cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE OUT */ for (i = 0; i < CAM_IFE_HW_OUT_RES_MAX; i++) cam_ife_hw_mgr_deinit_hw_res(&ctx->res_list_ife_out[i]); ctx->init_done = false; } static int cam_ife_hw_mgr_init_hw( struct cam_ife_hw_mgr_ctx *ctx) { Loading @@ -302,7 +337,7 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE CID(id :%d)", hw_mgr_res->res_id); return rc; goto deinit; } } Loading @@ -315,7 +350,7 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE CSID(id :%d)", hw_mgr_res->res_id); return rc; goto deinit; } } Loading @@ -327,7 +362,7 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE SRC (%d)", hw_mgr_res->res_id); return rc; goto deinit; } } Loading @@ -340,46 +375,15 @@ static int cam_ife_hw_mgr_init_hw( if (rc) { CAM_ERR(CAM_ISP, "Can not INIT IFE OUT (%d)", ctx->res_list_ife_out[i].res_id); return rc; goto deinit; } } return rc; } static void cam_ife_hw_mgr_deinit_hw( struct cam_ife_hw_mgr_ctx *ctx) { struct cam_ife_hw_mgr_res *hw_mgr_res; int i = 0; if (!ctx->init_done) { CAM_WARN(CAM_ISP, "ctx is not in init state"); return; } /* Deinit IFE CID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_cid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE CSID */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) { CAM_DBG(CAM_ISP, "%s: Going to DeInit IFE CSID\n", __func__); cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deint IFE MUX(SRC) */ list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) { cam_ife_hw_mgr_deinit_hw_res(hw_mgr_res); } /* Deinit IFE OUT */ for (i = 0; i < CAM_IFE_HW_OUT_RES_MAX; i++) cam_ife_hw_mgr_deinit_hw_res(&ctx->res_list_ife_out[i]); ctx->init_done = false; deinit: ctx->init_done = true; cam_ife_hw_mgr_deinit_hw(ctx); return rc; } static int cam_ife_hw_mgr_put_res( Loading