mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge 6639a3b50f on remote branch
Change-Id: I76dd960cbd377d6ecf36ed81e692f368a8016718
This commit is contained in:
commit
a40498dc1f
4 changed files with 109 additions and 3 deletions
|
|
@ -1030,6 +1030,7 @@ static int cam_cpas_util_apply_default_axi_vote(
|
|||
struct cam_cpas *cpas_core = (struct cam_cpas *) cpas_hw->core_info;
|
||||
struct cam_cpas_axi_port *axi_port = NULL;
|
||||
uint64_t mnoc_ab_bw = 0, mnoc_ib_bw = 0;
|
||||
uint64_t applied_ab_bw = 0, applied_ib_bw = 0;
|
||||
int rc = 0, i = 0;
|
||||
|
||||
mutex_lock(&cpas_core->tree_lock);
|
||||
|
|
@ -1057,6 +1058,8 @@ static int cam_cpas_util_apply_default_axi_vote(
|
|||
mnoc_ab_bw, mnoc_ib_bw, rc);
|
||||
goto unlock_tree;
|
||||
}
|
||||
cpas_core->axi_port[i].applied_ab_bw = applied_ab_bw;
|
||||
cpas_core->axi_port[i].applied_ib_bw = applied_ib_bw;
|
||||
}
|
||||
|
||||
unlock_tree:
|
||||
|
|
|
|||
|
|
@ -5405,6 +5405,65 @@ end:
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cam_tfe_hw_mgr_handle_hw_dump_info(
|
||||
void *ctx,
|
||||
void *evt_info)
|
||||
{
|
||||
struct cam_tfe_hw_mgr_ctx *tfe_hw_mgr_ctx =
|
||||
(struct cam_tfe_hw_mgr_ctx *)ctx;
|
||||
struct cam_isp_hw_event_info *event_info =
|
||||
(struct cam_isp_hw_event_info *)evt_info;
|
||||
struct cam_isp_hw_mgr_res *hw_mgr_res = NULL;
|
||||
struct cam_hw_intf *hw_intf;
|
||||
uint32_t i, out_port_id;
|
||||
uint64_t dummy_args;
|
||||
int rc = 0;
|
||||
|
||||
list_for_each_entry(hw_mgr_res,
|
||||
&tfe_hw_mgr_ctx->res_list_tfe_csid, list) {
|
||||
for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
||||
if (!hw_mgr_res->hw_res[i])
|
||||
continue;
|
||||
hw_intf = hw_mgr_res->hw_res[i]->hw_intf;
|
||||
if (hw_intf->hw_ops.process_cmd) {
|
||||
rc = hw_intf->hw_ops.process_cmd(
|
||||
hw_intf->hw_priv,
|
||||
CAM_ISP_HW_CMD_CSID_CLOCK_DUMP,
|
||||
&dummy_args,
|
||||
sizeof(uint64_t));
|
||||
if (rc)
|
||||
CAM_ERR(CAM_ISP,
|
||||
"CSID Clock Dump failed");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (event_info->res_type == CAM_ISP_RESOURCE_VFE_OUT) {
|
||||
out_port_id = event_info->res_id & 0xFF;
|
||||
if (out_port_id >= CAM_TFE_HW_OUT_RES_MAX) {
|
||||
CAM_ERR(CAM_ISP,
|
||||
"Resource out of range");
|
||||
goto end;
|
||||
}
|
||||
hw_mgr_res =
|
||||
&tfe_hw_mgr_ctx->res_list_tfe_out[out_port_id];
|
||||
for (i = 0; i < CAM_ISP_HW_SPLIT_MAX; i++) {
|
||||
if (!hw_mgr_res->hw_res[i])
|
||||
continue;
|
||||
hw_intf = hw_mgr_res->hw_res[i]->hw_intf;
|
||||
if (hw_intf->hw_ops.process_cmd) {
|
||||
rc = hw_intf->hw_ops.process_cmd(
|
||||
hw_intf->hw_priv,
|
||||
CAM_ISP_HW_CMD_DUMP_BUS_INFO,
|
||||
(void *)event_info,
|
||||
sizeof(struct cam_isp_hw_event_info));
|
||||
}
|
||||
}
|
||||
}
|
||||
end:
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int cam_tfe_hw_mgr_handle_csid_event(
|
||||
struct cam_isp_hw_event_info *event_info)
|
||||
{
|
||||
|
|
@ -5433,8 +5492,10 @@ static int cam_tfe_hw_mgr_handle_csid_event(
|
|||
}
|
||||
|
||||
static int cam_tfe_hw_mgr_handle_hw_err(
|
||||
void *ctx,
|
||||
void *evt_info)
|
||||
{
|
||||
struct cam_tfe_hw_mgr_ctx *tfe_hw_mgr_ctx;
|
||||
struct cam_isp_hw_event_info *event_info = evt_info;
|
||||
struct cam_isp_hw_error_event_data error_event_data = {0};
|
||||
struct cam_tfe_hw_event_recovery_data recovery_data = {0};
|
||||
|
|
@ -5456,6 +5517,18 @@ static int cam_tfe_hw_mgr_handle_hw_err(
|
|||
return rc;
|
||||
}
|
||||
|
||||
if (ctx) {
|
||||
tfe_hw_mgr_ctx =
|
||||
(struct cam_tfe_hw_mgr_ctx *)ctx;
|
||||
if (event_info->res_type ==
|
||||
CAM_ISP_RESOURCE_TFE_IN &&
|
||||
!tfe_hw_mgr_ctx->is_rdi_only_context &&
|
||||
event_info->res_id !=
|
||||
CAM_ISP_HW_TFE_IN_CAMIF)
|
||||
cam_tfe_hw_mgr_handle_hw_dump_info(
|
||||
tfe_hw_mgr_ctx, event_info);
|
||||
}
|
||||
|
||||
core_idx = event_info->hw_idx;
|
||||
|
||||
if (g_tfe_hw_mgr.debug_cfg.enable_recovery)
|
||||
|
|
@ -5738,7 +5811,7 @@ static int cam_tfe_hw_mgr_event_handler(
|
|||
break;
|
||||
|
||||
case CAM_ISP_HW_EVENT_ERROR:
|
||||
rc = cam_tfe_hw_mgr_handle_hw_err(evt_info);
|
||||
rc = cam_tfe_hw_mgr_handle_hw_err(priv, evt_info);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -2610,6 +2610,19 @@ static int cam_tfe_csid_set_csid_clock(
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int cam_tfe_csid_dump_csid_clock(
|
||||
struct cam_tfe_csid_hw *csid_hw, void *cmd_args)
|
||||
{
|
||||
if (!csid_hw)
|
||||
return -EINVAL;
|
||||
|
||||
CAM_INFO(CAM_ISP, "CSID:%d clock rate %llu",
|
||||
csid_hw->hw_intf->hw_idx,
|
||||
csid_hw->clk_rate);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cam_tfe_csid_get_csid_clock(
|
||||
struct cam_tfe_csid_hw *csid_hw, void *cmd_args)
|
||||
{
|
||||
|
|
@ -2916,6 +2929,9 @@ static int cam_tfe_csid_process_cmd(void *hw_priv,
|
|||
case CAM_ISP_HW_CMD_CSID_CLOCK_UPDATE:
|
||||
rc = cam_tfe_csid_set_csid_clock(csid_hw, cmd_args);
|
||||
break;
|
||||
case CAM_ISP_HW_CMD_CSID_CLOCK_DUMP:
|
||||
rc = cam_tfe_csid_dump_csid_clock(csid_hw, cmd_args);
|
||||
break;
|
||||
case CAM_TFE_CSID_CMD_GET_REG_DUMP:
|
||||
rc = cam_tfe_csid_get_regdump(csid_hw, cmd_args);
|
||||
break;
|
||||
|
|
@ -3519,9 +3535,23 @@ handle_fatal_error:
|
|||
is_error_irq = true;
|
||||
}
|
||||
|
||||
if (is_error_irq || log_en)
|
||||
if (is_error_irq || log_en) {
|
||||
CAM_ERR(CAM_ISP,
|
||||
"CSID %d irq status TOP: 0x%x RX: 0x%x IPP: 0x%x",
|
||||
csid_hw->hw_intf->hw_idx,
|
||||
irq_status[TFE_CSID_IRQ_REG_TOP],
|
||||
irq_status[TFE_CSID_IRQ_REG_RX],
|
||||
irq_status[TFE_CSID_IRQ_REG_IPP]);
|
||||
CAM_ERR(CAM_ISP,
|
||||
"RDI0: 0x%x RDI1: 0x%x RDI2: 0x%x CSID clk:%d",
|
||||
irq_status[TFE_CSID_IRQ_REG_RDI0],
|
||||
irq_status[TFE_CSID_IRQ_REG_RDI1],
|
||||
irq_status[TFE_CSID_IRQ_REG_RDI2],
|
||||
csid_hw->clk_rate);
|
||||
|
||||
cam_tfe_csid_handle_hw_err_irq(csid_hw,
|
||||
CAM_ISP_HW_ERROR_NONE, irq_status);
|
||||
}
|
||||
|
||||
if (csid_hw->irq_debug_cnt >= CAM_TFE_CSID_IRQ_SOF_DEBUG_CNT_MAX) {
|
||||
cam_tfe_csid_sof_irq_debug(csid_hw, &sof_irq_debug_en);
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ static void cam_tfe_log_error_irq_status(
|
|||
"TFE clock rate:%d TFE total bw applied:%lld",
|
||||
top_priv->hw_clk_rate,
|
||||
top_priv->total_bw_applied);
|
||||
|
||||
cam_cpas_log_votes();
|
||||
}
|
||||
|
||||
static int cam_tfe_error_irq_bottom_half(
|
||||
|
|
|
|||
Loading…
Reference in a new issue