All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Stanislawski <t.stanislaws@samsung.com>
To: Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org
Cc: pawel@osciak.com, sakari.ailus@iki.fi, m.szyprowski@samsung.com,
	s.nawrocki@samsung.com, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [REVIEWv3 PATCH 09/13] vb2: add vb2_fileio_is_active and check it more often
Date: Fri, 11 Apr 2014 15:05:24 +0200	[thread overview]
Message-ID: <5347E894.5010401@samsung.com> (raw)
In-Reply-To: <1397203879-37443-10-git-send-email-hverkuil@xs4all.nl>

Hi Hans,

On 04/11/2014 10:11 AM, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> Added a vb2_fileio_is_active inline function that returns true if fileio
> is in progress. Check for this too in mmap() (you don't want apps mmap()ing
> buffers used by fileio) and expbuf() (same reason).

Why? I expect that there is no sane use case for using
mmap() and expbuf in read/write mode but why forbidding this.

Could you provide a reason?

Regard,
Tomasz Stanislawski

> 
> In addition drivers should be able to check for this in queue_setup() to
> return an error if an attempt is made to read() or write() with
> V4L2_FIELD_ALTERNATE being configured. This is illegal (there is no way
> to pass the TOP/BOTTOM information around using file I/O).
> 
> However, in order to be able to check for this the init_fileio function
> needs to set q->fileio early on, before the buffers are allocated. So switch
> to using internal functions (__reqbufs, vb2_internal_qbuf and
> vb2_internal_streamon) to skip the fileio check. Well, that's why the internal
> functions were created...
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Acked-by: Pawel Osciak <pawel@osciak.com>
> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>


  reply	other threads:[~2014-04-11 13:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11  8:11 [REVIEWv3 PATCH 00/13] vb2: various small fixes/improvements Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 01/13] vb2: stop_streaming should return void Hans Verkuil
2014-04-16 21:38   ` Mauro Carvalho Chehab
2014-04-17  2:26     ` Mauro Carvalho Chehab
2014-04-11  8:11 ` [REVIEWv3 PATCH 02/13] vb2: fix handling of data_offset and v4l2_plane.reserved[] Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 03/13] vb2: if bytesused is 0, then fill with output buffer length Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 04/13] vb2: use correct prefix Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 05/13] vb2: move __qbuf_mmap before __qbuf_userptr Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 06/13] vb2: set timestamp when using write() Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 07/13] vb2: reject output buffers with V4L2_FIELD_ALTERNATE Hans Verkuil
2014-04-11  8:42   ` Archit Taneja
2014-04-11  8:58     ` Hans Verkuil
2014-04-11  9:02       ` Archit Taneja
2014-04-11  8:11 ` [REVIEWv3 PATCH 08/13] vb2: simplify a confusing condition Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 09/13] vb2: add vb2_fileio_is_active and check it more often Hans Verkuil
2014-04-11 13:05   ` Tomasz Stanislawski [this message]
2014-04-11 13:22     ` Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 10/13] vb2: allow read/write as long as the format is single planar Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 11/13] vb2: start messages with a lower-case for consistency Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 12/13] DocBook media: update bytesused field description Hans Verkuil
2014-04-11  8:11 ` [REVIEWv3 PATCH 13/13] v4l2-pci-skeleton.c: fix alternate field handling Hans Verkuil
2014-04-11  9:39 ` [REVIEWv3 PATCH 00/13] vb2: various small fixes/improvements Sakari Ailus

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=5347E894.5010401@samsung.com \
    --to=t.stanislaws@samsung.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=pawel@osciak.com \
    --cc=s.nawrocki@samsung.com \
    --cc=sakari.ailus@iki.fi \
    /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.