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

Commit 733c30d0 authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Marissa Wall
Browse files

UPSTREAM: Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)"



This reverts commit ecebca79.

Do not enable fence callback on poll() when using fence_array causes the
fence_array to not signal.

For now we will revert the change and enable signaling everytime time
poll is called with timeout=0 as well.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1479457603-30758-1-git-send-email-gustavo@padovan.org


(cherry picked from commit 069cad6d02fef7924fb942b37a6c17dd02a79f7f)
Signed-off-by: default avatarMarissa Wall <marissaw@google.com>

Change-Id: Id3e3df319fecfa128f3b94fb41a0f3437625a6d5
parent dbbeec41
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -305,8 +305,7 @@ static unsigned int sync_file_poll(struct file *file, poll_table *wait)

	poll_wait(file, &sync_file->wq, wait);

	if (!poll_does_not_wait(wait) &&
	    !test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) {
	if (!test_and_set_bit(POLL_ENABLED, &sync_file->fence->flags)) {
		if (fence_add_callback(sync_file->fence, &sync_file->cb,
					   fence_check_cb_func) < 0)
			wake_up_all(&sync_file->wq);