diff --git a/drivers/cam_cdm/cam_cdm_core_common.c b/drivers/cam_cdm/cam_cdm_core_common.c index 5df690c94e..8531aa67ea 100644 --- a/drivers/cam_cdm/cam_cdm_core_common.c +++ b/drivers/cam_cdm/cam_cdm_core_common.c @@ -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 @@ -335,12 +335,8 @@ void cam_cdm_notify_clients(struct cam_hw_info *cdm_hw, static int cam_cdm_stream_handle_init(void *hw_priv, bool init) { - struct cam_hw_info *cdm_hw = hw_priv; - struct cam_cdm *core = NULL; int rc = -EPERM; - core = (struct cam_cdm *)cdm_hw->core_info; - if (init) { rc = cam_hw_cdm_init(hw_priv, NULL, 0); if (rc) { @@ -557,7 +553,6 @@ int cam_cdm_process_cmd(void *hw_priv, uint32_t cmd, void *cmd_args, uint32_t arg_size) { struct cam_hw_info *cdm_hw = hw_priv; - struct cam_hw_soc_info *soc_data = NULL; struct cam_cdm *core = NULL; int rc = -EINVAL; @@ -565,7 +560,6 @@ int cam_cdm_process_cmd(void *hw_priv, (cmd >= CAM_CDM_HW_INTF_CMD_INVALID)) return rc; - soc_data = &cdm_hw->soc_info; core = (struct cam_cdm *)cdm_hw->core_info; /* @@ -890,7 +884,7 @@ int cam_cdm_process_cmd(void *hw_priv, break; } - rc = cam_hw_cdm_handle_error(cdm_hw, *handle); + rc = cam_hw_cdm_handle_error_info(cdm_hw, *handle); if (rc) { CAM_ERR(CAM_CDM, "CDM HW handle error failed for handle 0x%x rc = %d", diff --git a/drivers/cam_cdm/cam_cdm_core_common.h b/drivers/cam_cdm/cam_cdm_core_common.h index 9b0e83b0d8..d654512db8 100644 --- a/drivers/cam_cdm/cam_cdm_core_common.h +++ b/drivers/cam_cdm/cam_cdm_core_common.h @@ -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. */ #ifndef _CAM_CDM_CORE_COMMON_H_ @@ -54,8 +54,8 @@ int cam_hw_cdm_submit_bl(struct cam_hw_info *cdm_hw, struct cam_cdm_client *client); int cam_hw_cdm_reset_hw(struct cam_hw_info *cdm_hw, uint32_t handle); int cam_hw_cdm_flush_hw(struct cam_hw_info *cdm_hw, uint32_t handle); -int cam_hw_cdm_handle_error(struct cam_hw_info *cdm_hw, uint32_t handle); int cam_hw_cdm_hang_detect(struct cam_hw_info *cdm_hw, uint32_t handle); +int cam_hw_cdm_handle_error_info(struct cam_hw_info *cdm_hw, uint32_t handle); struct cam_cdm_bl_cb_request_entry *cam_cdm_find_request_by_bl_tag( uint32_t tag, struct list_head *bl_list); void cam_cdm_notify_clients(struct cam_hw_info *cdm_hw, diff --git a/drivers/cam_cdm/cam_cdm_hw_core.c b/drivers/cam_cdm/cam_cdm_hw_core.c index 27071814c9..8f4b944901 100644 --- a/drivers/cam_cdm/cam_cdm_hw_core.c +++ b/drivers/cam_cdm/cam_cdm_hw_core.c @@ -1116,7 +1116,6 @@ int cam_hw_cdm_submit_bl(struct cam_hw_info *cdm_hw, break; } - rc = 0; hw_vaddr_ptr = (dma_addr_t)cdm_cmd->cmd[i].bl_addr.hw_iova; len = cdm_cmd->cmd[i].len + cdm_cmd->cmd[i].offset; } else { @@ -1862,20 +1861,6 @@ int cam_hw_cdm_flush_hw(struct cam_hw_info *cdm_hw, uint32_t handle) return rc; } -int cam_hw_cdm_handle_error( - struct cam_hw_info *cdm_hw, - uint32_t handle) -{ - struct cam_cdm *cdm_core = NULL; - int rc = 0; - - cdm_core = (struct cam_cdm *)cdm_hw->core_info; - - rc = cam_hw_cdm_handle_error_info(cdm_hw, handle); - - return rc; -} - int cam_hw_cdm_hang_detect( struct cam_hw_info *cdm_hw, uint32_t handle) diff --git a/drivers/cam_cdm/cam_cdm_util.c b/drivers/cam_cdm/cam_cdm_util.c index e7f1cb636b..be41188674 100644 --- a/drivers/cam_cdm/cam_cdm_util.c +++ b/drivers/cam_cdm/cam_cdm_util.c @@ -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 @@ -607,11 +607,9 @@ int cam_cdm_util_cmd_buf_write(void __iomem **current_device_base, uint32_t base_array_size, uint8_t bl_tag) { int ret = 0; - uint32_t cdm_cmd_type = 0, total_cmd_buf_size = 0; + uint32_t cdm_cmd_type = 0; uint32_t used_bytes = 0; - total_cmd_buf_size = cmd_buf_size; - while (cmd_buf_size > 0) { CAM_DBG(CAM_CDM, "cmd data=%x", *cmd_buf); cdm_cmd_type = (*cmd_buf >> CAM_CDM_COMMAND_OFFSET); @@ -847,8 +845,8 @@ static long cam_cdm_util_dump_change_base_cmd(uint32_t *cmd_buf_addr, temp_ptr += CDMCmdHeaderSizes[CAM_CDM_CMD_CHANGE_BASE]; ret += CDMCmdHeaderSizes[CAM_CDM_CMD_CHANGE_BASE]; - CAM_INFO(CAM_CDM, "CHANGE_BASE: 0x%X", - p_cbase_cmd->base); + CAM_INFO(CAM_CDM, "CHANGE_BASE: 0x%X, curr cmd addr: %pK", + p_cbase_cmd->base, temp_ptr); return ret; }