msm: camera: isp: Some logic fixes and removing dead code
These changes fix some logic errors that were left in code, in addition to fixing memory leak issues and removing unused variables. CRs-Fixed: 3394193 Change-Id: Ib257dcaf05d48913038718beca9e071730ac21c0 Signed-off-by: Atiya Kailany <quic_akailany@quicinc.com>
Цей коміт міститься в:

зафіксовано
Camera Software Integration

джерело
fc0c352ebe
коміт
20dad11849
@@ -606,7 +606,6 @@ static int __cam_isp_ctx_user_dump_state_monitor_array(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
state_head = 0;
|
||||
state_head = atomic64_read(&ctx_isp->state_monitor_head);
|
||||
|
||||
if (state_head == -1) {
|
||||
@@ -3596,7 +3595,6 @@ static int __cam_isp_ctx_handle_recovery_req_util(
|
||||
int rc = 0;
|
||||
struct cam_context *ctx = ctx_isp->base;
|
||||
struct cam_ctx_request *req_to_reapply = NULL;
|
||||
struct cam_isp_ctx_req *req_isp = NULL;
|
||||
|
||||
if (list_empty(&ctx->pending_req_list)) {
|
||||
CAM_WARN(CAM_ISP,
|
||||
@@ -3606,7 +3604,6 @@ static int __cam_isp_ctx_handle_recovery_req_util(
|
||||
|
||||
req_to_reapply = list_first_entry(&ctx->pending_req_list,
|
||||
struct cam_ctx_request, list);
|
||||
req_isp = (struct cam_isp_ctx_req *)req_to_reapply->req_priv;
|
||||
ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_EPOCH;
|
||||
ctx_isp->recovery_req_id = req_to_reapply->request_id;
|
||||
atomic_set(&ctx_isp->internal_recovery_set, 1);
|
||||
@@ -3808,14 +3805,12 @@ move_to_pending:
|
||||
if (found) {
|
||||
list_for_each_entry_safe_reverse(req, req_temp,
|
||||
&ctx->active_req_list, list) {
|
||||
req_isp = (struct cam_isp_ctx_req *) req->req_priv;
|
||||
list_del_init(&req->list);
|
||||
list_add(&req->list, &ctx->pending_req_list);
|
||||
ctx_isp->active_req_cnt--;
|
||||
}
|
||||
list_for_each_entry_safe_reverse(req, req_temp,
|
||||
&ctx->wait_req_list, list) {
|
||||
req_isp = (struct cam_isp_ctx_req *) req->req_priv;
|
||||
list_del_init(&req->list);
|
||||
list_add(&req->list, &ctx->pending_req_list);
|
||||
}
|
||||
@@ -4936,7 +4931,6 @@ static int __cam_isp_ctx_dump_req_info(
|
||||
uint32_t min_len;
|
||||
size_t remain_len;
|
||||
struct cam_isp_ctx_req *req_isp;
|
||||
struct cam_isp_context *ctx_isp;
|
||||
struct cam_ctx_request *req_temp;
|
||||
|
||||
if (!req || !ctx || !dump_args) {
|
||||
@@ -4945,7 +4939,6 @@ static int __cam_isp_ctx_dump_req_info(
|
||||
return -EINVAL;
|
||||
}
|
||||
req_isp = (struct cam_isp_ctx_req *)req->req_priv;
|
||||
ctx_isp = (struct cam_isp_context *)ctx->ctx_priv;
|
||||
|
||||
if (dump_args->buf_len <= dump_args->offset) {
|
||||
CAM_WARN(CAM_ISP,
|
||||
@@ -5269,7 +5262,6 @@ static int __cam_isp_ctx_flush_req(struct cam_context *ctx,
|
||||
struct list_head *req_list, struct cam_req_mgr_flush_request *flush_req)
|
||||
{
|
||||
int i, rc, tmp = 0;
|
||||
uint32_t cancel_req_id_found = 0;
|
||||
struct cam_ctx_request *req;
|
||||
struct cam_ctx_request *req_temp;
|
||||
struct cam_isp_ctx_req *req_isp;
|
||||
@@ -5301,7 +5293,6 @@ static int __cam_isp_ctx_flush_req(struct cam_context *ctx,
|
||||
} else {
|
||||
list_del_init(&req->list);
|
||||
list_add_tail(&req->list, &flush_list);
|
||||
cancel_req_id_found = 1;
|
||||
__cam_isp_ctx_update_state_monitor_array(
|
||||
ctx_isp,
|
||||
CAM_ISP_STATE_CHANGE_TRIGGER_FLUSH,
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/delay.h>
|
||||
@@ -151,7 +151,7 @@ static int cam_isp_dev_component_bind(struct device *dev,
|
||||
|
||||
int iommu_hdl = -1;
|
||||
|
||||
rc = of_property_read_string_index(pdev->dev.of_node, "arch-compat", 0,
|
||||
of_property_read_string_index(pdev->dev.of_node, "arch-compat", 0,
|
||||
(const char **)&compat_str);
|
||||
|
||||
g_isp_dev.sd.internal_ops = &cam_isp_subdev_internal_ops;
|
||||
@@ -260,7 +260,7 @@ static void cam_isp_dev_component_unbind(struct device *dev,
|
||||
const char *compat_str = NULL;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
rc = of_property_read_string_index(pdev->dev.of_node, "arch-compat", 0,
|
||||
of_property_read_string_index(pdev->dev.of_node, "arch-compat", 0,
|
||||
(const char **)&compat_str);
|
||||
|
||||
cam_isp_hw_mgr_deinit(compat_str);
|
||||
|
@@ -808,8 +808,6 @@ static int cam_ife_hw_mgr_check_and_notify_overflow(
|
||||
|
||||
for (i = 0; i < hw_mgr_ctx->num_base; i++) {
|
||||
|
||||
res_id = -1;
|
||||
|
||||
if (hw_mgr_ctx->base[i].hw_type == CAM_ISP_HW_TYPE_VFE) {
|
||||
if (hw_mgr_ctx->base[i].idx != evt->hw_idx)
|
||||
continue;
|
||||
@@ -1558,7 +1556,7 @@ static void cam_ife_hw_mgr_print_acquire_info(
|
||||
len += scnprintf(log_info + len, (128 - len), " DSP: Y");
|
||||
|
||||
if (hw_mgr_ctx->flags.is_offline)
|
||||
len += scnprintf(log_info + len, (128 - len), " OFFLINE: Y");
|
||||
scnprintf(log_info + len, (128 - len), " OFFLINE: Y");
|
||||
|
||||
CAM_GET_TIMESTAMP(hw_mgr_ctx->ts);
|
||||
CAM_CONVERT_TIMESTAMP_FORMAT(hw_mgr_ctx->ts, hrs, min, sec, ms);
|
||||
@@ -1941,7 +1939,6 @@ static int cam_ife_mgr_process_base_info(
|
||||
struct cam_isp_hw_mgr_res *hw_mgr_res;
|
||||
struct cam_isp_resource_node *res = NULL;
|
||||
uint32_t i;
|
||||
struct cam_ife_csid_hw_caps *csid_caps = NULL;
|
||||
struct cam_ife_hw_mgr *hw_mgr;
|
||||
bool hw_idx_map[CAM_IFE_CSID_HW_NUM_MAX] = {0};
|
||||
|
||||
@@ -1986,8 +1983,6 @@ static int cam_ife_mgr_process_base_info(
|
||||
if (hw_idx_map[res->hw_intf->hw_idx])
|
||||
continue;
|
||||
|
||||
csid_caps = &hw_mgr->csid_hw_caps[res->hw_intf->hw_idx];
|
||||
|
||||
cam_ife_mgr_add_base_info(ctx, i,
|
||||
res->hw_intf->hw_idx,
|
||||
CAM_ISP_HW_TYPE_CSID);
|
||||
@@ -3682,15 +3677,12 @@ static int cam_ife_hw_mgr_acquire_res_ife_csid_pxl(
|
||||
{
|
||||
int rc = 0, i;
|
||||
struct cam_isp_out_port_generic_info *out_port = NULL;
|
||||
struct cam_ife_hw_mgr *ife_hw_mgr;
|
||||
struct cam_isp_hw_mgr_res *csid_res;
|
||||
struct cam_hw_intf *hw_intf;
|
||||
struct cam_csid_hw_reserve_resource_args csid_acquire = {0};
|
||||
enum cam_ife_pix_path_res_id path_res_id;
|
||||
struct cam_ife_csid_dual_sync_args dual_sync_args = {0};
|
||||
|
||||
ife_hw_mgr = ife_ctx->hw_mgr;
|
||||
|
||||
if (is_ipp)
|
||||
path_res_id = CAM_IFE_PIX_PATH_RES_IPP;
|
||||
else
|
||||
@@ -3856,12 +3848,10 @@ static int cam_ife_hw_mgr_acquire_csid_rdi_util(
|
||||
uint32_t path_res_id,
|
||||
struct cam_isp_out_port_generic_info *out_port)
|
||||
{
|
||||
struct cam_ife_hw_mgr *ife_hw_mgr;
|
||||
struct cam_isp_hw_mgr_res *csid_res;
|
||||
struct cam_csid_hw_reserve_resource_args csid_acquire;
|
||||
int rc = 0;
|
||||
|
||||
ife_hw_mgr = ife_ctx->hw_mgr;
|
||||
rc = cam_ife_hw_mgr_get_res(&ife_ctx->free_res_list,
|
||||
&csid_res);
|
||||
if (rc) {
|
||||
@@ -4252,8 +4242,8 @@ static int cam_ife_mgr_check_and_update_fe(
|
||||
ife_ctx, acquire_hw_info, acquire_info_size);
|
||||
break;
|
||||
default:
|
||||
CAM_ERR(CAM_ISP, "Invalid ver of common info from user, ctx_idx: %u",
|
||||
ife_ctx->ctx_index);
|
||||
CAM_ERR(CAM_ISP, "Invalid ver of user common info: ctx_idx %u minor %u major %u",
|
||||
ife_ctx->ctx_index, minor_ver, major_ver);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -4555,9 +4545,6 @@ static int cam_ife_hw_mgr_acquire_offline_res_csid(
|
||||
struct cam_csid_hw_reserve_resource_args csid_acquire;
|
||||
struct cam_isp_hw_mgr_res *sfe_bus_rd_res;
|
||||
struct cam_isp_hw_mgr_res *csid_res;
|
||||
struct cam_ife_hw_mgr *ife_hw_mgr;
|
||||
|
||||
ife_hw_mgr = ife_ctx->hw_mgr;
|
||||
|
||||
sfe_bus_rd_res = list_first_entry(&ife_ctx->res_list_ife_in_rd,
|
||||
struct cam_isp_hw_mgr_res, list);
|
||||
@@ -4798,10 +4785,8 @@ static int cam_ife_mgr_acquire_hw_for_ctx(
|
||||
uint32_t *acquired_rdi_res)
|
||||
{
|
||||
int rc = -1;
|
||||
int is_dual_isp = 0;
|
||||
bool crop_enable = true;
|
||||
|
||||
is_dual_isp = in_port->usage_type;
|
||||
ife_ctx->flags.dsp_enabled = (bool)in_port->dsp_mode;
|
||||
ife_ctx->flags.is_dual = (bool)in_port->usage_type;
|
||||
|
||||
@@ -4999,7 +4984,6 @@ void cam_ife_cam_cdm_callback(uint32_t handle, void *userdata,
|
||||
{
|
||||
struct cam_isp_prepare_hw_update_data *hw_update_data = NULL;
|
||||
struct cam_ife_hw_mgr_ctx *ctx = NULL;
|
||||
struct cam_hw_dump_pf_args *pf_args = NULL;
|
||||
uint64_t req_id;
|
||||
|
||||
if (!userdata) {
|
||||
@@ -5033,7 +5017,6 @@ void cam_ife_cam_cdm_callback(uint32_t handle, void *userdata,
|
||||
handle, userdata, status, req_id, ctx->ctx_index,
|
||||
ctx->cdm_userdata.request_id);
|
||||
} else if (status == CAM_CDM_CB_STATUS_PAGEFAULT) {
|
||||
pf_args = (struct cam_hw_dump_pf_args *)cookie;
|
||||
if (ctx->common.sec_pf_evt_cb)
|
||||
ctx->common.sec_pf_evt_cb(ctx->common.cb_priv, cookie);
|
||||
} else {
|
||||
@@ -5286,7 +5269,8 @@ static int cam_ife_mgr_acquire_get_unified_structure(
|
||||
acquire_hw_info, offset, input_size, in_port);
|
||||
break;
|
||||
default:
|
||||
CAM_ERR(CAM_ISP, "Invalid ver of i/p port info from user");
|
||||
CAM_ERR(CAM_ISP, "Invalid ver of i/p port info from user. minor %u, major %u",
|
||||
minor_ver, major_ver);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -7524,7 +7508,6 @@ start_only:
|
||||
CAM_DBG(CAM_ISP, "START SFE OUT ... in ctx id:%u",
|
||||
ctx->ctx_index);
|
||||
for (i = 0; i < max_sfe_out_res; i++) {
|
||||
hw_mgr_res = &ctx->res_list_sfe_out[i];
|
||||
rc = cam_ife_hw_mgr_start_hw_res(
|
||||
&ctx->res_list_sfe_out[i], ctx);
|
||||
if (rc) {
|
||||
@@ -8089,10 +8072,9 @@ static int cam_isp_blob_ubwc_update_v2(
|
||||
kmd_buf_info->used_bytes/4 +
|
||||
total_used_bytes/4;
|
||||
|
||||
rc = cam_isp_get_generic_ubwc_data_v2(ubwc_plane_cfg,
|
||||
(void) cam_isp_get_generic_ubwc_data_v2(ubwc_plane_cfg,
|
||||
ubwc_config->api_version, &generic_ubwc_cfg);
|
||||
|
||||
|
||||
rc = cam_isp_add_cmd_buf_update(
|
||||
hw_mgr_res->hw_res[blob_info->base_info->split_id], hw_intf,
|
||||
blob_type,
|
||||
@@ -8178,11 +8160,9 @@ static int cam_isp_blob_ife_scratch_buf_update(
|
||||
struct cam_isp_sfe_scratch_buf_info *buffer_info;
|
||||
struct cam_ife_sfe_scratch_buf_info *port_info;
|
||||
struct cam_isp_hw_mgr_res *ife_out_res;
|
||||
struct cam_ife_hw_mgr *ife_hw_mgr;
|
||||
struct cam_ife_scratch_buf_cfg *ife_scratch_config;
|
||||
|
||||
ctx = prepare->ctxt_to_hw_map;
|
||||
ife_hw_mgr = ctx->hw_mgr;
|
||||
ife_scratch_config = ctx->scratch_buf_info.ife_scratch_config;
|
||||
|
||||
for (i = 0; i < scratch_config->num_ports; i++) {
|
||||
@@ -8231,10 +8211,8 @@ static int cam_isp_blob_sfe_scratch_buf_update(
|
||||
struct cam_isp_sfe_scratch_buf_info *buffer_info;
|
||||
struct cam_ife_sfe_scratch_buf_info *port_info;
|
||||
struct cam_isp_hw_mgr_res *sfe_out_res;
|
||||
struct cam_ife_hw_mgr *ife_hw_mgr;
|
||||
|
||||
ctx = prepare->ctxt_to_hw_map;
|
||||
ife_hw_mgr = ctx->hw_mgr;
|
||||
|
||||
for (i = 0; i < scratch_config->num_ports; i++) {
|
||||
buffer_info = &scratch_config->port_scratch_cfg[i];
|
||||
@@ -8447,7 +8425,6 @@ static int cam_isp_blob_sfe_exp_order_update(
|
||||
wm_rm_cache_cfg.use_cache = false;
|
||||
send_config = false;
|
||||
exp_type = CAM_ISP_EXPOSURE_MAX;
|
||||
sc_idx = CAM_LLCC_MAX;
|
||||
|
||||
if (i == exp_order_max)
|
||||
exp_type = CAM_ISP_LAST_EXPOSURE;
|
||||
@@ -8606,10 +8583,6 @@ static int cam_isp_blob_sfe_update_fetch_core_cfg(
|
||||
if (!hw_mgr_res->hw_res[blob_info->base_info->split_id])
|
||||
return 0;
|
||||
|
||||
cpu_addr = kmd_buf_info->cpu_addr +
|
||||
(kmd_buf_info->used_bytes / 4) +
|
||||
(total_used_bytes / 4);
|
||||
|
||||
res_id = hw_mgr_res->res_id;
|
||||
|
||||
/* check for active fetches */
|
||||
@@ -8769,7 +8742,6 @@ static int cam_isp_blob_csid_discard_init_frame_update(
|
||||
struct cam_hw_prepare_update_args *prepare)
|
||||
{
|
||||
struct cam_ife_hw_mgr_ctx *ctx = NULL;
|
||||
struct cam_ife_hw_mgr *ife_hw_mgr;
|
||||
struct cam_hw_intf *hw_intf;
|
||||
struct cam_isp_hw_mgr_res *hw_mgr_res;
|
||||
struct cam_isp_resource_node *res;
|
||||
@@ -8777,7 +8749,6 @@ static int cam_isp_blob_csid_discard_init_frame_update(
|
||||
int rc = -EINVAL, i;
|
||||
|
||||
ctx = prepare->ctxt_to_hw_map;
|
||||
ife_hw_mgr = ctx->hw_mgr;
|
||||
discard_args.num_frames = discard_config->num_frames;
|
||||
|
||||
list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) {
|
||||
@@ -8889,7 +8860,6 @@ static int cam_isp_blob_csid_clock_update(
|
||||
|
||||
list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_csid, list) {
|
||||
for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
||||
clk_rate = 0;
|
||||
if (!hw_mgr_res->hw_res[i])
|
||||
continue;
|
||||
clk_rate = clock_config->csid_clock;
|
||||
@@ -8977,7 +8947,6 @@ static int cam_isp_blob_core_cfg_update(
|
||||
struct cam_ife_hw_mgr_ctx *ctx = NULL;
|
||||
struct cam_isp_hw_mgr_res *hw_mgr_res;
|
||||
struct cam_hw_intf *hw_intf;
|
||||
uint64_t clk_rate = 0;
|
||||
int rc = 0, i;
|
||||
struct cam_vfe_core_config_args vfe_core_config;
|
||||
|
||||
@@ -8985,7 +8954,6 @@ static int cam_isp_blob_core_cfg_update(
|
||||
|
||||
list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) {
|
||||
for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
||||
clk_rate = 0;
|
||||
if (!hw_mgr_res->hw_res[i])
|
||||
continue;
|
||||
|
||||
@@ -15001,7 +14969,7 @@ static ssize_t cam_ife_hw_mgr_perfcnt_read(
|
||||
"To choose counter write to same file - \"<hw>_<counter_index>_<reg_val>\"\nEx. \"ife_1_6619140\"\n\n");
|
||||
}
|
||||
|
||||
len += scnprintf(display_string + len, (256 - len),
|
||||
scnprintf(display_string + len, (256 - len),
|
||||
"*****************************\n");
|
||||
|
||||
return simple_read_from_buffer(ubuf, size, loff_t, display_string,
|
||||
@@ -15081,7 +15049,7 @@ static int cam_ife_hw_mgr_debug_register(void)
|
||||
&g_ife_hw_mgr.debug_cfg.disable_ife_mmu_prefetch);
|
||||
debugfs_create_file("sfe_cache_debug", 0644,
|
||||
g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_sfe_cache_debug);
|
||||
dbgfileptr = debugfs_create_file("test_irq_line", 0644,
|
||||
debugfs_create_file("test_irq_line", 0644,
|
||||
g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_isp_test_irq_line);
|
||||
debugfs_create_file("isp_perf_counters", 0644,
|
||||
g_ife_hw_mgr.debug_cfg.dentry, NULL, &cam_ife_hw_mgr_perfcnter_debug);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <media/cam_defs.h>
|
||||
@@ -467,13 +467,11 @@ int cam_sfe_add_command_buffers(
|
||||
{
|
||||
int rc = 0;
|
||||
uint32_t cmd_meta_data, num_ent, i;
|
||||
uint32_t base_idx;
|
||||
enum cam_isp_hw_split_id split_id;
|
||||
struct cam_cmd_buf_desc *cmd_desc = NULL;
|
||||
struct cam_hw_update_entry *hw_entry = NULL;
|
||||
|
||||
split_id = base_info->split_id;
|
||||
base_idx = base_info->idx;
|
||||
hw_entry = prepare->hw_update_entries;
|
||||
|
||||
/*
|
||||
@@ -1453,13 +1451,11 @@ int cam_isp_add_csid_command_buffers(
|
||||
{
|
||||
int rc = 0;
|
||||
uint32_t cmd_meta_data, num_ent, i;
|
||||
uint32_t base_idx;
|
||||
enum cam_isp_hw_split_id split_id;
|
||||
struct cam_cmd_buf_desc *cmd_desc = NULL;
|
||||
struct cam_hw_update_entry *hw_entry = NULL;
|
||||
|
||||
split_id = base_info->split_id;
|
||||
base_idx = base_info->idx;
|
||||
hw_entry = prepare->hw_update_entries;
|
||||
|
||||
/*
|
||||
|
@@ -1360,9 +1360,11 @@ static int cam_ife_csid_ver1_tpg_stop(struct cam_ife_csid_ver1_hw *csid_hw)
|
||||
csid_hw->hw_intf->hw_idx);
|
||||
|
||||
/* Disable the IFE force clock on for dual isp case */
|
||||
if (csid_hw->tpg_cfg.usage_type)
|
||||
if (csid_hw->tpg_cfg.usage_type) {
|
||||
rc = cam_ife_csid_disable_ife_force_clock_on(soc_info,
|
||||
csid_reg->tpg_reg->cpas_ife_reg_offset);
|
||||
CAM_DBG(CAM_ISP, "Dual isp case: Disable IFE force clk. rc %d", rc);
|
||||
}
|
||||
|
||||
/*stop the TPG */
|
||||
cam_io_w_mb(0, soc_info->reg_map[0].mem_base +
|
||||
@@ -1637,10 +1639,6 @@ static int cam_ife_csid_ver1_in_port_validate(
|
||||
struct cam_ife_csid_ver1_hw *csid_hw)
|
||||
{
|
||||
int rc = 0;
|
||||
struct cam_ife_csid_ver1_reg_info *csid_reg;
|
||||
|
||||
csid_reg = (struct cam_ife_csid_ver1_reg_info *)
|
||||
csid_hw->core_info->csid_reg;
|
||||
|
||||
/* check in port args */
|
||||
rc = cam_ife_csid_check_in_port_args(reserve,
|
||||
@@ -1764,9 +1762,9 @@ int cam_ife_csid_ver1_reserve(void *hw_priv,
|
||||
csid_hw->event_cb = reserve->event_cb;
|
||||
csid_hw->token = reserve->cb_priv;
|
||||
|
||||
CAM_DBG(CAM_ISP, "CSID %d Resource[id:%d name:%s] state %d cid %d",
|
||||
CAM_DBG(CAM_ISP, "CSID %d Resource[id:%d name:%s] state %d cid %d rc %d",
|
||||
csid_hw->hw_intf->hw_idx, reserve->res_id,
|
||||
res->res_name, res->res_state, cid);
|
||||
res->res_name, res->res_state, cid, rc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -2643,9 +2641,9 @@ static int cam_ife_csid_ver1_enable_hw(struct cam_ife_csid_ver1_hw *csid_hw)
|
||||
soc_info->src_clk_idx, &clk_lvl);
|
||||
|
||||
CAM_DBG(CAM_ISP,
|
||||
"CSID[%d] clk lvl %u received clk_rate %u applied clk_rate %lu",
|
||||
"CSID[%d] clk lvl %u received clk_rate %u applied clk_rate %lu rc %d",
|
||||
csid_hw->hw_intf->hw_idx, clk_lvl, csid_hw->clk_rate,
|
||||
soc_info->applied_src_clk_rates.sw_client);
|
||||
soc_info->applied_src_clk_rates.sw_client, rc);
|
||||
|
||||
rc = cam_ife_csid_enable_soc_resources(soc_info, clk_lvl);
|
||||
|
||||
@@ -4525,8 +4523,8 @@ static irqreturn_t cam_ife_csid_irq(int irq_num, void *data)
|
||||
&csid_hw->free_payload_list);
|
||||
|
||||
if (!evt_payload) {
|
||||
CAM_ERR_RATE_LIMIT(CAM_ISP, "CSID[%u], no free tasklet",
|
||||
csid_hw->hw_intf->hw_idx);
|
||||
CAM_ERR_RATE_LIMIT(CAM_ISP, "CSID[%u], no free tasklet rc %d",
|
||||
csid_hw->hw_intf->hw_idx, rc);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
@@ -2546,7 +2546,7 @@ static inline void cam_ife_csid_ver2_maskout_path_irqs(
|
||||
|
||||
path_cfg->top_irq_handle = 0;
|
||||
|
||||
rc = cam_irq_controller_unregister_dependent(
|
||||
(void) cam_irq_controller_unregister_dependent(
|
||||
csid_hw->top_irq_controller,
|
||||
csid_hw->path_irq_controller[res_id]);
|
||||
}
|
||||
@@ -2606,7 +2606,7 @@ static inline void cam_ife_csid_ver2_disable_path_irqs_evts(
|
||||
|
||||
path_cfg->top_irq_handle = 0;
|
||||
|
||||
rc = cam_irq_controller_unregister_dependent(
|
||||
(void) cam_irq_controller_unregister_dependent(
|
||||
csid_hw->top_irq_controller,
|
||||
csid_hw->path_irq_controller[res_id]);
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
#include <linux/slab.h>
|
||||
#include "cam_ife_csid_soc.h"
|
||||
@@ -26,7 +26,6 @@ static int cam_ife_csid_get_dt_properties(struct cam_hw_soc_info *soc_info)
|
||||
if (rc) {
|
||||
CAM_DBG(CAM_ISP, "No max-width declared");
|
||||
soc_private->max_width_enabled = false;
|
||||
rc = 0;
|
||||
} else {
|
||||
soc_private->max_width_enabled = true;
|
||||
}
|
||||
|
@@ -290,7 +290,6 @@ int cam_sfe_start(void *hw_priv, void *start_args, uint32_t arg_size)
|
||||
struct cam_sfe_hw_core_info *core_info = NULL;
|
||||
struct cam_hw_info *sfe_hw = hw_priv;
|
||||
struct cam_isp_resource_node *sfe_res;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
int rc;
|
||||
|
||||
if (!hw_priv || !start_args ||
|
||||
@@ -299,7 +298,6 @@ int cam_sfe_start(void *hw_priv, void *start_args, uint32_t arg_size)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
soc_info = &sfe_hw->soc_info;
|
||||
core_info = (struct cam_sfe_hw_core_info *)sfe_hw->core_info;
|
||||
sfe_res = (struct cam_isp_resource_node *)start_args;
|
||||
core_info->tasklet_info = sfe_res->tasklet_info;
|
||||
@@ -379,7 +377,6 @@ int cam_sfe_process_cmd(void *hw_priv, uint32_t cmd_type,
|
||||
struct cam_hw_info *sfe_hw = hw_priv;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
struct cam_sfe_hw_core_info *core_info = NULL;
|
||||
struct cam_sfe_hw_info *hw_info = NULL;
|
||||
int rc = 0;
|
||||
|
||||
if (!hw_priv) {
|
||||
@@ -389,7 +386,6 @@ int cam_sfe_process_cmd(void *hw_priv, uint32_t cmd_type,
|
||||
|
||||
soc_info = &sfe_hw->soc_info;
|
||||
core_info = (struct cam_sfe_hw_core_info *)sfe_hw->core_info;
|
||||
hw_info = core_info->sfe_hw_info;
|
||||
|
||||
switch (cmd_type) {
|
||||
case CAM_ISP_HW_CMD_GET_CHANGE_BASE:
|
||||
|
@@ -1666,7 +1666,6 @@ skip_cache_cfg:
|
||||
static int cam_sfe_bus_rd_update_rm_core_cfg(
|
||||
void *priv, void *cmd_args, uint32_t arg_size)
|
||||
{
|
||||
struct cam_sfe_bus_rd_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *cmd_update;
|
||||
struct cam_sfe_bus_rd_data *sfe_bus_rd_data = NULL;
|
||||
struct cam_sfe_bus_rd_rm_resource_data *rm_data = NULL;
|
||||
@@ -1676,7 +1675,6 @@ static int cam_sfe_bus_rd_update_rm_core_cfg(
|
||||
uint32_t num_regval_pairs = 0, i, j, size = 0;
|
||||
uint32_t hw_cfg = 0;
|
||||
|
||||
bus_priv = (struct cam_sfe_bus_rd_priv *) priv;
|
||||
cmd_update = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
enable_disable = *(bool *)cmd_update->data;
|
||||
|
||||
@@ -1819,13 +1817,11 @@ static int cam_sfe_bus_rd_config_update(
|
||||
void *priv, void *cmd_args, uint32_t arg_size)
|
||||
{
|
||||
int i;
|
||||
struct cam_sfe_bus_rd_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *rm_config_update;
|
||||
struct cam_isp_vfe_wm_config *rm_config = NULL;
|
||||
struct cam_sfe_bus_rd_data *sfe_bus_rd_data = NULL;
|
||||
struct cam_sfe_bus_rd_rm_resource_data *rm_data = NULL;
|
||||
|
||||
bus_priv = (struct cam_sfe_bus_rd_priv *) priv;
|
||||
rm_config_update = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
rm_config = (struct cam_isp_vfe_wm_config *)
|
||||
rm_config_update->data;
|
||||
@@ -1989,7 +1985,6 @@ int cam_sfe_bus_rd_init(
|
||||
struct cam_sfe_bus **sfe_bus)
|
||||
{
|
||||
int i, rc = 0;
|
||||
struct cam_sfe_soc_private *soc_private;
|
||||
struct cam_sfe_bus_rd_priv *bus_priv = NULL;
|
||||
struct cam_sfe_bus *sfe_bus_local;
|
||||
struct cam_sfe_bus_rd_hw_info *bus_rd_hw_info = bus_hw_info;
|
||||
@@ -2002,7 +1997,6 @@ int cam_sfe_bus_rd_init(
|
||||
goto end;
|
||||
}
|
||||
|
||||
soc_private = soc_info->soc_private;
|
||||
sfe_bus_local = kzalloc(sizeof(struct cam_sfe_bus), GFP_KERNEL);
|
||||
if (!sfe_bus_local) {
|
||||
CAM_DBG(CAM_SFE, "Failed to alloc for sfe_bus");
|
||||
|
@@ -1106,10 +1106,8 @@ static int cam_sfe_bus_start_comp_grp(
|
||||
{
|
||||
int rc = 0;
|
||||
struct cam_sfe_bus_wr_comp_grp_data *rsrc_data = NULL;
|
||||
struct cam_sfe_bus_wr_common_data *common_data = NULL;
|
||||
|
||||
rsrc_data = comp_grp->res_priv;
|
||||
common_data = rsrc_data->common_data;
|
||||
|
||||
CAM_DBG(CAM_SFE,
|
||||
"Start SFE:%d comp_grp:%d streaming state:%d comp_mask:0x%X",
|
||||
@@ -1216,7 +1214,6 @@ static int cam_sfe_bus_acquire_sfe_out(void *priv, void *acquire_args,
|
||||
int rc = -ENODEV;
|
||||
int i;
|
||||
enum cam_sfe_bus_sfe_out_type sfe_out_res_id;
|
||||
uint32_t format;
|
||||
struct cam_sfe_bus_wr_priv *bus_priv = priv;
|
||||
struct cam_sfe_acquire_args *acq_args = acquire_args;
|
||||
struct cam_sfe_hw_sfe_out_acquire_args *out_acquire_args;
|
||||
@@ -1233,7 +1230,6 @@ static int cam_sfe_bus_acquire_sfe_out(void *priv, void *acquire_args,
|
||||
|
||||
comp_grp_id = CAM_SFE_BUS_WR_COMP_GRP_MAX;
|
||||
out_acquire_args = &acq_args->sfe_out;
|
||||
format = out_acquire_args->out_port_info->format;
|
||||
|
||||
CAM_DBG(CAM_SFE, "SFE:%d Acquire out_type:0x%X",
|
||||
bus_priv->common_data.core_index,
|
||||
@@ -1491,7 +1487,6 @@ static int cam_sfe_bus_start_sfe_out(
|
||||
struct cam_sfe_bus_wr_priv *bus_priv;
|
||||
struct cam_sfe_bus_wr_common_data *common_data = NULL;
|
||||
uint32_t bus_irq_reg_mask[1];
|
||||
uint32_t source_group = 0;
|
||||
|
||||
if (!sfe_out) {
|
||||
CAM_ERR(CAM_SFE, "Invalid input");
|
||||
@@ -1501,7 +1496,6 @@ static int cam_sfe_bus_start_sfe_out(
|
||||
rsrc_data = sfe_out->res_priv;
|
||||
bus_priv = rsrc_data->bus_priv;
|
||||
common_data = rsrc_data->common_data;
|
||||
source_group = rsrc_data->source_group;
|
||||
|
||||
if (sfe_out->res_state != CAM_ISP_RESOURCE_STATE_RESERVED) {
|
||||
CAM_ERR(CAM_SFE,
|
||||
@@ -2751,7 +2745,6 @@ static int cam_sfe_bus_wr_config_wm(void *priv, void *cmd_args,
|
||||
static int cam_sfe_bus_wr_update_hfr(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_sfe_bus_wr_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_hfr;
|
||||
struct cam_sfe_bus_wr_out_data *sfe_out_data = NULL;
|
||||
struct cam_sfe_bus_wr_wm_resource_data *wm_data = NULL;
|
||||
@@ -2761,7 +2754,6 @@ static int cam_sfe_bus_wr_update_hfr(void *priv, void *cmd_args,
|
||||
uint32_t num_regval_pairs = 0;
|
||||
uint32_t i, j, size = 0;
|
||||
|
||||
bus_priv = (struct cam_sfe_bus_wr_priv *) priv;
|
||||
update_hfr = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
|
||||
sfe_out_data = (struct cam_sfe_bus_wr_out_data *)
|
||||
@@ -3009,7 +3001,6 @@ static int cam_sfe_bus_wr_update_wm_config(
|
||||
static int cam_sfe_bus_wr_update_bw_limiter(
|
||||
void *priv, void *cmd_args, uint32_t arg_size)
|
||||
{
|
||||
struct cam_sfe_bus_wr_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *wm_config_update;
|
||||
struct cam_sfe_bus_wr_out_data *sfe_out_data = NULL;
|
||||
struct cam_cdm_utils_ops *cdm_util_ops;
|
||||
@@ -3019,7 +3010,6 @@ static int cam_sfe_bus_wr_update_bw_limiter(
|
||||
uint32_t *reg_val_pair, num_regval_pairs = 0;
|
||||
uint32_t i, j, size = 0;
|
||||
|
||||
bus_priv = (struct cam_sfe_bus_wr_priv *) priv;
|
||||
wm_config_update = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
wm_bw_limit_cfg = (struct cam_isp_wm_bw_limiter_config *)
|
||||
wm_config_update->data;
|
||||
@@ -3358,7 +3348,6 @@ int cam_sfe_bus_wr_init(
|
||||
struct cam_sfe_bus **sfe_bus)
|
||||
{
|
||||
int i, rc = 0;
|
||||
struct cam_sfe_soc_private *soc_private;
|
||||
struct cam_sfe_bus_wr_priv *bus_priv = NULL;
|
||||
struct cam_sfe_bus *sfe_bus_local;
|
||||
struct cam_sfe_bus_wr_hw_info *hw_info = bus_hw_info;
|
||||
@@ -3373,7 +3362,6 @@ int cam_sfe_bus_wr_init(
|
||||
goto end;
|
||||
}
|
||||
|
||||
soc_private = soc_info->soc_private;
|
||||
sfe_bus_local = kzalloc(sizeof(struct cam_sfe_bus), GFP_KERNEL);
|
||||
if (!sfe_bus_local) {
|
||||
CAM_DBG(CAM_SFE, "Failed to alloc for sfe_bus");
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@@ -566,7 +566,6 @@ int cam_sfe_top_bw_update(struct cam_sfe_soc_private *soc_private,
|
||||
{
|
||||
struct cam_sfe_bw_update_args *bw_update = NULL;
|
||||
struct cam_isp_resource_node *res = NULL;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
int rc = 0;
|
||||
int i;
|
||||
|
||||
@@ -576,7 +575,6 @@ int cam_sfe_top_bw_update(struct cam_sfe_soc_private *soc_private,
|
||||
if (!res || !res->hw_intf || !res->hw_intf->hw_priv)
|
||||
return -EINVAL;
|
||||
|
||||
hw_info = res->hw_intf->hw_priv;
|
||||
|
||||
if (res->res_type != CAM_ISP_RESOURCE_SFE_IN ||
|
||||
res->res_id >= CAM_ISP_HW_SFE_IN_MAX) {
|
||||
@@ -813,7 +811,6 @@ static int cam_sfe_top_clock_update(
|
||||
{
|
||||
struct cam_sfe_clock_update_args *clk_update = NULL;
|
||||
struct cam_isp_resource_node *res = NULL;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
int i;
|
||||
|
||||
if (arg_size != sizeof(struct cam_sfe_clock_update_args)) {
|
||||
@@ -836,7 +833,6 @@ static int cam_sfe_top_clock_update(
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hw_info = res->hw_intf->hw_priv;
|
||||
|
||||
if (res->res_type != CAM_ISP_RESOURCE_SFE_IN ||
|
||||
res->res_id >= CAM_ISP_HW_SFE_IN_MAX) {
|
||||
@@ -1228,7 +1224,6 @@ int cam_sfe_top_reserve(void *device_priv,
|
||||
struct cam_sfe_top_priv *top_priv;
|
||||
struct cam_sfe_acquire_args *args;
|
||||
struct cam_sfe_hw_sfe_in_acquire_args *acquire_args;
|
||||
struct cam_sfe_path_data *path_data;
|
||||
int rc = -EINVAL, i;
|
||||
|
||||
if (!device_priv || !reserve_args) {
|
||||
@@ -1258,8 +1253,6 @@ int cam_sfe_top_reserve(void *device_priv,
|
||||
if ((top_priv->in_rsrc[i].res_id == acquire_args->res_id) &&
|
||||
(top_priv->in_rsrc[i].res_state ==
|
||||
CAM_ISP_RESOURCE_STATE_AVAILABLE)) {
|
||||
path_data = (struct cam_sfe_path_data *)
|
||||
top_priv->in_rsrc[i].res_priv;
|
||||
CAM_DBG(CAM_SFE,
|
||||
"SFE [%u] for rsrc: %u acquired",
|
||||
top_priv->in_rsrc[i].hw_intf->hw_idx,
|
||||
@@ -1655,7 +1648,6 @@ int cam_sfe_top_start(
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
struct cam_sfe_path_data *path_data;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
struct cam_sfe_soc_private *soc_private = NULL;
|
||||
uint32_t error_mask[CAM_SFE_IRQ_REGISTERS_MAX];
|
||||
uint32_t sof_eof_mask[CAM_SFE_IRQ_REGISTERS_MAX];
|
||||
uint32_t core_cfg = 0, i = 0;
|
||||
@@ -1668,7 +1660,6 @@ int cam_sfe_top_start(
|
||||
top_priv = (struct cam_sfe_top_priv *)priv;
|
||||
sfe_res = (struct cam_isp_resource_node *) start_args;
|
||||
soc_info = top_priv->common_data.soc_info;
|
||||
soc_private = soc_info->soc_private;
|
||||
|
||||
hw_info = (struct cam_hw_info *)sfe_res->hw_intf->hw_priv;
|
||||
if (!hw_info) {
|
||||
|
@@ -211,7 +211,7 @@ int cam_vfe_deinit_hw(void *hw_priv, void *deinit_hw_args, uint32_t arg_size)
|
||||
rc = cam_vfe_reset(hw_priv, &reset_core_args, sizeof(uint32_t));
|
||||
|
||||
/* Turn OFF Regulators, Clocks and other SOC resources */
|
||||
CAM_DBG(CAM_ISP, "Disable SOC resource");
|
||||
CAM_DBG(CAM_ISP, "Disable SOC resource, rc: %d", rc);
|
||||
rc = cam_vfe_disable_soc_resources(soc_info);
|
||||
if (rc)
|
||||
CAM_ERR(CAM_ISP, "Disable SOC failed");
|
||||
@@ -382,7 +382,6 @@ int cam_vfe_start(void *hw_priv, void *start_args, uint32_t arg_size)
|
||||
struct cam_vfe_hw_core_info *core_info = NULL;
|
||||
struct cam_hw_info *vfe_hw = hw_priv;
|
||||
struct cam_isp_resource_node *isp_res;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
int rc = 0;
|
||||
|
||||
if (!hw_priv || !start_args ||
|
||||
@@ -391,7 +390,6 @@ int cam_vfe_start(void *hw_priv, void *start_args, uint32_t arg_size)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
soc_info = &vfe_hw->soc_info;
|
||||
core_info = (struct cam_vfe_hw_core_info *)vfe_hw->core_info;
|
||||
isp_res = (struct cam_isp_resource_node *)start_args;
|
||||
core_info->tasklet_info = isp_res->tasklet_info;
|
||||
@@ -488,7 +486,6 @@ int cam_vfe_process_cmd(void *hw_priv, uint32_t cmd_type,
|
||||
struct cam_hw_info *vfe_hw = hw_priv;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
struct cam_vfe_hw_core_info *core_info = NULL;
|
||||
struct cam_vfe_hw_info *hw_info = NULL;
|
||||
int rc = 0;
|
||||
|
||||
if (!hw_priv) {
|
||||
@@ -498,7 +495,6 @@ int cam_vfe_process_cmd(void *hw_priv, uint32_t cmd_type,
|
||||
|
||||
soc_info = &vfe_hw->soc_info;
|
||||
core_info = (struct cam_vfe_hw_core_info *)vfe_hw->core_info;
|
||||
hw_info = core_info->vfe_hw_info;
|
||||
|
||||
switch (cmd_type) {
|
||||
case CAM_ISP_HW_CMD_GET_CHANGE_BASE:
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/ratelimit.h>
|
||||
@@ -859,7 +859,6 @@ static int cam_vfe_bus_rd_ver1_handle_irq(uint32_t evt_id,
|
||||
static int cam_vfe_bus_rd_update_rm(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_rd_ver1_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_buf;
|
||||
struct cam_buf_io_cfg *io_cfg;
|
||||
struct cam_vfe_bus_rd_ver1_vfe_bus_rd_data *vfe_bus_rd_data = NULL;
|
||||
@@ -870,7 +869,6 @@ static int cam_vfe_bus_rd_update_rm(void *priv, void *cmd_args,
|
||||
uint32_t i, j, size = 0;
|
||||
uint32_t buf_size = 0;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_rd_ver1_priv *) priv;
|
||||
update_buf = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
|
||||
vfe_bus_rd_data = (struct cam_vfe_bus_rd_ver1_vfe_bus_rd_data *)
|
||||
@@ -981,7 +979,6 @@ static int cam_vfe_bus_rd_update_fs_cfg(void *priv, void *cmd_args,
|
||||
struct cam_vfe_bus_rd_ver1_rm_resource_data *rm_data = NULL;
|
||||
struct cam_vfe_fe_update_args *fe_upd_args;
|
||||
struct cam_fe_config *fe_cfg;
|
||||
struct cam_vfe_bus_rd_ver1_common_data *common_data;
|
||||
int i = 0;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_rd_ver1_priv *) priv;
|
||||
@@ -1000,7 +997,6 @@ static int cam_vfe_bus_rd_update_fs_cfg(void *priv, void *cmd_args,
|
||||
for (i = 0; i < vfe_bus_rd_data->num_rm; i++) {
|
||||
|
||||
rm_data = vfe_bus_rd_data->rm_res[i]->res_priv;
|
||||
common_data = rm_data->common_data;
|
||||
|
||||
rm_data->format = fe_cfg->format;
|
||||
rm_data->unpacker_cfg = fe_cfg->unpacker_cfg;
|
||||
|
@@ -2126,7 +2126,7 @@ static int cam_vfe_bus_acquire_vfe_out(void *bus_priv, void *acquire_args,
|
||||
mode);
|
||||
mutex_unlock(
|
||||
&rsrc_data->common_data->bus_mutex);
|
||||
return -EINVAL;
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
rsrc_data->common_data->num_sec_out++;
|
||||
@@ -2623,7 +2623,6 @@ static void cam_vfe_bus_update_ubwc_meta_addr(
|
||||
|
||||
if (!regs || !reg_val_pair || !j) {
|
||||
CAM_ERR(CAM_ISP, "Invalid args");
|
||||
rc = -EINVAL;
|
||||
goto end;
|
||||
}
|
||||
|
||||
@@ -2900,12 +2899,10 @@ end:
|
||||
static int cam_vfe_bus_update_wm(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_ver2_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_buf;
|
||||
struct cam_buf_io_cfg *io_cfg;
|
||||
struct cam_vfe_bus_ver2_vfe_out_data *vfe_out_data = NULL;
|
||||
struct cam_vfe_bus_ver2_wm_resource_data *wm_data = NULL;
|
||||
struct cam_vfe_bus_ver2_reg_offset_ubwc_client *ubwc_client = NULL;
|
||||
struct cam_cdm_utils_ops *cdm_util_ops;
|
||||
uint32_t *reg_val_pair;
|
||||
uint32_t num_regval_pairs = 0;
|
||||
@@ -2913,7 +2910,6 @@ static int cam_vfe_bus_update_wm(void *priv, void *cmd_args,
|
||||
uint32_t frame_inc = 0, val;
|
||||
uint32_t loop_size = 0;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_ver2_priv *) priv;
|
||||
update_buf = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
|
||||
vfe_out_data = (struct cam_vfe_bus_ver2_vfe_out_data *)
|
||||
@@ -2945,7 +2941,6 @@ static int cam_vfe_bus_update_wm(void *priv, void *cmd_args,
|
||||
}
|
||||
|
||||
wm_data = vfe_out_data->wm_res[i]->res_priv;
|
||||
ubwc_client = wm_data->hw_regs->ubwc_regs;
|
||||
/* update width register */
|
||||
CAM_VFE_ADD_REG_VAL_PAIR(reg_val_pair, j,
|
||||
wm_data->hw_regs->buffer_width_cfg,
|
||||
@@ -3082,7 +3077,6 @@ static int cam_vfe_bus_update_wm(void *priv, void *cmd_args,
|
||||
static int cam_vfe_bus_update_hfr(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_ver2_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_hfr;
|
||||
struct cam_vfe_bus_ver2_vfe_out_data *vfe_out_data = NULL;
|
||||
struct cam_vfe_bus_ver2_wm_resource_data *wm_data = NULL;
|
||||
@@ -3092,7 +3086,6 @@ static int cam_vfe_bus_update_hfr(void *priv, void *cmd_args,
|
||||
uint32_t num_regval_pairs = 0;
|
||||
uint32_t i, j, size = 0;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_ver2_priv *) priv;
|
||||
update_hfr = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
|
||||
vfe_out_data = (struct cam_vfe_bus_ver2_vfe_out_data *)
|
||||
|
@@ -458,7 +458,7 @@ static enum cam_vfe_bus_ver3_vfe_out_type
|
||||
bus_priv->common_data.core_index, res_type);
|
||||
vfe_out_type = CAM_VFE_BUS_VER3_VFE_OUT_MAX;
|
||||
*index = CAM_VFE_BUS_VER3_VFE_OUT_MAX;
|
||||
return CAM_VFE_BUS_VER3_VFE_OUT_MAX;
|
||||
return vfe_out_type;
|
||||
}
|
||||
*index = bus_priv->vfe_out_map_outtype[vfe_out_type];
|
||||
|
||||
@@ -1797,7 +1797,6 @@ static int cam_vfe_bus_ver3_acquire_vfe_out(void *bus_priv, void *acquire_args,
|
||||
int rc = -ENODEV;
|
||||
int i;
|
||||
enum cam_vfe_bus_ver3_vfe_out_type vfe_out_res_id;
|
||||
uint32_t format;
|
||||
struct cam_vfe_bus_ver3_priv *ver3_bus_priv = bus_priv;
|
||||
struct cam_vfe_acquire_args *acq_args = acquire_args;
|
||||
struct cam_vfe_hw_vfe_out_acquire_args *out_acquire_args;
|
||||
@@ -1813,7 +1812,6 @@ static int cam_vfe_bus_ver3_acquire_vfe_out(void *bus_priv, void *acquire_args,
|
||||
}
|
||||
|
||||
out_acquire_args = &acq_args->vfe_out;
|
||||
format = out_acquire_args->out_port_info->format;
|
||||
|
||||
CAM_DBG(CAM_ISP, "VFE:%u Acquire out_type:0x%X",
|
||||
ver3_bus_priv->common_data.core_index,
|
||||
@@ -1882,7 +1880,7 @@ static int cam_vfe_bus_ver3_acquire_vfe_out(void *bus_priv, void *acquire_args,
|
||||
mode);
|
||||
mutex_unlock(
|
||||
&rsrc_data->common_data->bus_mutex);
|
||||
return -EINVAL;
|
||||
return rc;
|
||||
}
|
||||
}
|
||||
rsrc_data->common_data->num_sec_out++;
|
||||
@@ -3143,16 +3141,16 @@ static int cam_vfe_bus_ver3_config_ubwc_regs(
|
||||
static int cam_vfe_bus_ver3_config_wm(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_buf;
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_vfe_bus_ver3_vfe_out_data *vfe_out_data = NULL;
|
||||
struct cam_vfe_bus_ver3_wm_resource_data *wm_data = NULL;
|
||||
struct cam_vfe_bus_ver3_reg_offset_ubwc_client *ubwc_regs;
|
||||
uint32_t i, val, iova_addr, iova_offset, stride;
|
||||
dma_addr_t iova;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
update_buf = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
|
||||
vfe_out_data = (struct cam_vfe_bus_ver3_vfe_out_data *)
|
||||
update_buf->res->res_priv;
|
||||
@@ -3241,12 +3239,11 @@ static int cam_vfe_bus_ver3_config_wm(void *priv, void *cmd_args,
|
||||
static int cam_vfe_bus_ver3_update_wm(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_buf;
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_buf_io_cfg *io_cfg;
|
||||
struct cam_vfe_bus_ver3_vfe_out_data *vfe_out_data = NULL;
|
||||
struct cam_vfe_bus_ver3_wm_resource_data *wm_data = NULL;
|
||||
struct cam_vfe_bus_ver3_reg_offset_ubwc_client *ubwc_client = NULL;
|
||||
struct cam_cdm_utils_ops *cdm_util_ops;
|
||||
uint32_t *reg_val_pair;
|
||||
uint32_t num_regval_pairs = 0;
|
||||
@@ -3255,8 +3252,8 @@ static int cam_vfe_bus_ver3_update_wm(void *priv, void *cmd_args,
|
||||
uint32_t iova_addr, iova_offset, image_buf_offset = 0, stride, slice_h;
|
||||
dma_addr_t iova;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
update_buf = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
|
||||
vfe_out_data = (struct cam_vfe_bus_ver3_vfe_out_data *)
|
||||
update_buf->res->res_priv;
|
||||
@@ -3297,7 +3294,6 @@ static int cam_vfe_bus_ver3_update_wm(void *priv, void *cmd_args,
|
||||
}
|
||||
|
||||
wm_data = vfe_out_data->wm_res[i].res_priv;
|
||||
ubwc_client = wm_data->hw_regs->ubwc_regs;
|
||||
|
||||
/* Disable frame header in case it was previously enabled */
|
||||
if ((wm_data->en_cfg) & (1 << 2))
|
||||
@@ -3513,8 +3509,8 @@ static int cam_vfe_bus_ver3_update_wm(void *priv, void *cmd_args,
|
||||
static int cam_vfe_bus_ver3_update_hfr(void *priv, void *cmd_args,
|
||||
uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *update_hfr;
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_vfe_bus_ver3_vfe_out_data *vfe_out_data = NULL;
|
||||
struct cam_vfe_bus_ver3_wm_resource_data *wm_data = NULL;
|
||||
struct cam_isp_port_hfr_config *hfr_cfg = NULL;
|
||||
@@ -3523,8 +3519,8 @@ static int cam_vfe_bus_ver3_update_hfr(void *priv, void *cmd_args,
|
||||
uint32_t num_regval_pairs = 0;
|
||||
uint32_t i, j, size = 0;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
update_hfr = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
|
||||
vfe_out_data = (struct cam_vfe_bus_ver3_vfe_out_data *)
|
||||
update_hfr->res->res_priv;
|
||||
@@ -3883,7 +3879,6 @@ static int cam_vfe_bus_ver3_update_wm_config(
|
||||
static int cam_vfe_bus_update_bw_limiter(
|
||||
void *priv, void *cmd_args, uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_bus_ver3_priv *bus_priv;
|
||||
struct cam_isp_hw_get_cmd_update *wm_config_update;
|
||||
struct cam_vfe_bus_ver3_vfe_out_data *vfe_out_data = NULL;
|
||||
struct cam_cdm_utils_ops *cdm_util_ops;
|
||||
@@ -3894,7 +3889,6 @@ static int cam_vfe_bus_update_bw_limiter(
|
||||
uint32_t i, j, size = 0;
|
||||
bool limiter_enabled = false;
|
||||
|
||||
bus_priv = (struct cam_vfe_bus_ver3_priv *) priv;
|
||||
wm_config_update = (struct cam_isp_hw_get_cmd_update *) cmd_args;
|
||||
wm_bw_limit_cfg = (struct cam_isp_wm_bw_limiter_config *)
|
||||
wm_config_update->data;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@@ -353,7 +353,6 @@ static int cam_vfe_camif_resource_start(
|
||||
uint32_t epoch0_irq_mask;
|
||||
uint32_t epoch1_irq_mask;
|
||||
uint32_t computed_epoch_line_cfg;
|
||||
int rc = 0;
|
||||
uint32_t err_irq_mask[CAM_IFE_IRQ_REGISTERS_MAX];
|
||||
uint32_t irq_mask[CAM_IFE_IRQ_REGISTERS_MAX];
|
||||
uint32_t dual_vfe_sync_val;
|
||||
@@ -492,7 +491,6 @@ static int cam_vfe_camif_resource_start(
|
||||
CAM_IRQ_EVT_GROUP_0);
|
||||
if (rsrc_data->irq_handle < 1) {
|
||||
CAM_ERR(CAM_ISP, "IRQ handle subscribe failure");
|
||||
rc = -ENOMEM;
|
||||
rsrc_data->irq_handle = 0;
|
||||
}
|
||||
}
|
||||
@@ -511,7 +509,6 @@ subscribe_err:
|
||||
CAM_IRQ_EVT_GROUP_0);
|
||||
if (rsrc_data->irq_err_handle < 1) {
|
||||
CAM_ERR(CAM_ISP, "Error IRQ handle subscribe failure");
|
||||
rc = -ENOMEM;
|
||||
rsrc_data->irq_err_handle = 0;
|
||||
}
|
||||
}
|
||||
@@ -592,7 +589,6 @@ static int cam_vfe_camif_resource_stop(
|
||||
struct cam_isp_resource_node *camif_res)
|
||||
{
|
||||
struct cam_vfe_mux_camif_data *camif_priv;
|
||||
struct cam_vfe_camif_ver2_reg *camif_reg;
|
||||
int rc = 0;
|
||||
uint32_t val = 0;
|
||||
|
||||
@@ -606,7 +602,6 @@ static int cam_vfe_camif_resource_stop(
|
||||
return 0;
|
||||
|
||||
camif_priv = (struct cam_vfe_mux_camif_data *)camif_res->res_priv;
|
||||
camif_reg = camif_priv->camif_reg;
|
||||
|
||||
if ((camif_priv->dsp_mode >= CAM_ISP_DSP_MODE_ONE_WAY) &&
|
||||
(camif_priv->dsp_mode <= CAM_ISP_DSP_MODE_ROUND)) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@@ -372,7 +372,6 @@ static int cam_vfe_camif_ver3_resource_start(
|
||||
uint32_t epoch0_line_cfg;
|
||||
uint32_t epoch1_line_cfg;
|
||||
uint32_t computed_epoch_line_cfg;
|
||||
int rc = 0;
|
||||
uint32_t err_irq_mask[CAM_IFE_IRQ_REGISTERS_MAX];
|
||||
uint32_t irq_mask[CAM_IFE_IRQ_REGISTERS_MAX];
|
||||
struct cam_vfe_soc_private *soc_private;
|
||||
@@ -561,7 +560,6 @@ static int cam_vfe_camif_ver3_resource_start(
|
||||
|
||||
if (rsrc_data->irq_handle < 1) {
|
||||
CAM_ERR(CAM_ISP, "IRQ handle subscribe failure");
|
||||
rc = -ENOMEM;
|
||||
rsrc_data->irq_handle = 0;
|
||||
}
|
||||
}
|
||||
@@ -586,7 +584,6 @@ static int cam_vfe_camif_ver3_resource_start(
|
||||
|
||||
if (rsrc_data->sof_irq_handle < 1) {
|
||||
CAM_ERR(CAM_ISP, "SOF IRQ handle subscribe failure");
|
||||
rc = -ENOMEM;
|
||||
rsrc_data->sof_irq_handle = 0;
|
||||
}
|
||||
}
|
||||
@@ -606,7 +603,6 @@ subscribe_err:
|
||||
|
||||
if (rsrc_data->irq_err_handle < 1) {
|
||||
CAM_ERR(CAM_ISP, "Error IRQ handle subscribe failure");
|
||||
rc = -ENOMEM;
|
||||
rsrc_data->irq_err_handle = 0;
|
||||
}
|
||||
}
|
||||
@@ -704,7 +700,6 @@ static int cam_vfe_camif_ver3_resource_stop(
|
||||
struct cam_isp_resource_node *camif_res)
|
||||
{
|
||||
struct cam_vfe_mux_camif_ver3_data *camif_priv;
|
||||
struct cam_vfe_camif_ver3_pp_clc_reg *camif_reg;
|
||||
int rc = 0;
|
||||
uint32_t val = 0;
|
||||
|
||||
@@ -718,7 +713,6 @@ static int cam_vfe_camif_ver3_resource_stop(
|
||||
return 0;
|
||||
|
||||
camif_priv = (struct cam_vfe_mux_camif_ver3_data *)camif_res->res_priv;
|
||||
camif_reg = camif_priv->camif_reg;
|
||||
|
||||
if ((camif_priv->dsp_mode >= CAM_ISP_DSP_MODE_ONE_WAY) &&
|
||||
(camif_priv->dsp_mode <= CAM_ISP_DSP_MODE_ROUND)) {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@@ -405,7 +406,6 @@ static int cam_vfe_fe_resource_stop(
|
||||
struct cam_isp_resource_node *fe_res)
|
||||
{
|
||||
struct cam_vfe_mux_fe_data *fe_priv;
|
||||
struct cam_vfe_fe_ver1_reg *fe_reg;
|
||||
int rc = 0;
|
||||
uint32_t val = 0;
|
||||
|
||||
@@ -419,7 +419,6 @@ static int cam_vfe_fe_resource_stop(
|
||||
return 0;
|
||||
|
||||
fe_priv = (struct cam_vfe_mux_fe_data *)fe_res->res_priv;
|
||||
fe_reg = fe_priv->fe_reg;
|
||||
|
||||
if ((fe_priv->dsp_mode >= CAM_ISP_DSP_MODE_ONE_WAY) &&
|
||||
(fe_priv->dsp_mode <= CAM_ISP_DSP_MODE_ROUND)) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019, 2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "cam_vfe_top_common.h"
|
||||
@@ -211,7 +211,6 @@ int cam_vfe_top_clock_update(struct cam_vfe_top_priv_common *top_common,
|
||||
{
|
||||
struct cam_vfe_clock_update_args *clk_update = NULL;
|
||||
struct cam_isp_resource_node *res = NULL;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
int i;
|
||||
|
||||
clk_update =
|
||||
@@ -223,8 +222,6 @@ int cam_vfe_top_clock_update(struct cam_vfe_top_priv_common *top_common,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
hw_info = res->hw_intf->hw_priv;
|
||||
|
||||
if (res->res_type != CAM_ISP_RESOURCE_VFE_IN ||
|
||||
res->res_id >= CAM_ISP_HW_VFE_IN_MAX) {
|
||||
CAM_ERR(CAM_PERF, "VFE:%d Invalid res_type:%d res id%d",
|
||||
@@ -424,7 +421,6 @@ int cam_vfe_top_bw_update_v2(struct cam_vfe_soc_private *soc_private,
|
||||
{
|
||||
struct cam_vfe_bw_update_args_v2 *bw_update = NULL;
|
||||
struct cam_isp_resource_node *res = NULL;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
int rc = 0;
|
||||
int i;
|
||||
|
||||
@@ -434,8 +430,6 @@ int cam_vfe_top_bw_update_v2(struct cam_vfe_soc_private *soc_private,
|
||||
if (!res || !res->hw_intf || !res->hw_intf->hw_priv)
|
||||
return -EINVAL;
|
||||
|
||||
hw_info = res->hw_intf->hw_priv;
|
||||
|
||||
if (res->res_type != CAM_ISP_RESOURCE_VFE_IN ||
|
||||
res->res_id >= CAM_ISP_HW_VFE_IN_MAX) {
|
||||
CAM_ERR(CAM_ISP, "VFE:%d Invalid res_type:%d res id%d",
|
||||
@@ -464,12 +458,9 @@ int cam_vfe_top_bw_update(struct cam_vfe_soc_private *soc_private,
|
||||
{
|
||||
struct cam_vfe_bw_update_args *bw_update = NULL;
|
||||
struct cam_isp_resource_node *res = NULL;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
int rc = 0;
|
||||
int i;
|
||||
struct cam_axi_vote *mux_axi_vote;
|
||||
bool vid_exists = false;
|
||||
bool rdi_exists = false;
|
||||
|
||||
bw_update = (struct cam_vfe_bw_update_args *)cmd_args;
|
||||
res = bw_update->node_res;
|
||||
@@ -477,7 +468,6 @@ int cam_vfe_top_bw_update(struct cam_vfe_soc_private *soc_private,
|
||||
if (!res || !res->hw_intf || !res->hw_intf->hw_priv)
|
||||
return -EINVAL;
|
||||
|
||||
hw_info = res->hw_intf->hw_priv;
|
||||
|
||||
CAM_DBG(CAM_PERF, "res_id=%d, BW=[%lld %lld]",
|
||||
res->res_id, bw_update->camnoc_bw_bytes,
|
||||
@@ -523,16 +513,6 @@ int cam_vfe_top_bw_update(struct cam_vfe_soc_private *soc_private,
|
||||
break;
|
||||
}
|
||||
|
||||
if (mux_axi_vote->num_paths == 1) {
|
||||
if (mux_axi_vote->axi_path[0].path_data_type ==
|
||||
CAM_AXI_PATH_DATA_IFE_VID)
|
||||
vid_exists = true;
|
||||
else if ((mux_axi_vote->axi_path[0].path_data_type >=
|
||||
CAM_AXI_PATH_DATA_IFE_RDI0) &&
|
||||
(mux_axi_vote->axi_path[0].path_data_type <=
|
||||
CAM_AXI_PATH_DATA_IFE_RDI3))
|
||||
rdi_exists = true;
|
||||
}
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@@ -559,7 +559,6 @@ int cam_vfe_top_reserve(void *device_priv,
|
||||
int cam_vfe_top_release(void *device_priv,
|
||||
void *release_args, uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_top_ver2_priv *top_priv;
|
||||
struct cam_isp_resource_node *mux_res;
|
||||
|
||||
if (!device_priv || !release_args) {
|
||||
@@ -567,7 +566,6 @@ int cam_vfe_top_release(void *device_priv,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
top_priv = (struct cam_vfe_top_ver2_priv *)device_priv;
|
||||
mux_res = (struct cam_isp_resource_node *)release_args;
|
||||
|
||||
CAM_DBG(CAM_ISP, "Resource in state %d", mux_res->res_state);
|
||||
@@ -644,7 +642,6 @@ int cam_vfe_top_stop(void *device_priv,
|
||||
{
|
||||
struct cam_vfe_top_ver2_priv *top_priv;
|
||||
struct cam_isp_resource_node *mux_res;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
struct cam_vfe_soc_private *soc_private = NULL;
|
||||
int i, rc = 0;
|
||||
@@ -656,7 +653,6 @@ int cam_vfe_top_stop(void *device_priv,
|
||||
|
||||
top_priv = (struct cam_vfe_top_ver2_priv *)device_priv;
|
||||
mux_res = (struct cam_isp_resource_node *)stop_args;
|
||||
hw_info = (struct cam_hw_info *)mux_res->hw_intf->hw_priv;
|
||||
soc_info = top_priv->top_common.soc_info;
|
||||
soc_private = soc_info->soc_private;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/slab.h>
|
||||
@@ -496,7 +496,6 @@ int cam_vfe_top_ver3_reserve(void *device_priv,
|
||||
int cam_vfe_top_ver3_release(void *device_priv,
|
||||
void *release_args, uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_top_ver3_priv *top_priv;
|
||||
struct cam_isp_resource_node *mux_res;
|
||||
|
||||
if (!device_priv || !release_args) {
|
||||
@@ -504,7 +503,6 @@ int cam_vfe_top_ver3_release(void *device_priv,
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
top_priv = (struct cam_vfe_top_ver3_priv *)device_priv;
|
||||
mux_res = (struct cam_isp_resource_node *)release_args;
|
||||
|
||||
CAM_DBG(CAM_ISP, "%s Resource in state %d", mux_res->res_name,
|
||||
@@ -582,7 +580,6 @@ int cam_vfe_top_ver3_stop(void *device_priv,
|
||||
{
|
||||
struct cam_vfe_top_ver3_priv *top_priv;
|
||||
struct cam_isp_resource_node *mux_res;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
struct cam_vfe_soc_private *soc_private = NULL;
|
||||
int i, rc = 0;
|
||||
@@ -594,9 +591,7 @@ int cam_vfe_top_ver3_stop(void *device_priv,
|
||||
|
||||
top_priv = (struct cam_vfe_top_ver3_priv *)device_priv;
|
||||
mux_res = (struct cam_isp_resource_node *)stop_args;
|
||||
hw_info = (struct cam_hw_info *)mux_res->hw_intf->hw_priv;
|
||||
soc_info = top_priv->top_common.soc_info;
|
||||
soc_private = soc_info->soc_private;
|
||||
|
||||
soc_info = top_priv->top_common.soc_info;
|
||||
soc_private = soc_info->soc_private;
|
||||
|
@@ -847,16 +847,16 @@ int cam_vfe_top_ver4_reserve(void *device_priv,
|
||||
int cam_vfe_top_ver4_release(void *device_priv,
|
||||
void *release_args, uint32_t arg_size)
|
||||
{
|
||||
struct cam_vfe_top_ver4_priv *top_priv;
|
||||
struct cam_isp_resource_node *mux_res;
|
||||
struct cam_vfe_top_ver4_priv *top_priv;
|
||||
|
||||
if (!device_priv || !release_args) {
|
||||
CAM_ERR(CAM_ISP, "Error, Invalid input arguments");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
top_priv = (struct cam_vfe_top_ver4_priv *)device_priv;
|
||||
mux_res = (struct cam_isp_resource_node *)release_args;
|
||||
top_priv = (struct cam_vfe_top_ver4_priv *)device_priv;
|
||||
|
||||
CAM_DBG(CAM_ISP, "VFE:%u Resource in state %d",
|
||||
top_priv->common_data.hw_intf->hw_idx, mux_res->res_state);
|
||||
@@ -951,7 +951,6 @@ int cam_vfe_top_ver4_stop(void *device_priv,
|
||||
struct cam_vfe_top_ver4_priv *top_priv;
|
||||
struct cam_isp_resource_node *mux_res;
|
||||
struct cam_hw_soc_info *soc_info = NULL;
|
||||
struct cam_hw_info *hw_info = NULL;
|
||||
int i, rc = 0;
|
||||
|
||||
if (!device_priv || !stop_args) {
|
||||
@@ -962,7 +961,6 @@ int cam_vfe_top_ver4_stop(void *device_priv,
|
||||
top_priv = (struct cam_vfe_top_ver4_priv *)device_priv;
|
||||
soc_info = top_priv->top_common.soc_info;
|
||||
mux_res = (struct cam_isp_resource_node *)stop_args;
|
||||
hw_info = (struct cam_hw_info *)mux_res->hw_intf->hw_priv;
|
||||
|
||||
if (mux_res->res_id < CAM_ISP_HW_VFE_IN_MAX) {
|
||||
rc = mux_res->stop(mux_res);
|
||||
|
Посилання в новій задачі
Заблокувати користувача