Skip to content

Commit f5ba6da

Browse files
KevalSanghviQtimichael-jihan-qcom
authored andcommitted
msm: camera: isp: RDI-only ctx on non-EPOCH targets
For older targets, RDI does not support EPOCH configuration, so the unified PIX/RDI ISP context state machine is not applicable. Extend CAM_ISP_HW_MGR_CMD_CTX_TYPE handling to: - Force CAM_ISP_CTX_RDI for: (RDI-only contexts OR lite contexts) AND targets where CSID EPOCH config on RDI is not supported. On newer targets where RDI supports EPOCH configuration, the unified PIX/RDI ISP context state machine continues to be used. CRs-Fixed: 4400688 Change-Id: I50e51a07f97acaf6f689b0d83db2704248671a79 Signed-off-by: Keval Sanghvi <ksanghvi@qti.qualcomm.com>
1 parent fde2494 commit f5ba6da

9 files changed

Lines changed: 28 additions & 0 deletions

File tree

camera/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15318,11 +15318,25 @@ static int cam_ife_mgr_int_cmd(void *hw_mgr_priv,
1531815318
isp_hw_cmd_args->u.sof_irq_enable);
1531915319
break;
1532015320
case CAM_ISP_HW_MGR_CMD_CTX_TYPE:
15321+
CAM_DBG(CAM_ISP, "Is rdi_epoch_config_not_supported : %d",
15322+
hw_mgr->rdi_epoch_config_not_supported);
1532115323
if (c_ctx->flags.is_fe_enabled && c_ctx->flags.is_offline)
1532215324
isp_hw_cmd_args->u.ctx_info.type = CAM_ISP_CTX_OFFLINE;
1532315325
else if (c_ctx->flags.is_fe_enabled && !c_ctx->flags.is_offline &&
1532415326
c_ctx->ctx_type != CAM_IFE_CTX_TYPE_SFE)
1532515327
isp_hw_cmd_args->u.ctx_info.type = CAM_ISP_CTX_FS2;
15328+
/*
15329+
* For older tagets, RDI does not support EPOCH configuration,
15330+
* so unified state machine is not applicable and use RDI-only
15331+
* ISP context state machine for RDI use cases.
15332+
*
15333+
* On newer targets, RDI supports EPOCH configuration and can use
15334+
* the unified ISP context state machine (PIX/RDI).
15335+
*/
15336+
else if ((c_ctx->flags.is_rdi_only_context ||
15337+
c_ctx->flags.is_lite_context) &&
15338+
(hw_mgr->rdi_epoch_config_not_supported))
15339+
isp_hw_cmd_args->u.ctx_info.type = CAM_ISP_CTX_RDI;
1532615340
else
1532715341
isp_hw_cmd_args->u.ctx_info.type = CAM_ISP_CTX_PIX;
1532815342
if (hw_mgr->csid_aup_rup_en)
@@ -17293,6 +17307,8 @@ static int cam_ife_hw_mgr_sort_dev_with_caps(
1729317307
ife_hw_mgr->csid_hw_caps[i].global_reset_en;
1729417308
ife_hw_mgr->csid_aup_rup_en =
1729517309
ife_hw_mgr->csid_hw_caps[i].aup_rup_en;
17310+
ife_hw_mgr->rdi_epoch_config_not_supported =
17311+
ife_hw_mgr->csid_hw_caps[i].rdi_epoch_config_not_supported;
1729617312
ife_hw_mgr->csid_camif_irq_support =
1729717313
ife_hw_mgr->csid_hw_caps[i].camif_irq_support;
1729817314
}

