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

Commit 8b8145b3 authored by Harsh Shah's avatar Harsh Shah
Browse files

msm: camera: isp: Delay the change in BW during stop



Change the sequence of reducing the BW and stopping resources
during stop_hw to ensure BW is high until all the resources are
stopped. This will ensure that there are no overflow errors related
to BW during stop.

Change-Id: I0a4a74d56dc826ea3c0ad8f73d67ee2a16f22566
Signed-off-by: default avatarHarsh Shah <harshs@codeaurora.org>
parent 69b963bc
Loading
Loading
Loading
Loading
+10 −8
Original line number Diff line number Diff line
@@ -2224,13 +2224,6 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
		CAM_ERR(CAM_ISP, "CDM stream off failed %d",
			ctx->cdm_handle);

	CAM_DBG(CAM_ISP, "Going to stop IFE Mux");

	/* IFE mux in resources */
	list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) {
		cam_ife_hw_mgr_stop_hw_res(hw_mgr_res);
	}

	CAM_DBG(CAM_ISP, "Going to stop IFE Out");

	/* IFE out resources */
@@ -2244,6 +2237,13 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
		}
	}

	CAM_DBG(CAM_ISP, "Going to stop IFE Mux");

	/* IFE mux in resources */
	list_for_each_entry(hw_mgr_res, &ctx->res_list_ife_src, list) {
		cam_ife_hw_mgr_stop_hw_res(hw_mgr_res);
	}

	cam_tasklet_stop(ctx->common.tasklet_info);

	/*
@@ -2285,6 +2285,8 @@ static int cam_ife_mgr_stop_hw(void *hw_mgr_priv, void *stop_hw_args)
			ctx->base[i].idx, csid_halt_type);
	}

	cam_ife_mgr_pause_hw(ctx);

	if (stop_isp->stop_only)
		goto end;

+0 −21
Original line number Diff line number Diff line
@@ -598,27 +598,6 @@ int cam_vfe_top_stop(void *device_priv,
				break;
			}
		}

		if (hw_info->hw_state == CAM_HW_STATE_POWER_UP) {
			rc = cam_vfe_top_set_hw_clk_rate(top_priv);
			if (rc) {
				CAM_ERR(CAM_ISP,
					"set_hw_clk_rate failed, rc=%d", rc);
				return rc;
			}

		top_priv->hw_clk_rate = 0;

			rc = cam_vfe_top_set_axi_bw_vote(top_priv, true);
			if (rc) {
				CAM_ERR(CAM_ISP,
					"set_axi_bw_vote failed, rc=%d", rc);
				return rc;
			}
		} else {
			CAM_ERR(CAM_ISP, "VFE HW not powered up");
			rc = -EPERM;
		}
	}

	return rc;