[PATCH] dma-buf/sync_file: enable signaling even with poll(.timeout=0)

Daniel Vetter daniel at ffwll.ch
Thu Nov 17 07:41:22 UTC 2016


On Thu, Nov 17, 2016 at 11:57:30AM +0900, Gustavo Padovan wrote:
> From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> 
> This reverts commit ecebca79f6976ddaddfd054d699272515869ea28.

When doing a revert please don't change the subject of the revert, at
least if you didn't change anything in the resulting diff. That way
reverts jump out a lot more, which I think is useful.
-Daniel
> 
> 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 at chris-wilson.co.uk>
> Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> ---
>  drivers/dma-buf/sync_file.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
> index 69d8ef9..6d802f2 100644
> --- a/drivers/dma-buf/sync_file.c
> +++ b/drivers/dma-buf/sync_file.c
> @@ -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);
> -- 
> 2.5.5
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list