All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: linux-media@vger.kernel.org, mchehab@redhat.com,
	hans.verkuil@cisco.com, pawel@osciak.com,
	kyungmin.park@samsung.com
Subject: Re: [RFC][PATCH 1/2] media: vb2: return for polling if a buffer is available
Date: Thu, 11 Apr 2013 13:15:26 +0200	[thread overview]
Message-ID: <51669B4E.9080701@samsung.com> (raw)
In-Reply-To: <1364798447-32224-2-git-send-email-sw0312.kim@samsung.com>

Hello,

On 4/1/2013 8:40 AM, Seung-Woo Kim wrote:
> The vb2_poll() does not need to wait next vb_buffer_done() if there is already
> a buffer in done_list of queue, but current vb2_poll() always waits.
> So done_list is checked before calling poll_wait().
>
> Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>

Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>

> ---
>   drivers/media/v4l2-core/videobuf2-core.c |    3 ++-
>   1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
> index db1235d..e941d2b 100644
> --- a/drivers/media/v4l2-core/videobuf2-core.c
> +++ b/drivers/media/v4l2-core/videobuf2-core.c
> @@ -1996,7 +1996,8 @@ unsigned int vb2_poll(struct vb2_queue *q, struct file *file, poll_table *wait)
>   	if (list_empty(&q->queued_list))
>   		return res | POLLERR;
>   
> -	poll_wait(file, &q->done_wq, wait);
> +	if (list_empty(&q->done_list))
> +		poll_wait(file, &q->done_wq, wait);
>   
>   	/*
>   	 * Take first buffer available for dequeuing.

Best regards
-- 
Marek Szyprowski
Samsung Poland R&D Center


  reply	other threads:[~2013-04-11 11:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-01  6:40 [RFC][PATCH 0/2] media: fix polling not to wait if a buffer is available Seung-Woo Kim
2013-04-01  6:40 ` [RFC][PATCH 1/2] media: vb2: return for polling " Seung-Woo Kim
2013-04-11 11:15   ` Marek Szyprowski [this message]
2013-04-01  6:40 ` [RFC][PATCH 2/2] media: v4l2-mem2mem: " Seung-Woo Kim
2013-05-07 13:43   ` Marek Szyprowski
2013-05-07  5:28 ` [RFC][PATCH 0/2] media: fix polling not to wait " 김승우

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51669B4E.9080701@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=hans.verkuil@cisco.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@redhat.com \
    --cc=pawel@osciak.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.