Sfoglia il codice sorgente

Merge "msm: camera: isp: Update hw mgr if sys cache is not enabled" into camera-kernel.lnx.5.0

Savita Patted 4 anni fa
parent
commit
04d8edef9b

+ 11 - 0
drivers/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c

@@ -7149,6 +7149,8 @@ static int cam_isp_blob_sfe_exp_order_update(
 		}
 
 		/* Add more params if needed */
+		wm_rm_cache_cfg.wr_enabled = false;
+		wm_rm_cache_cfg.rd_enabled = false;
 		wm_rm_cache_cfg.use_cache =
 			(exp_order_max == i) ? true : false;
 		wm_rm_cache_cfg.scid = 0;
@@ -7218,6 +7220,15 @@ static int cam_isp_blob_sfe_exp_order_update(
 					return rc;
 			}
 		}
+
+		if (!wm_rm_cache_cfg.rd_enabled && !wm_rm_cache_cfg.wr_enabled) {
+			wm_rm_cache_cfg.use_cache = false;
+			if (base_idx == CAM_SFE_CORE_0)
+				ctx->flags.sys_cache_usage[CAM_LLCC_SMALL_1] = false;
+			else if (base_idx == CAM_SFE_CORE_1)
+				ctx->flags.sys_cache_usage[CAM_LLCC_SMALL_2] = false;
+		}
+
 		CAM_DBG(CAM_ISP,
 			"cache %s on exp order: %u [max: %u] for out: 0x%x",
 			(wm_rm_cache_cfg.use_cache ? "enabled" : "not enabled"),

+ 6 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/include/cam_sfe_hw_intf.h

@@ -158,12 +158,18 @@ struct cam_sfe_core_config_args {
  * @Brief:         Based on exp order rxved from userland
  *                 configure sys cache for SFE WMs & RMs
  *
+ * @wr_enabled:    Output param to indicate if SFE
+ *                 bus WR accepted these settings
+ * @rd_enabled:    Output param to indicate if SFE
+ *                 bus RD accepted these settings
  * @res:           SFE WM/RM Resource node
  * @use_cache:     If set cache configured
  * @type:          Dictates which slice ID to be used
  *
  */
 struct cam_isp_sfe_bus_sys_cache_config {
+	bool                                 wr_enabled;
+	bool                                 rd_enabled;
 	struct cam_isp_resource_node        *res;
 	bool                                 use_cache;
 	int                                  scid;

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_rd.c

@@ -1510,6 +1510,7 @@ static int cam_sfe_bus_rd_cache_config(void *priv, void *cmd_args,
 			sfe_bus_rd_data->rm_res[i]->res_priv;
 		rm_data->enable_caching = cache_cfg->use_cache;
 		rm_data->current_scid = cache_cfg->scid;
+		cache_cfg->rd_enabled = true;
 
 		CAM_DBG(CAM_SFE, "SFE:%d RM:%d cache_enable:%s scid:%u",
 			rm_data->common_data->core_index,

+ 1 - 0
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_wr.c

@@ -2803,6 +2803,7 @@ static int cam_sfe_bus_wr_cache_config(
 			sfe_out_data->wm_res[i].res_priv;
 		wm_data->enable_caching = cache_cfg->use_cache;
 		wm_data->current_scid = cache_cfg->scid;
+		cache_cfg->wr_enabled = true;
 
 		CAM_DBG(CAM_SFE, "SFE:%d WM:%d cache_enable:%s scid:%u",
 			wm_data->common_data->core_index,