video-driver: Setup ucregion from boot_firmware op
On all places ucregion setup is done just before calling boot_firmware, move setup in boot_firmware op and remove ucregion_setup op. Change-Id: I91a9a72d3b88eef91e82e19b9d8629e9731211f5 Signed-off-by: Stanimir Varbanov <quic_c_svarba@quicinc.com>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
1020319ca4
commit
cca051abf4
@@ -943,6 +943,10 @@ static int __boot_firmware_iris2(struct msm_vidc_core *vidc_core)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rc = __setup_ucregion_memory_map_iris2(core);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
ctrl_init_val = BIT(0);
|
ctrl_init_val = BIT(0);
|
||||||
|
|
||||||
rc = __write_register(core, CTRL_INIT_IRIS2, ctrl_init_val);
|
rc = __write_register(core, CTRL_INIT_IRIS2, ctrl_init_val);
|
||||||
@@ -1182,7 +1186,6 @@ static struct msm_vidc_venus_ops iris2_ops = {
|
|||||||
.interrupt_init = __interrupt_init_iris2,
|
.interrupt_init = __interrupt_init_iris2,
|
||||||
.raise_interrupt = __raise_interrupt_iris2,
|
.raise_interrupt = __raise_interrupt_iris2,
|
||||||
.clear_interrupt = __clear_interrupt_iris2,
|
.clear_interrupt = __clear_interrupt_iris2,
|
||||||
.setup_ucregion_memmap = __setup_ucregion_memory_map_iris2,
|
|
||||||
.clock_config_on_enable = NULL,
|
.clock_config_on_enable = NULL,
|
||||||
.reset_ahb2axi_bridge = __reset_ahb2axi_bridge,
|
.reset_ahb2axi_bridge = __reset_ahb2axi_bridge,
|
||||||
.power_on = __power_on_iris2,
|
.power_on = __power_on_iris2,
|
||||||
|
@@ -987,6 +987,10 @@ static int __boot_firmware_iris3(struct msm_vidc_core *vidc_core)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rc = __setup_ucregion_memory_map_iris3(core);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
|
||||||
ctrl_init_val = BIT(0);
|
ctrl_init_val = BIT(0);
|
||||||
|
|
||||||
rc = __write_register(core, CTRL_INIT_IRIS3, ctrl_init_val);
|
rc = __write_register(core, CTRL_INIT_IRIS3, ctrl_init_val);
|
||||||
@@ -1260,7 +1264,6 @@ static struct msm_vidc_venus_ops iris3_ops = {
|
|||||||
.interrupt_init = __interrupt_init_iris3,
|
.interrupt_init = __interrupt_init_iris3,
|
||||||
.raise_interrupt = __raise_interrupt_iris3,
|
.raise_interrupt = __raise_interrupt_iris3,
|
||||||
.clear_interrupt = __clear_interrupt_iris3,
|
.clear_interrupt = __clear_interrupt_iris3,
|
||||||
.setup_ucregion_memmap = __setup_ucregion_memory_map_iris3,
|
|
||||||
.clock_config_on_enable = NULL,
|
.clock_config_on_enable = NULL,
|
||||||
.reset_ahb2axi_bridge = __reset_ahb2axi_bridge,
|
.reset_ahb2axi_bridge = __reset_ahb2axi_bridge,
|
||||||
.power_on = __power_on_iris3,
|
.power_on = __power_on_iris3,
|
||||||
|
@@ -24,7 +24,6 @@ struct msm_vidc_venus_ops {
|
|||||||
int (*reset_ahb2axi_bridge)(struct msm_vidc_core *core);
|
int (*reset_ahb2axi_bridge)(struct msm_vidc_core *core);
|
||||||
int (*clock_config_on_enable)(struct msm_vidc_core *core);
|
int (*clock_config_on_enable)(struct msm_vidc_core *core);
|
||||||
int (*interrupt_init)(struct msm_vidc_core *core);
|
int (*interrupt_init)(struct msm_vidc_core *core);
|
||||||
int (*setup_ucregion_memmap)(struct msm_vidc_core *core);
|
|
||||||
int (*raise_interrupt)(struct msm_vidc_core *core);
|
int (*raise_interrupt)(struct msm_vidc_core *core);
|
||||||
int (*clear_interrupt)(struct msm_vidc_core *core);
|
int (*clear_interrupt)(struct msm_vidc_core *core);
|
||||||
int (*prepare_pc)(struct msm_vidc_core *core);
|
int (*prepare_pc)(struct msm_vidc_core *core);
|
||||||
|
@@ -1797,8 +1797,6 @@ static int __resume(struct msm_vidc_core *core)
|
|||||||
*/
|
*/
|
||||||
__hand_off_regulators(core);
|
__hand_off_regulators(core);
|
||||||
|
|
||||||
call_venus_op(core, setup_ucregion_memmap, core);
|
|
||||||
|
|
||||||
/* Wait for boot completion */
|
/* Wait for boot completion */
|
||||||
rc = call_venus_op(core, boot_firmware, core);
|
rc = call_venus_op(core, boot_firmware, core);
|
||||||
if (rc) {
|
if (rc) {
|
||||||
@@ -1988,15 +1986,7 @@ int __load_fw(struct msm_vidc_core *core)
|
|||||||
__hand_off_regulators(core);
|
__hand_off_regulators(core);
|
||||||
trace_msm_v4l2_vidc_fw_load("END");
|
trace_msm_v4l2_vidc_fw_load("END");
|
||||||
|
|
||||||
/* configure interface_queues memory to firmware */
|
|
||||||
rc = call_venus_op(core, setup_ucregion_memmap, core);
|
|
||||||
if (rc) {
|
|
||||||
d_vpr_e("%s: failed to setup ucregion\n");
|
|
||||||
goto fail_setup_ucregion;
|
|
||||||
}
|
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
fail_setup_ucregion:
|
|
||||||
fail_protect_mem:
|
fail_protect_mem:
|
||||||
if (core->dt->fw_cookie)
|
if (core->dt->fw_cookie)
|
||||||
qcom_scm_pas_shutdown(core->dt->fw_cookie);
|
qcom_scm_pas_shutdown(core->dt->fw_cookie);
|
||||||
|
Reference in New Issue
Block a user