mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
msm: camera: ope: Fixed for IRQ mask and log printing
Adding fixes to set IRQ mask after reset and strings to print OPE CPAS PATH enums. CRs-Fixed: 2594541 Change-Id: I5873b8b0494623c36ca94edf7a26cc952fbb5e68 Signed-off-by: Rishabh Jain <risjai@codeaurora.org>
This commit is contained in:
parent
130865bbdf
commit
eb74ea19e4
7 changed files with 25 additions and 20 deletions
|
|
@ -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 <linux/of.h>
|
||||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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) +
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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))) {
|
||||
|
|
|
|||
|
|
@ -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];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue