Loading arch/arm64/boot/dts/qcom/atoll-camera.dtsi +6 −6 Original line number Diff line number Diff line /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, 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 @@ -497,19 +497,19 @@ }; iova-mem-region-io { /* IO region is approximately 3 GB */ /* IO region is approximately 3.3 GB */ iova-region-name = "io"; iova-region-start = <0x10B11000>; iova-region-len = <0xCF4EF000>; iova-region-start = <0x10C00000>; iova-region-len = <0xCF300000>; iova-region-id = <0x3>; status = "ok"; }; iova-mem-qdss-region { /* qdss region is approximately 64K */ /* qdss region is approximately 1MB */ iova-region-name = "qdss"; iova-region-start = <0x10B00000>; iova-region-len = <0x10000>; iova-region-len = <0x100000>; iova-region-id = <0x5>; qdss-phy-addr = <0x16790000>; status = "ok"; Loading arch/arm64/boot/dts/qcom/sm6150-camera.dtsi +5 −5 Original line number Diff line number Diff line Loading @@ -335,19 +335,19 @@ }; iova-mem-region-io { /* IO region is approximately 3 GB */ /* IO region is approximately 3.3 GB */ iova-region-name = "io"; iova-region-start = <0x10B11000>; iova-region-len = <0xCF4EF000>; iova-region-start = <0x10C00000>; iova-region-len = <0xCF300000>; iova-region-id = <0x3>; status = "ok"; }; iova-mem-qdss-region { /* qdss region is approximately 64K */ /* qdss region is approximately 1MB */ iova-region-name = "qdss"; iova-region-start = <0x10B00000>; iova-region-len = <0x10000>; iova-region-len = <0x100000>; iova-region-id = <0x5>; qdss-phy-addr = <0x16790000>; status = "ok"; Loading drivers/media/platform/msm/camera/cam_cpas/cpas_top/cam_cpastop_hw.c +7 −7 Original line number Diff line number Diff line /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2020, 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 @@ -221,10 +221,10 @@ static int cam_cpastop_handle_errlogger(struct cam_cpas *cpas_core, soc_info->reg_map[camnoc_index].mem_base + camnoc_info->err_logger->errlog3_high); CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "Possible memory configuration issue, fault at SMMU raised as CAMNOC SLAVE_IRQ"); CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "mainctrl[0x%x 0x%x] errvld[0x%x 0x%x] stall_en=%d, fault_en=%d, err_vld=%d", camnoc_info->err_logger->mainctrl, slave_err->mainctrl.value, Loading @@ -238,7 +238,7 @@ static int cam_cpastop_handle_errlogger(struct cam_cpas *cpas_core, if (err_code_index > CAMNOC_SLAVE_MAX_ERR_CODE) err_code_index = CAMNOC_SLAVE_MAX_ERR_CODE; CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "errlog0 low[0x%x 0x%x] high[0x%x 0x%x] loginfo_vld=%d, word_error=%d, non_secure=%d, device=%d, opc=%d, err_code=%d(%s) sizef=%d, addr_space=%d, len1=%d", camnoc_info->err_logger->errlog0_low, slave_err->errlog0_low.value, Loading @@ -255,7 +255,7 @@ static int cam_cpastop_handle_errlogger(struct cam_cpas *cpas_core, slave_err->errlog0_low.addr_space, slave_err->errlog0_high.len1); CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "errlog1_low[0x%x 0x%x] errlog1_high[0x%x 0x%x] errlog2_low[0x%x 0x%x] errlog2_high[0x%x 0x%x] errlog3_low[0x%x 0x%x] errlog3_high[0x%x 0x%x]", camnoc_info->err_logger->errlog1_low, slave_err->errlog1_low.value, Loading Loading @@ -284,7 +284,7 @@ static int cam_cpastop_handle_ubwc_enc_err(struct cam_cpas *cpas_core, camnoc_info->irq_err[i].err_status.offset); /* Let clients handle the UBWC errors */ CAM_DBG(CAM_CPAS, CAM_ERR_RATE_LIMIT(CAM_CPAS, "ubwc enc err [%d]: offset[0x%x] value[0x%x]", i, camnoc_info->irq_err[i].err_status.offset, enc_err->encerr_status.value); Loading @@ -303,7 +303,7 @@ static int cam_cpastop_handle_ubwc_dec_err(struct cam_cpas *cpas_core, camnoc_info->irq_err[i].err_status.offset); /* Let clients handle the UBWC errors */ CAM_DBG(CAM_CPAS, CAM_ERR_RATE_LIMIT(CAM_CPAS, "ubwc dec err status [%d]: offset[0x%x] value[0x%x] thr_err=%d, fcl_err=%d, len_md_err=%d, format_err=%d", i, camnoc_info->irq_err[i].err_status.offset, dec_err->decerr_status.value, Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +4 −1 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2020, 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 @@ -2835,6 +2835,9 @@ static int cam_ife_csid_reset_retain_sw_reg( cam_io_w_mb(1, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_irq_cmd_addr); cam_io_w_mb(0, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_top_irq_mask_addr); cam_io_w_mb(csid_reg->cmn_reg->csid_rst_stb, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_rst_strobes_addr); Loading drivers/media/platform/msm/camera/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c +46 −15 Original line number Diff line number Diff line /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2020, 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 @@ -261,6 +261,8 @@ static int cam_lrme_mgr_util_prepare_hw_update_entries( uint32_t kmd_buf_used_bytes = 0; struct cam_hw_update_entry *hw_entry; struct cam_cmd_buf_desc *cmd_desc = NULL; uintptr_t vaddr_ptr = 0; size_t len = 0; hw_device = config_args->hw_device; if (!hw_device) { Loading Loading @@ -330,7 +332,17 @@ static int cam_lrme_mgr_util_prepare_hw_update_entries( CAM_ERR(CAM_LRME, "Exceed max num of entry"); return -EINVAL; } rc = cam_mem_get_cpu_buf(cmd_desc[i].mem_handle, &vaddr_ptr, &len); if (rc || (!vaddr_ptr) || (!len)) { CAM_ERR(CAM_LRME, "hdl=%x vaddr=%pK offset=%d cmdBufflen=%d cmdlen=%d index=%d num_cmd_buf=%d", cmd_desc[i].mem_handle, (void *)vaddr_ptr, cmd_desc[i].offset, cmd_desc[i].length, len, i, prepare->packet->num_cmd_buf); return -EINVAL; } hw_entry[num_entry].handle = cmd_desc[i].mem_handle; hw_entry[num_entry].len = cmd_desc[i].length; hw_entry[num_entry].offset = cmd_desc[i].offset; Loading Loading @@ -425,22 +437,27 @@ static int cam_lrme_mgr_util_submit_req(void *priv, void *data) CAM_LRME_HW_CMD_SUBMIT, &submit_args, sizeof(struct cam_lrme_hw_submit_args)); if (rc == -EBUSY) CAM_DBG(CAM_LRME, "device busy"); else if (rc) CAM_ERR(CAM_LRME, "submit request failed rc %d", rc); if (rc) { req_prio == 0 ? spin_lock(&hw_device->high_req_lock) : if (rc == -EBUSY) { CAM_DBG(CAM_LRME, "device busy"); req_prio == 0 ? spin_lock(&hw_device->high_req_lock) : spin_lock(&hw_device->normal_req_lock); list_add(&frame_req->frame_list, (req_prio == 0 ? &hw_device->frame_pending_list_high : &hw_device->frame_pending_list_normal)); req_prio == 0 ? spin_unlock(&hw_device->high_req_lock) : spin_unlock(&hw_device->normal_req_lock); } if (rc == -EBUSY) req_prio == 0 ? spin_unlock(&hw_device->high_req_lock) : spin_unlock( &hw_device->normal_req_lock); rc = 0; } else CAM_ERR(CAM_LRME, "submit request failed for frame req id: %llu rc %d", frame_req->req_id, rc); } } else { req_prio == 0 ? spin_lock(&hw_device->high_req_lock) : spin_lock(&hw_device->normal_req_lock); Loading Loading @@ -734,6 +751,20 @@ static int cam_lrme_mgr_hw_flush(void *hw_mgr_priv, void *hw_flush_args) goto end; } spin_lock(&hw_device->high_req_lock); list_for_each_entry(frame_req, &hw_device->frame_pending_list_high, frame_list) { list_del_init(&frame_req->frame_list); } spin_unlock(&hw_device->high_req_lock); spin_lock(&hw_device->normal_req_lock); list_for_each_entry(frame_req, &hw_device->frame_pending_list_normal, frame_list) { list_del_init(&frame_req->frame_list); } spin_unlock(&hw_device->normal_req_lock); req_list = (struct cam_lrme_frame_request **)args->flush_req_pending; for (i = 0; i < args->num_req_pending; i++) { frame_req = req_list[i]; Loading Loading
arch/arm64/boot/dts/qcom/atoll-camera.dtsi +6 −6 Original line number Diff line number Diff line /* * Copyright (c) 2019, The Linux Foundation. All rights reserved. * Copyright (c) 2019-2020, 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 @@ -497,19 +497,19 @@ }; iova-mem-region-io { /* IO region is approximately 3 GB */ /* IO region is approximately 3.3 GB */ iova-region-name = "io"; iova-region-start = <0x10B11000>; iova-region-len = <0xCF4EF000>; iova-region-start = <0x10C00000>; iova-region-len = <0xCF300000>; iova-region-id = <0x3>; status = "ok"; }; iova-mem-qdss-region { /* qdss region is approximately 64K */ /* qdss region is approximately 1MB */ iova-region-name = "qdss"; iova-region-start = <0x10B00000>; iova-region-len = <0x10000>; iova-region-len = <0x100000>; iova-region-id = <0x5>; qdss-phy-addr = <0x16790000>; status = "ok"; Loading
arch/arm64/boot/dts/qcom/sm6150-camera.dtsi +5 −5 Original line number Diff line number Diff line Loading @@ -335,19 +335,19 @@ }; iova-mem-region-io { /* IO region is approximately 3 GB */ /* IO region is approximately 3.3 GB */ iova-region-name = "io"; iova-region-start = <0x10B11000>; iova-region-len = <0xCF4EF000>; iova-region-start = <0x10C00000>; iova-region-len = <0xCF300000>; iova-region-id = <0x3>; status = "ok"; }; iova-mem-qdss-region { /* qdss region is approximately 64K */ /* qdss region is approximately 1MB */ iova-region-name = "qdss"; iova-region-start = <0x10B00000>; iova-region-len = <0x10000>; iova-region-len = <0x100000>; iova-region-id = <0x5>; qdss-phy-addr = <0x16790000>; status = "ok"; Loading
drivers/media/platform/msm/camera/cam_cpas/cpas_top/cam_cpastop_hw.c +7 −7 Original line number Diff line number Diff line /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2020, 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 @@ -221,10 +221,10 @@ static int cam_cpastop_handle_errlogger(struct cam_cpas *cpas_core, soc_info->reg_map[camnoc_index].mem_base + camnoc_info->err_logger->errlog3_high); CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "Possible memory configuration issue, fault at SMMU raised as CAMNOC SLAVE_IRQ"); CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "mainctrl[0x%x 0x%x] errvld[0x%x 0x%x] stall_en=%d, fault_en=%d, err_vld=%d", camnoc_info->err_logger->mainctrl, slave_err->mainctrl.value, Loading @@ -238,7 +238,7 @@ static int cam_cpastop_handle_errlogger(struct cam_cpas *cpas_core, if (err_code_index > CAMNOC_SLAVE_MAX_ERR_CODE) err_code_index = CAMNOC_SLAVE_MAX_ERR_CODE; CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "errlog0 low[0x%x 0x%x] high[0x%x 0x%x] loginfo_vld=%d, word_error=%d, non_secure=%d, device=%d, opc=%d, err_code=%d(%s) sizef=%d, addr_space=%d, len1=%d", camnoc_info->err_logger->errlog0_low, slave_err->errlog0_low.value, Loading @@ -255,7 +255,7 @@ static int cam_cpastop_handle_errlogger(struct cam_cpas *cpas_core, slave_err->errlog0_low.addr_space, slave_err->errlog0_high.len1); CAM_ERR_RATE_LIMIT(CAM_CPAS, CAM_DBG(CAM_CPAS, "errlog1_low[0x%x 0x%x] errlog1_high[0x%x 0x%x] errlog2_low[0x%x 0x%x] errlog2_high[0x%x 0x%x] errlog3_low[0x%x 0x%x] errlog3_high[0x%x 0x%x]", camnoc_info->err_logger->errlog1_low, slave_err->errlog1_low.value, Loading Loading @@ -284,7 +284,7 @@ static int cam_cpastop_handle_ubwc_enc_err(struct cam_cpas *cpas_core, camnoc_info->irq_err[i].err_status.offset); /* Let clients handle the UBWC errors */ CAM_DBG(CAM_CPAS, CAM_ERR_RATE_LIMIT(CAM_CPAS, "ubwc enc err [%d]: offset[0x%x] value[0x%x]", i, camnoc_info->irq_err[i].err_status.offset, enc_err->encerr_status.value); Loading @@ -303,7 +303,7 @@ static int cam_cpastop_handle_ubwc_dec_err(struct cam_cpas *cpas_core, camnoc_info->irq_err[i].err_status.offset); /* Let clients handle the UBWC errors */ CAM_DBG(CAM_CPAS, CAM_ERR_RATE_LIMIT(CAM_CPAS, "ubwc dec err status [%d]: offset[0x%x] value[0x%x] thr_err=%d, fcl_err=%d, len_md_err=%d, format_err=%d", i, camnoc_info->irq_err[i].err_status.offset, dec_err->decerr_status.value, Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_core.c +4 −1 Original line number Diff line number Diff line /* Copyright (c) 2018-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2018-2020, 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 @@ -2835,6 +2835,9 @@ static int cam_ife_csid_reset_retain_sw_reg( cam_io_w_mb(1, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_irq_cmd_addr); cam_io_w_mb(0, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_top_irq_mask_addr); cam_io_w_mb(csid_reg->cmn_reg->csid_rst_stb, soc_info->reg_map[0].mem_base + csid_reg->cmn_reg->csid_rst_strobes_addr); Loading
drivers/media/platform/msm/camera/cam_lrme/lrme_hw_mgr/cam_lrme_hw_mgr.c +46 −15 Original line number Diff line number Diff line /* Copyright (c) 2017-2019, The Linux Foundation. All rights reserved. /* Copyright (c) 2017-2020, 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 @@ -261,6 +261,8 @@ static int cam_lrme_mgr_util_prepare_hw_update_entries( uint32_t kmd_buf_used_bytes = 0; struct cam_hw_update_entry *hw_entry; struct cam_cmd_buf_desc *cmd_desc = NULL; uintptr_t vaddr_ptr = 0; size_t len = 0; hw_device = config_args->hw_device; if (!hw_device) { Loading Loading @@ -330,7 +332,17 @@ static int cam_lrme_mgr_util_prepare_hw_update_entries( CAM_ERR(CAM_LRME, "Exceed max num of entry"); return -EINVAL; } rc = cam_mem_get_cpu_buf(cmd_desc[i].mem_handle, &vaddr_ptr, &len); if (rc || (!vaddr_ptr) || (!len)) { CAM_ERR(CAM_LRME, "hdl=%x vaddr=%pK offset=%d cmdBufflen=%d cmdlen=%d index=%d num_cmd_buf=%d", cmd_desc[i].mem_handle, (void *)vaddr_ptr, cmd_desc[i].offset, cmd_desc[i].length, len, i, prepare->packet->num_cmd_buf); return -EINVAL; } hw_entry[num_entry].handle = cmd_desc[i].mem_handle; hw_entry[num_entry].len = cmd_desc[i].length; hw_entry[num_entry].offset = cmd_desc[i].offset; Loading Loading @@ -425,22 +437,27 @@ static int cam_lrme_mgr_util_submit_req(void *priv, void *data) CAM_LRME_HW_CMD_SUBMIT, &submit_args, sizeof(struct cam_lrme_hw_submit_args)); if (rc == -EBUSY) CAM_DBG(CAM_LRME, "device busy"); else if (rc) CAM_ERR(CAM_LRME, "submit request failed rc %d", rc); if (rc) { req_prio == 0 ? spin_lock(&hw_device->high_req_lock) : if (rc == -EBUSY) { CAM_DBG(CAM_LRME, "device busy"); req_prio == 0 ? spin_lock(&hw_device->high_req_lock) : spin_lock(&hw_device->normal_req_lock); list_add(&frame_req->frame_list, (req_prio == 0 ? &hw_device->frame_pending_list_high : &hw_device->frame_pending_list_normal)); req_prio == 0 ? spin_unlock(&hw_device->high_req_lock) : spin_unlock(&hw_device->normal_req_lock); } if (rc == -EBUSY) req_prio == 0 ? spin_unlock(&hw_device->high_req_lock) : spin_unlock( &hw_device->normal_req_lock); rc = 0; } else CAM_ERR(CAM_LRME, "submit request failed for frame req id: %llu rc %d", frame_req->req_id, rc); } } else { req_prio == 0 ? spin_lock(&hw_device->high_req_lock) : spin_lock(&hw_device->normal_req_lock); Loading Loading @@ -734,6 +751,20 @@ static int cam_lrme_mgr_hw_flush(void *hw_mgr_priv, void *hw_flush_args) goto end; } spin_lock(&hw_device->high_req_lock); list_for_each_entry(frame_req, &hw_device->frame_pending_list_high, frame_list) { list_del_init(&frame_req->frame_list); } spin_unlock(&hw_device->high_req_lock); spin_lock(&hw_device->normal_req_lock); list_for_each_entry(frame_req, &hw_device->frame_pending_list_normal, frame_list) { list_del_init(&frame_req->frame_list); } spin_unlock(&hw_device->normal_req_lock); req_list = (struct cam_lrme_frame_request **)args->flush_req_pending; for (i = 0; i < args->num_req_pending; i++) { frame_req = req_list[i]; Loading