From 2e6c2544877fb5028dc89359cf7101f6c0602c84 Mon Sep 17 00:00:00 2001 From: Gaurav Jindal Date: Sun, 30 Jan 2022 12:31:11 +0530 Subject: [PATCH] msm: camera: isp: Configure UBWC registers during stream on In some cases while using scratch buffer UBWC registers are not configured even after receiving the update blob from Userland. This results in constraint errors at bus side. This commit configures the UBWC registers at stream on if the blob was received for the ports which are UBWC enabled. Change-Id: Icf9a66808432052c84f52bbf470880fde082cee3 CRs-Fixed: 3108015 Signed-off-by: Gaurav Jindal --- .../isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c index a583093803..16c088d73f 100644 --- a/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c +++ b/drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c @@ -234,6 +234,9 @@ static int cam_vfe_bus_ver3_process_cmd( struct cam_isp_resource_node *priv, uint32_t cmd_type, void *cmd_args, uint32_t arg_size); +static int cam_vfe_bus_ver3_config_ubwc_regs( + struct cam_vfe_bus_ver3_wm_resource_data *wm_data); + static int cam_vfe_bus_ver3_get_evt_payload( struct cam_vfe_bus_ver3_common_data *common_data, struct cam_vfe_bus_irq_evt_payload **evt_payload) @@ -1430,6 +1433,12 @@ static int cam_vfe_bus_ver3_start_wm(struct cam_isp_resource_node *wm_res) rsrc_data->index, rsrc_data->en_ubwc); return -EINVAL; } + + if (rsrc_data->ubwc_updated) { + cam_vfe_bus_ver3_config_ubwc_regs(rsrc_data); + rsrc_data->ubwc_updated = false; + } + val = cam_io_r_mb(common_data->mem_base + ubwc_regs->mode_cfg); val |= 0x1; if (disable_ubwc_comp) {