Loading drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c +14 −4 Original line number Diff line number Diff line Loading @@ -873,6 +873,7 @@ static int cam_cpas_hw_update_ahb_vote(struct cam_hw_info *cpas_hw, if (!CAM_CPAS_CLIENT_VALID(client_indx)) return -EINVAL; mutex_lock(&cpas_hw->hw_mutex); mutex_lock(&cpas_core->client_mutex[client_indx]); if (!CAM_CPAS_CLIENT_STARTED(cpas_core, client_indx)) { Loading @@ -892,6 +893,7 @@ static int cam_cpas_hw_update_ahb_vote(struct cam_hw_info *cpas_hw, unlock_client: mutex_unlock(&cpas_core->client_mutex[client_indx]); mutex_unlock(&cpas_hw->hw_mutex); return rc; } Loading @@ -907,6 +909,7 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, struct cam_axi_vote *axi_vote; enum cam_vote_level applied_level = CAM_SVS_VOTE; int rc; struct cam_cpas_private_soc *soc_private = NULL; if (!hw_priv || !start_args) { CAM_ERR(CAM_CPAS, "Invalid arguments %pK %pK", Loading @@ -922,6 +925,8 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, cpas_hw = (struct cam_hw_info *)hw_priv; cpas_core = (struct cam_cpas *) cpas_hw->core_info; soc_private = (struct cam_cpas_private_soc *) cpas_hw->soc_info.soc_private; cmd_hw_start = (struct cam_cpas_hw_cmd_start *)start_args; client_indx = CAM_CPAS_GET_CLIENT_IDX(cmd_hw_start->client_handle); ahb_vote = cmd_hw_start->ahb_vote; Loading Loading @@ -1005,8 +1010,9 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, cpas_client->started = true; cpas_core->streamon_clients++; CAM_DBG(CAM_CPAS, "client_indx=%d, streamon_clients=%d", client_indx, cpas_core->streamon_clients); CAM_DBG(CAM_CPAS, "client=%s, streamon_clients=%d", soc_private->client_name[client_indx], cpas_core->streamon_clients); done: mutex_unlock(&cpas_core->client_mutex[client_indx]); mutex_unlock(&cpas_hw->hw_mutex); Loading @@ -1028,6 +1034,7 @@ static int cam_cpas_hw_stop(void *hw_priv, void *stop_args, struct cam_cpas_client *cpas_client; struct cam_ahb_vote ahb_vote; struct cam_axi_vote axi_vote; struct cam_cpas_private_soc *soc_private = NULL; int rc = 0; long result; Loading @@ -1045,6 +1052,8 @@ static int cam_cpas_hw_stop(void *hw_priv, void *stop_args, cpas_hw = (struct cam_hw_info *)hw_priv; cpas_core = (struct cam_cpas *) cpas_hw->core_info; soc_private = (struct cam_cpas_private_soc *) cpas_hw->soc_info.soc_private; cmd_hw_stop = (struct cam_cpas_hw_cmd_stop *)stop_args; client_indx = CAM_CPAS_GET_CLIENT_IDX(cmd_hw_stop->client_handle); Loading @@ -1054,8 +1063,9 @@ static int cam_cpas_hw_stop(void *hw_priv, void *stop_args, mutex_lock(&cpas_hw->hw_mutex); mutex_lock(&cpas_core->client_mutex[client_indx]); CAM_DBG(CAM_CPAS, "client_indx=%d, streamon_clients=%d", client_indx, cpas_core->streamon_clients); CAM_DBG(CAM_CPAS, "client=%s, streamon_clients=%d", soc_private->client_name[client_indx], cpas_core->streamon_clients); if (!CAM_CPAS_CLIENT_STARTED(cpas_core, client_indx)) { CAM_ERR(CAM_CPAS, "Client %d is not started", client_indx); Loading drivers/media/platform/msm/camera/cam_icp/icp_hw/bps_hw/bps_dev.c +36 −2 Original line number Diff line number Diff line /* Copyright (c) 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -33,6 +33,40 @@ static struct cam_bps_device_hw_info cam_bps_hw_info = { }; EXPORT_SYMBOL(cam_bps_hw_info); static bool cam_bps_cpas_cb(uint32_t client_handle, void *userdata, struct cam_cpas_irq_data *irq_data) { bool error_handled = false; if (!irq_data) return error_handled; switch (irq_data->irq_type) { case CAM_CAMNOC_IRQ_IPE_BPS_UBWC_DECODE_ERROR: CAM_ERR_RATE_LIMIT(CAM_ICP, "IPE/BPS UBWC Decode error type=%d status=%x thr_err=%d, fcl_err=%d, len_md_err=%d, format_err=%d", irq_data->irq_type, irq_data->u.dec_err.decerr_status.value, irq_data->u.dec_err.decerr_status.thr_err, irq_data->u.dec_err.decerr_status.fcl_err, irq_data->u.dec_err.decerr_status.len_md_err, irq_data->u.dec_err.decerr_status.format_err); error_handled = true; break; case CAM_CAMNOC_IRQ_IPE_BPS_UBWC_ENCODE_ERROR: CAM_ERR_RATE_LIMIT(CAM_ICP, "IPE/BPS UBWC Encode error type=%d status=%x", irq_data->irq_type, irq_data->u.enc_err.encerr_status.value); error_handled = true; break; default: break; } return error_handled; } int cam_bps_register_cpas(struct cam_hw_soc_info *soc_info, struct cam_bps_device_core_info *core_info, uint32_t hw_idx) Loading @@ -42,7 +76,7 @@ int cam_bps_register_cpas(struct cam_hw_soc_info *soc_info, cpas_register_params.dev = &soc_info->pdev->dev; memcpy(cpas_register_params.identifier, "bps", sizeof("bps")); cpas_register_params.cam_cpas_client_cb = NULL; cpas_register_params.cam_cpas_client_cb = cam_bps_cpas_cb; cpas_register_params.cell_index = hw_idx; cpas_register_params.userdata = NULL; Loading Loading
drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c +14 −4 Original line number Diff line number Diff line Loading @@ -873,6 +873,7 @@ static int cam_cpas_hw_update_ahb_vote(struct cam_hw_info *cpas_hw, if (!CAM_CPAS_CLIENT_VALID(client_indx)) return -EINVAL; mutex_lock(&cpas_hw->hw_mutex); mutex_lock(&cpas_core->client_mutex[client_indx]); if (!CAM_CPAS_CLIENT_STARTED(cpas_core, client_indx)) { Loading @@ -892,6 +893,7 @@ static int cam_cpas_hw_update_ahb_vote(struct cam_hw_info *cpas_hw, unlock_client: mutex_unlock(&cpas_core->client_mutex[client_indx]); mutex_unlock(&cpas_hw->hw_mutex); return rc; } Loading @@ -907,6 +909,7 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, struct cam_axi_vote *axi_vote; enum cam_vote_level applied_level = CAM_SVS_VOTE; int rc; struct cam_cpas_private_soc *soc_private = NULL; if (!hw_priv || !start_args) { CAM_ERR(CAM_CPAS, "Invalid arguments %pK %pK", Loading @@ -922,6 +925,8 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, cpas_hw = (struct cam_hw_info *)hw_priv; cpas_core = (struct cam_cpas *) cpas_hw->core_info; soc_private = (struct cam_cpas_private_soc *) cpas_hw->soc_info.soc_private; cmd_hw_start = (struct cam_cpas_hw_cmd_start *)start_args; client_indx = CAM_CPAS_GET_CLIENT_IDX(cmd_hw_start->client_handle); ahb_vote = cmd_hw_start->ahb_vote; Loading Loading @@ -1005,8 +1010,9 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args, cpas_client->started = true; cpas_core->streamon_clients++; CAM_DBG(CAM_CPAS, "client_indx=%d, streamon_clients=%d", client_indx, cpas_core->streamon_clients); CAM_DBG(CAM_CPAS, "client=%s, streamon_clients=%d", soc_private->client_name[client_indx], cpas_core->streamon_clients); done: mutex_unlock(&cpas_core->client_mutex[client_indx]); mutex_unlock(&cpas_hw->hw_mutex); Loading @@ -1028,6 +1034,7 @@ static int cam_cpas_hw_stop(void *hw_priv, void *stop_args, struct cam_cpas_client *cpas_client; struct cam_ahb_vote ahb_vote; struct cam_axi_vote axi_vote; struct cam_cpas_private_soc *soc_private = NULL; int rc = 0; long result; Loading @@ -1045,6 +1052,8 @@ static int cam_cpas_hw_stop(void *hw_priv, void *stop_args, cpas_hw = (struct cam_hw_info *)hw_priv; cpas_core = (struct cam_cpas *) cpas_hw->core_info; soc_private = (struct cam_cpas_private_soc *) cpas_hw->soc_info.soc_private; cmd_hw_stop = (struct cam_cpas_hw_cmd_stop *)stop_args; client_indx = CAM_CPAS_GET_CLIENT_IDX(cmd_hw_stop->client_handle); Loading @@ -1054,8 +1063,9 @@ static int cam_cpas_hw_stop(void *hw_priv, void *stop_args, mutex_lock(&cpas_hw->hw_mutex); mutex_lock(&cpas_core->client_mutex[client_indx]); CAM_DBG(CAM_CPAS, "client_indx=%d, streamon_clients=%d", client_indx, cpas_core->streamon_clients); CAM_DBG(CAM_CPAS, "client=%s, streamon_clients=%d", soc_private->client_name[client_indx], cpas_core->streamon_clients); if (!CAM_CPAS_CLIENT_STARTED(cpas_core, client_indx)) { CAM_ERR(CAM_CPAS, "Client %d is not started", client_indx); Loading
drivers/media/platform/msm/camera/cam_icp/icp_hw/bps_hw/bps_dev.c +36 −2 Original line number Diff line number Diff line /* Copyright (c) 2017, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and Loading Loading @@ -33,6 +33,40 @@ static struct cam_bps_device_hw_info cam_bps_hw_info = { }; EXPORT_SYMBOL(cam_bps_hw_info); static bool cam_bps_cpas_cb(uint32_t client_handle, void *userdata, struct cam_cpas_irq_data *irq_data) { bool error_handled = false; if (!irq_data) return error_handled; switch (irq_data->irq_type) { case CAM_CAMNOC_IRQ_IPE_BPS_UBWC_DECODE_ERROR: CAM_ERR_RATE_LIMIT(CAM_ICP, "IPE/BPS UBWC Decode error type=%d status=%x thr_err=%d, fcl_err=%d, len_md_err=%d, format_err=%d", irq_data->irq_type, irq_data->u.dec_err.decerr_status.value, irq_data->u.dec_err.decerr_status.thr_err, irq_data->u.dec_err.decerr_status.fcl_err, irq_data->u.dec_err.decerr_status.len_md_err, irq_data->u.dec_err.decerr_status.format_err); error_handled = true; break; case CAM_CAMNOC_IRQ_IPE_BPS_UBWC_ENCODE_ERROR: CAM_ERR_RATE_LIMIT(CAM_ICP, "IPE/BPS UBWC Encode error type=%d status=%x", irq_data->irq_type, irq_data->u.enc_err.encerr_status.value); error_handled = true; break; default: break; } return error_handled; } int cam_bps_register_cpas(struct cam_hw_soc_info *soc_info, struct cam_bps_device_core_info *core_info, uint32_t hw_idx) Loading @@ -42,7 +76,7 @@ int cam_bps_register_cpas(struct cam_hw_soc_info *soc_info, cpas_register_params.dev = &soc_info->pdev->dev; memcpy(cpas_register_params.identifier, "bps", sizeof("bps")); cpas_register_params.cam_cpas_client_cb = NULL; cpas_register_params.cam_cpas_client_cb = cam_bps_cpas_cb; cpas_register_params.cell_index = hw_idx; cpas_register_params.userdata = NULL; Loading