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

Commit fd1460f5 authored by Skylar Chang's avatar Skylar Chang
Browse files

msm: ipa3: fix device hang issue if ipa_clk failed



if ipa-driver failed to get ipa-clk during the
device probe, seeing device hang issue due to
notifier_chain_register. The fix is to only
initialize the notifier_chain_register after
ipa-driver successfully gets ipa-clk.

Change-Id: I705bf9e2b81a9d50cda75d31504f79e082276792
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent 53d1dd96
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -4109,14 +4109,15 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
		IPADBG("Skipping bus scaling registration on Virtual plat\n");
	}

	if (ipa3_active_clients_log_init())
		goto fail_init_active_client;

	/* get IPA clocks */
	result = ipa3_get_clks(master_dev);
	if (result)
		goto fail_clk;

	/* init active_clients_log after getting ipa-clk */
	if (ipa3_active_clients_log_init())
		goto fail_init_active_client;

	/* Enable ipa3_ctx->enable_clock_scaling */
	ipa3_ctx->enable_clock_scaling = 1;
	ipa3_ctx->curr_ipa_clk_rate = ipa3_ctx->ctrl->ipa_clk_rate_turbo;
@@ -4525,9 +4526,9 @@ fail_init_hw:
	iounmap(ipa3_ctx->mmio);
fail_remap:
	ipa3_disable_clks();
fail_clk:
	ipa3_active_clients_log_destroy();
fail_init_active_client:
	ipa3_active_clients_log_destroy();
fail_clk:
	msm_bus_scale_unregister_client(ipa3_ctx->ipa_bus_hdl);
fail_ipahal:
	ipa3_bus_scale_table = NULL;