Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)"
Subsystems (2)
PATCH v2 1/1 Revert "dma-buf/sync-file: Avoid enable fence signaling if poll(.timeout=0)"
From: Gustavo Padovan <[email protected]>
This reverts commit ecebca79f6976ddaddfd054d699272515869ea28.
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.
--- drivers/dma-buf/sync_file.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/dma-buf/sync_file.c +1 -2
@@ -308,8 +308,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 (dma_fence_add_callback (sync_file->fence, &sync_file->cb, fence_check_cb_func) <0 )wake_up_all (&sync_file->wq);
Signature · 6 lines
2.5.5 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Gustavo Padovan
From: Gustavo Padovan <[email protected]>
This reverts commit
ecebca79f6976ddaddfd054d699272515869ea28.
Quoted 8 lines
Do not enable fence callback on
poll()when usingfence_arraycauses thefence_arrayto 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 <[email protected]>Signed-off-by Gustavo Padovan <[email protected]>
I have some patches to use a bit on fence_array->flags to indicate where we can use this shortcut. I'm hoping someone has a better idea. -Chris
Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
AppliedQuoted 8 lines · Chris Wilson
Quoted 7 lines · Gustavo Padovan
From: Gustavo Padovan <[email protected]>
This reverts commit
ecebca79f6976ddaddfd054d699272515869ea28.Do not enable fence callback on
poll()when usingfence_arraycauses thefence_arrayto not signal.
Quoted 7 lines
Quoted 5 lines
For now we will revert the change and enable signaling everytime time poll is called with timeout=0 as well.
Cc Chris Wilson <[email protected]>Signed-off-by Gustavo Padovan <[email protected]>Acked-by Chris Wilson <[email protected]>
Applied to drm-misc.
Quoted 2 lines
I have some patches to use a bit on
fence_array->flagsto indicate where we can use this shortcut. I'm hoping someone has a better idea.
Fundamentally this is a property of how the fence is implemented. A flag indicating that this fence will eventually signal, even when enable_signalling isn't called seems like a perfectly ok approach.
We might want to spell out the different expectations clearly though, i.e. if you block on a fence you must still call ->enable_signalling for prompt signalling (and maybe it's needed to handle blocking waits or whatever). -Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel