diff --git a/drivers/cam_cpas/cam_cpas_intf.c b/drivers/cam_cpas/cam_cpas_intf.c index f2a2e60d636e..bfa017a86442 100644 --- a/drivers/cam_cpas/cam_cpas_intf.c +++ b/drivers/cam_cpas/cam_cpas_intf.c @@ -1,6 +1,6 @@ // SPDX-License-Identifier: GPL-2.0-only /* - * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. + * Copyright (c) 2017-2020, The Linux Foundation. All rights reserved. */ #include @@ -83,6 +83,18 @@ const char *cam_cpas_axi_util_path_type_to_string( case CAM_AXI_PATH_DATA_IPE_WR_REF: return "IPE_WR_REF"; + /* OPE Paths */ + case CAM_AXI_PATH_DATA_OPE_RD_IN: + return "OPE_RD_IN"; + case CAM_AXI_PATH_DATA_OPE_RD_REF: + return "OPE_RD_REF"; + case CAM_AXI_PATH_DATA_OPE_WR_VID: + return "OPE_WR_VID"; + case CAM_AXI_PATH_DATA_OPE_WR_DISP: + return "OPE_WR_DISP"; + case CAM_AXI_PATH_DATA_OPE_WR_REF: + return "OPE_WR_REF"; + /* Common Paths */ case CAM_AXI_PATH_DATA_ALL: return "DATA_ALL"; diff --git a/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c b/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c index ff0b12fd4b35..c89d6d56479e 100644 --- a/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c +++ b/drivers/cam_isp/isp_hw_mgr/cam_tfe_hw_mgr.c @@ -3372,7 +3372,7 @@ static int cam_isp_tfe_packet_generic_blob_handler(void *user_data, if ((hfr_config->num_ports != 0) && (blob_size < (sizeof(struct cam_isp_tfe_resource_hfr_config) + (hfr_config->num_ports - 1) * - sizeof(struct cam_isp_tfe_resource_hfr_config)))) { + sizeof(struct cam_isp_tfe_port_hfr_config)))) { CAM_ERR(CAM_ISP, "Invalid blob size %u expected %lu", blob_size, sizeof(struct cam_isp_tfe_resource_hfr_config) + diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c index 1fe75bf15a90..a4eebd5a6e51 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/tfe_hw/cam_tfe_bus.c @@ -535,7 +535,7 @@ static int cam_tfe_bus_acquire_wm( rsrc_data->format); return -EINVAL; } - } else if (rsrc_data->index == 0) { + } else if (rsrc_data->index == 0 || rsrc_data->index == 1) { /* WM 0 FULL_OUT */ switch (rsrc_data->format) { case CAM_FORMAT_MIPI_RAW_8: @@ -571,12 +571,6 @@ static int cam_tfe_bus_acquire_wm( rsrc_data->height = 0; rsrc_data->stride = 1; rsrc_data->en_cfg = (0x1 << 16) | 0x1; - } else if (rsrc_data->index == 1) { - /* WM 1 Raw dump */ - rsrc_data->stride = rsrc_data->width; - rsrc_data->en_cfg = 0x1; - /* LSB aligned */ - rsrc_data->pack_fmt |= 0x10; } else { CAM_ERR(CAM_ISP, "Invalid WM:%d requested", rsrc_data->index); return -EINVAL; diff --git a/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c b/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c index 5afdcc1d3f28..4d369b69193d 100644 --- a/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c +++ b/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c @@ -1858,13 +1858,6 @@ static int cam_ope_get_acquire_info(struct cam_ope_hw_mgr *hw_mgr, return -EINVAL; } - if (args->acquire_info_size < - sizeof(struct ope_acquire_dev_info)) { - CAM_ERR(CAM_OPE, "Invalid acquire size = %d", - args->acquire_info_size); - return -EINVAL; - } - if (copy_from_user(&ctx->ope_acquire, (void __user *)args->acquire_info, sizeof(struct ope_acquire_dev_info))) { diff --git a/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.h b/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.h index f062c61706e3..f7dcf9139da0 100644 --- a/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.h +++ b/drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.h @@ -67,6 +67,7 @@ * @budget_ns: Time required to process frame * @frame_cycles: Frame cycles needed to process the frame * @rt_flag: Flag to indicate real time stream + * @reserved: Reserved for future use * @num_paths: Number of paths for per path bw vote * @axi_path: Per path vote info for OPE */ @@ -74,6 +75,7 @@ struct cam_ope_clk_bw_req_internal_v2 { uint64_t budget_ns; uint32_t frame_cycles; uint32_t rt_flag; + uint32_t reserved; uint32_t num_paths; struct cam_axi_per_path_bw_vote axi_path[CAM_OPE_MAX_PER_PATH_VOTES]; }; diff --git a/drivers/cam_ope/ope_hw_mgr/ope_hw/bus_wr/ope_bus_wr.c b/drivers/cam_ope/ope_hw_mgr/ope_hw/bus_wr/ope_bus_wr.c index 7a1a2ca7b9cc..75d7339e0bf4 100644 --- a/drivers/cam_ope/ope_hw_mgr/ope_hw/bus_wr/ope_bus_wr.c +++ b/drivers/cam_ope/ope_hw_mgr/ope_hw/bus_wr/ope_bus_wr.c @@ -691,7 +691,6 @@ static int cam_ope_bus_wr_isr(struct ope_hw *ope_hw_info, uint32_t irq_status_0, irq_status_1; struct cam_ope_bus_wr_reg *bus_wr_reg; struct cam_ope_bus_wr_reg_val *bus_wr_reg_val; - struct cam_ope_irq_data *irq_data = data; if (!ope_hw_info) { CAM_ERR(CAM_OPE, "Invalid ope_hw_info"); @@ -713,17 +712,14 @@ static int cam_ope_bus_wr_isr(struct ope_hw *ope_hw_info, bus_wr_reg->base + bus_wr_reg->irq_cmd); if (irq_status_0 & bus_wr_reg_val->cons_violation) { - irq_data->error = 1; CAM_ERR(CAM_OPE, "ope bus wr cons_violation"); } if (irq_status_0 & bus_wr_reg_val->violation) { - irq_data->error = 1; CAM_ERR(CAM_OPE, "ope bus wr vioalation"); } if (irq_status_0 & bus_wr_reg_val->img_size_violation) { - irq_data->error = 1; CAM_ERR(CAM_OPE, "ope bus wr img_size_violation"); } diff --git a/drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.c b/drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.c index 4d8037c88363..4d1547352cd3 100644 --- a/drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.c +++ b/drivers/cam_ope/ope_hw_mgr/ope_hw/top/ope_top.c @@ -66,6 +66,10 @@ static int cam_ope_top_reset(struct ope_hw *ope_hw_info, rc = 0; } + /* enable interrupt mask */ + cam_io_w_mb(top_reg_val->irq_mask, + ope_hw_info->top_reg->base + top_reg->irq_mask); + return rc; } @@ -131,6 +135,10 @@ static int cam_ope_top_init(struct ope_hw *ope_hw_info, &ope_top_info.reset_complete, msecs_to_jiffies(30)); + /* enable interrupt mask */ + cam_io_w_mb(top_reg_val->irq_mask, + ope_hw_info->top_reg->base + top_reg->irq_mask); + if (!rc || rc < 0) { CAM_ERR(CAM_OPE, "reset error result = %d", rc); if (!rc)