فهرست منبع

Merge "msm: camera: isp: Modify state of WM node only on successful acquire" into camera-kernel.lnx.5.0

Haritha Chintalapati 4 سال پیش
والد
کامیت
770082c50d

+ 4 - 6
drivers/cam_isp/isp_hw_mgr/isp_hw/sfe_hw/sfe_bus/cam_sfe_bus_wr.c

@@ -522,9 +522,6 @@ static int cam_sfe_bus_acquire_wm(
 		return -EALREADY;
 	}
 
-	wm_res->res_state = CAM_ISP_RESOURCE_STATE_RESERVED;
-	wm_res->tasklet_info = tasklet;
-
 	rsrc_data = wm_res->res_priv;
 	wm_idx = rsrc_data->index;
 	rsrc_data->format = out_port_info->format;
@@ -611,6 +608,9 @@ static int cam_sfe_bus_acquire_wm(
 		break;
 	}
 
+	wm_res->res_state = CAM_ISP_RESOURCE_STATE_RESERVED;
+	wm_res->tasklet_info = tasklet;
+
 	CAM_DBG(CAM_SFE,
 		"SFE:%d WM:%d processed width:%d height:%d format:0x%X pack_fmt 0x%x %s",
 		rsrc_data->common_data->core_index, rsrc_data->index,
@@ -1179,7 +1179,7 @@ static int cam_sfe_bus_acquire_sfe_out(void *priv, void *acquire_args,
 			"Failed to acquire comp_grp SFE:%d out_type:%d rc:%d",
 			rsrc_data->common_data->core_index,
 			sfe_out_res_id, rc);
-		return rc;
+		goto release_wm;
 	}
 
 	rsrc_data->is_dual = out_acquire_args->is_dual;
@@ -1199,8 +1199,6 @@ release_wm:
 		cam_sfe_bus_release_wm(bus_priv,
 			&rsrc_data->wm_res[i]);
 
-	cam_sfe_bus_release_comp_grp(bus_priv, rsrc_data->comp_grp);
-
 	return rc;
 }
 

+ 4 - 5
drivers/cam_isp/isp_hw_mgr/isp_hw/vfe_hw/vfe_bus/cam_vfe_bus_ver3.c

@@ -944,8 +944,6 @@ static int cam_vfe_bus_ver3_acquire_wm(
 			wm_idx, wm_res->res_state);
 		return -EALREADY;
 	}
-	wm_res->res_state = CAM_ISP_RESOURCE_STATE_RESERVED;
-	wm_res->tasklet_info = tasklet;
 
 	rsrc_data = wm_res->res_priv;
 	wm_idx = rsrc_data->index;
@@ -1247,6 +1245,9 @@ static int cam_vfe_bus_ver3_acquire_wm(
 		break;
 	}
 
+	wm_res->res_state = CAM_ISP_RESOURCE_STATE_RESERVED;
+	wm_res->tasklet_info = tasklet;
+
 	CAM_DBG(CAM_ISP,
 		"VFE:%d WM:%d %s processed width:%d height:%d stride:%d format:0x%X en_ubwc:%d %s",
 		rsrc_data->common_data->core_index, rsrc_data->index,
@@ -1975,7 +1976,7 @@ static int cam_vfe_bus_ver3_acquire_vfe_out(void *bus_priv, void *acquire_args,
 			"Failed to acquire comp_grp VFE:%d out_typp:%d rc:%d",
 			rsrc_data->common_data->core_index,
 			vfe_out_res_id, rc);
-		return rc;
+		goto release_wm;
 	}
 
 	rsrc_data->is_dual = out_acquire_args->is_dual;
@@ -1992,8 +1993,6 @@ release_wm:
 		cam_vfe_bus_ver3_release_wm(ver3_bus_priv,
 			&rsrc_data->wm_res[i]);
 
-	cam_vfe_bus_ver3_release_comp_grp(ver3_bus_priv, rsrc_data->comp_grp);
-
 	return rc;
 }