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

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

msm: ipa3: add check to load gsi fw once



Add the check before starting workqueue
to load ipa/gsi-fws to avoid the smmu
issue.

Change-Id: Icdea2df4ea30bc154bf539c3016fb08defce4c55
Signed-off-by: default avatarSkylar Chang <chiaweic@codeaurora.org>
parent f74ff626
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -5046,6 +5046,15 @@ static ssize_t ipa3_write(struct file *file, const char __user *buf,
			ipa3_ctx->ipa_config_is_mhi ? "" : "non ");
			ipa3_ctx->ipa_config_is_mhi ? "" : "non ");
	}
	}


	/* Prevent multiple calls from trying to load the FW again. */
	if (ipa3_ctx->fw_loaded) {
		IPAERR("not load FW again\n");
		return count;
	}

	/* Schedule WQ to load ipa-fws */
	ipa3_ctx->fw_loaded = true;

	queue_work(ipa3_ctx->transport_power_mgmt_wq,
	queue_work(ipa3_ctx->transport_power_mgmt_wq,
		&ipa3_fw_loading_work);
		&ipa3_fw_loading_work);


+1 −0
Original line number Original line Diff line number Diff line
@@ -1697,6 +1697,7 @@ struct ipa3_context {
	struct mbox_chan *mbox;
	struct mbox_chan *mbox;
	atomic_t ipa_clk_vote;
	atomic_t ipa_clk_vote;
	int (*client_lock_unlock[IPA_MAX_CLNT])(bool is_lock);
	int (*client_lock_unlock[IPA_MAX_CLNT])(bool is_lock);
	bool fw_loaded;
};
};


struct ipa3_plat_drv_res {
struct ipa3_plat_drv_res {