Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f485b82d authored by Ravikishore Pampana's avatar Ravikishore Pampana
Browse files

msm: camera: tfe: Handle unsupported outport format



If requested format is not supported by any write master
port, tfe driver need to return the error and also need to
release the acquired write masters for that port. This
change handles proper release of write master port,
if no acquire happen, it will not call the write master
port release functions.


CRs-Fixed: 2692793
Change-Id: Ibec809ddfe76564ec25ffcf723f50c7857fc96b6
Signed-off-by: default avatarRavikishore Pampana <rpampana@codeaurora.org>
parent 724be4da
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1189,9 +1189,9 @@ static int cam_tfe_bus_acquire_tfe_out(void *priv, void *acquire_args,
	struct cam_tfe_bus_tfe_out_data        *rsrc_data = NULL;
	enum cam_tfe_bus_tfe_out_id             tfe_out_res_id;
	enum cam_tfe_bus_comp_grp_id            comp_grp_id;
	int                                     rc = -ENODEV;
	int                                     i, rc = -ENODEV;
	uint32_t                                secure_caps = 0, mode;
	uint32_t  i, format, num_wm, client_done_mask = 0;
	uint32_t  format, num_wm, client_done_mask = 0;

	if (!bus_priv || !acquire_args) {
		CAM_ERR(CAM_ISP, "Invalid Param");
@@ -1315,9 +1315,9 @@ static int cam_tfe_bus_acquire_tfe_out(void *priv, void *acquire_args,

release_wm:
	for (i--; i >= 0; i--)
		cam_tfe_bus_release_wm(bus_priv,
			rsrc_data->wm_res[i]);
		cam_tfe_bus_release_wm(bus_priv, rsrc_data->wm_res[i]);

	if (rsrc_data->comp_grp)
		cam_tfe_bus_release_comp_grp(bus_priv, rsrc_data->comp_grp);

	return rc;