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

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

Merge "msm: mdss: Fix potential race condition in rotator"

parents 3dfdd0e6 3c3db4e2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1126,6 +1126,7 @@ static void mdss_rotator_release_from_work_distribution(
		bool free_perf = false;
		u32 wb_idx = entry->queue->hw->wb_id;

		mutex_lock(&mgr->lock);
		mutex_lock(&entry->perf->work_dis_lock);
		if (entry->perf->work_distribution[wb_idx])
			entry->perf->work_distribution[wb_idx]--;
@@ -1149,6 +1150,7 @@ static void mdss_rotator_release_from_work_distribution(
			mdss_rotator_clk_ctrl(mgr, false);
			entry->perf = NULL;
		}
		mutex_unlock(&mgr->lock);
	}
}

@@ -2045,7 +2047,6 @@ static int mdss_rotator_close_session(struct mdss_rot_mgr *mgr,
	list_del_init(&perf->list);
	mutex_unlock(&perf->work_dis_lock);
	mutex_unlock(&private->perf_lock);
	mutex_unlock(&mgr->lock);

	if (offload_release_work)
		goto done;
@@ -2058,6 +2059,7 @@ static int mdss_rotator_close_session(struct mdss_rot_mgr *mgr,
done:
	pr_debug("Closed session id:%u", id);
	ATRACE_END(__func__);
	mutex_unlock(&mgr->lock);
	return 0;
}