camera/drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,7 @@ enum cam_isp_irq_inject_common_param_pos {
675675
* @min_clk_threshold: Min sfe clock
676676
* @offline_reconfig: offline ISP need to reconfigure or not
677677
* @offline_outport_sync: Offline ISP HW needs to check outport to sync with correct hw
678+
* @rdi_epoch_config_not_supported: is RDI epoch config supported
678679
*/
679680
struct cam_ife_hw_mgr {
680681
struct cam_isp_hw_mgr mgr_common;
@@ -722,6 +723,7 @@ struct cam_ife_hw_mgr {
722723
uint32_t bytes_per_clk;
723724
bool offline_reconfig;
724725
bool offline_outport_sync;
726+
bool rdi_epoch_config_not_supported;
725727
};
726728

727729
/**

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid170.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-only */
22
/*
33
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
4+
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
45
*/
56
#ifndef _CAM_IFE_CSID_170_H_
67
#define _CAM_IFE_CSID_170_H_
@@ -391,6 +392,7 @@ static struct cam_ife_csid_ver1_common_reg_info
391392
.format_measure_height_shift_val = 0x10,
392393
.format_measure_width_mask_val = 0xFFFF,
393394
.format_measure_width_shift_val = 0x0,
395+
.rdi_epoch_config_not_supported = 1,
394396
};
395397

396398
static struct cam_ife_csid_ver1_reg_info cam_ife_csid_170_reg_info = {

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ int cam_ife_csid_ver1_get_hw_caps(void *hw_priv,
299299
hw_caps->version_incr = csid_reg->cmn_reg->version_incr;
300300
hw_caps->global_reset_en = csid_reg->cmn_reg->global_reset;
301301
hw_caps->aup_rup_en = csid_reg->cmn_reg->aup_rup_supported;
302+
hw_caps->rdi_epoch_config_not_supported = csid_reg->cmn_reg->rdi_epoch_config_not_supported;
302303
hw_caps->is_lite = soc_private->is_ife_csid_lite;
303304

304305
CAM_DBG(CAM_ISP,

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver1.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ struct cam_ife_csid_ver1_common_reg_info {
119119
uint32_t early_eof_supported;
120120
uint32_t global_reset;
121121
uint32_t aup_rup_supported;
122+
uint32_t rdi_epoch_config_not_supported;
122123

123124
/* Masks */
124125
uint32_t ipp_irq_mask_all;

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,6 +2479,7 @@ int cam_ife_csid_ver2_get_hw_caps(void *hw_priv,
24792479
hw_caps->version_incr = csid_reg->cmn_reg->version_incr;
24802480
hw_caps->global_reset_en = csid_reg->cmn_reg->global_reset;
24812481
hw_caps->aup_rup_en = csid_reg->cmn_reg->aup_rup_supported;
2482+
hw_caps->rdi_epoch_config_not_supported = csid_reg->cmn_reg->rdi_epoch_config_not_supported;
24822483
hw_caps->only_master_rup = csid_reg->cmn_reg->only_master_rup;
24832484
hw_caps->is_lite = soc_private->is_ife_csid_lite;
24842485
hw_caps->sfe_ipp_input_rdi_res = csid_reg->cmn_reg->sfe_ipp_input_rdi_res;

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_hw_ver2.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,6 +665,7 @@ struct cam_ife_csid_ver2_common_reg_info {
665665
uint32_t early_eof_supported;
666666
uint32_t global_reset;
667667
uint32_t aup_rup_supported;
668+
uint32_t rdi_epoch_config_not_supported;
668669
uint32_t only_master_rup;
669670
uint32_t sfe_ipp_input_rdi_res;
670671
uint32_t phy_sel_base_idx;

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/ife_csid_hw/cam_ife_csid_lite17x.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* SPDX-License-Identifier: GPL-2.0-only */
22
/*
33
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
4+
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
45
*/
56

67
#ifndef _CAM_IFE_CSID_LITE17X_H_
@@ -385,6 +386,7 @@ static struct cam_ife_csid_ver1_common_reg_info
385386
.format_measure_height_shift_val = 0x10,
386387
.format_measure_width_mask_val = 0xFFFF,
387388
.format_measure_width_shift_val = 0x0,
389+
.rdi_epoch_config_not_supported = 1,
388390
};
389391

390392
static struct cam_ife_csid_ver1_reg_info cam_ife_csid_lite_17x_reg_info = {

camera/drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_ife_csid_hw_intf.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ enum cam_ife_csid_secondary_evt_type {
110110
* @only_master_rup: flag to indicate if only master RUP
111111
* @camif_irq_support: flag to indicate if CSID supports CAMIF irq
112112
* @is_ife_sfe_mapped: flag to indicate if IFE & SFE are one-one mapped
113+
* @rdi_epoch_config_not_supported: flag to indicate whether Epoch on rdi is supported or not
113114
*/
114115
struct cam_ife_csid_hw_caps {
115116
uint32_t num_rdis;
@@ -125,6 +126,7 @@ struct cam_ife_csid_hw_caps {
125126
bool only_master_rup;
126127
bool camif_irq_support;
127128
bool is_ife_sfe_mapped;
129+
bool rdi_epoch_config_not_supported;
128130
};
129131

130132
struct cam_isp_out_port_generic_info {

0 commit comments

Comments
 (0)