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

Commit 79277994 authored by Rahul Sharma's avatar Rahul Sharma Committed by Gerrit - the friendly Code Review server
Browse files

drm/msm: remove the right vlbank event from the event list



This changes fixes an issue with vblank event list corruption.
we should only remove the event corresponding to a crtc from list
for which the thread was queued.

Change-Id: I9b9cef9073ba4cc377a85e21a7257d36e9b92388
Signed-off-by: default avatarRahul Sharma <sharah@codeaurora.org>
parent fec05057
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -185,9 +185,14 @@ static void vblank_ctrl_worker(struct kthread_work *work)
	struct msm_kms *kms = priv->kms;
	struct vblank_event *vbl_ev, *tmp;
	unsigned long flags;
	struct kthread_worker *worker = work->worker;
	struct msm_drm_commit *commit = container_of(worker,
						struct msm_drm_commit, worker);

	spin_lock_irqsave(&vbl_ctrl->lock, flags);
	list_for_each_entry_safe(vbl_ev, tmp, &vbl_ctrl->event_list, node) {
		if (vbl_ev->crtc_id != commit->crtc_id)
			continue;
		list_del(&vbl_ev->node);
		spin_unlock_irqrestore(&vbl_ctrl->lock, flags);