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

Commit 3e225a7a 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: allow asynchronous acquire fence waits"

parents d2049174 c64144d1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1388,6 +1388,10 @@ static int __mdss_fb_sync_buf_done_callback(struct notifier_block *p,
	sync_pt_data = container_of(p, struct msm_sync_pt_data, notifier);

	switch (event) {
	case MDP_NOTIFY_FRAME_READY:
		if (sync_pt_data->async_wait_fences)
			mdss_fb_wait_for_fence(sync_pt_data);
		break;
	case MDP_NOTIFY_FRAME_FLUSHED:
		pr_debug("%s: frame flushed\n", sync_pt_data->fence_name);
		sync_pt_data->flushed = true;
@@ -1536,6 +1540,7 @@ static int __mdss_fb_perform_commit(struct msm_fb_data_type *mfd)
	struct msm_fb_backup_type *fb_backup = &mfd->msm_fb_backup;
	int ret = -ENOSYS;

	if (!sync_pt_data->async_wait_fences)
		mdss_fb_wait_for_fence(sync_pt_data);
	sync_pt_data->flushed = false;

+5 −0
Original line number Diff line number Diff line
@@ -49,6 +49,9 @@
 *
 * @MDP_NOTIFY_FRAME_BEGIN:	Frame update has started, the frame is about to
 *				be programmed into hardware.
 * @MDP_NOTIFY_FRAME_READY:	Frame ready to be kicked off, this can be used
 *				as the last point in time to synchronized with
 *				source buffers before kickoff.
 * @MDP_NOTIFY_FRAME_FLUSHED:	Configuration of frame has been flushed and
 *				DMA transfer has started.
 * @MDP_NOTIFY_FRAME_DONE:	Frame DMA transfer has completed.
@@ -61,6 +64,7 @@
 */
enum mdp_notify_event {
	MDP_NOTIFY_FRAME_BEGIN = 1,
	MDP_NOTIFY_FRAME_READY,
	MDP_NOTIFY_FRAME_FLUSHED,
	MDP_NOTIFY_FRAME_DONE,
	MDP_NOTIFY_FRAME_TIMEOUT,
@@ -90,6 +94,7 @@ struct msm_sync_pt_data {

	atomic_t commit_cnt;
	bool flushed;
	bool async_wait_fences;

	struct mutex sync_mutex;
	struct notifier_block notifier;