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

Commit cc23a98d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa3: Fix to release IPA clock during ap suspend"

parents 41915ec9 af0f1b34
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3452,6 +3452,7 @@ static int ipa3_apps_cons_request_resource(void)

static void ipa3_sps_release_resource(struct work_struct *work)
{
	mutex_lock(&ipa3_ctx->transport_pm.transport_pm_mutex);
	/* check whether still need to decrease client usage */
	if (atomic_read(&ipa3_ctx->transport_pm.dec_clients)) {
		if (atomic_read(&ipa3_ctx->transport_pm.eot_activity)) {
@@ -3463,6 +3464,7 @@ static void ipa3_sps_release_resource(struct work_struct *work)
		}
	}
	atomic_set(&ipa3_ctx->transport_pm.eot_activity, 0);
	mutex_unlock(&ipa3_ctx->transport_pm.transport_pm_mutex);
}

int ipa3_create_apps_resource(void)
@@ -4123,6 +4125,8 @@ static int ipa3_pre_init(const struct ipa3_plat_drv_res *resource_p,
		goto fail_create_transport_wq;
	}

	/* Initialize the SPS PM lock. */
	mutex_init(&ipa3_ctx->transport_pm.transport_pm_mutex);
	spin_lock_init(&ipa3_ctx->transport_pm.lock);
	ipa3_ctx->transport_pm.res_granted = false;
	ipa3_ctx->transport_pm.res_rel_in_prog = false;
+2 −0
Original line number Diff line number Diff line
@@ -1298,6 +1298,7 @@ struct ipa3_uc_wdi_ctx {
 * @lock: lock for ensuring atomic operations
 * @res_granted: true if SPS requested IPA resource and IPA granted it
 * @res_rel_in_prog: true if releasing IPA resource is in progress
 * @transport_pm_mutex: Mutex to protect the transport_pm functionality.
 */
struct ipa3_transport_pm {
	spinlock_t lock;
@@ -1305,6 +1306,7 @@ struct ipa3_transport_pm {
	bool res_rel_in_prog;
	atomic_t dec_clients;
	atomic_t eot_activity;
	struct mutex transport_pm_mutex;
};

/**