buf->pos;
> + if (set_timestamp)
> + v4l2_get_timestamp(&fileio->b.timestamp);
> ret = vb2_internal_qbuf(q, &fileio->b);
> dprintk(5, "file io: vb2_internal_qbuf result: %d\n", ret);
&g
confusing,
since we don't check TOP/BOTTOM
anyway. I think it would be better to say why ALTERNATE doesn't make
sense instead.
> +*/
> + return -EINVAL;
> + }
>
> vb->state = VB2_BUF_STATE_PREPARING;
> vb->v4l2_buf.timestamp.tv_sec = 0
On Tue, Mar 11, 2014 at 6:20 AM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> q->start_streaming_called is always true, so the WARN_ON check against
> it being false can be dropped.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l
; Divneil --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Best regards,
P
e in addition to the "vb2:"
> prefix. Superfluous prefixes elsewhere in the code have been removed.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 133
> +++
> 1 file changed,
et.
>
> All these issues were found with v4l2-compliance.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 13 -
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/media/v4l2
t; else is able to provide this information with the write() operation.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 6 ++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/media/v4l2-core/videobuf2
On Mon, Apr 7, 2014 at 10:11 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> This is not allowed by the spec and does in fact not make any sense.
> Return -EINVAL if this is the case.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4
@ static size_t __vb2_perform_fileio(struct vb2_queue *q,
> char __user *data, size_
> struct vb2_fileio_buf *buf;
> int ret, index;
>
> - dprintk(3, "file io: mode %s, offset %ld, count %zd, %sblocking\n",
> + dprintk(3, "mode %s, offset %ld, count %zd, %sblocking\n",
> read ? "read" : "write", (long)*ppos, count,
> nonblock ? "non" : "");
>
> @@ -2768,7 +2765,7 @@ static size_t __vb2_perform_fileio(struct vb2_queue *q,
> char __user *data, size_
> */
> if (!q->fileio) {
> ret = __vb2_init_fileio(q, read);
> - dprintk(3, "file io: vb2_init_fileio result: %d\n", ret);
> + dprintk(3, "vb2_init_fileio result: %d\n", ret);
> if (ret)
> return ret;
> }
> @@ -2786,7 +2783,7 @@ static size_t __vb2_perform_fileio(struct vb2_queue *q,
> char __user *data, size_
> fileio->b.type = q->type;
> fileio->b.memory = q->memory;
> ret = vb2_internal_dqbuf(q, &fileio->b, nonblock);
> - dprintk(5, "file io: vb2_dqbuf result: %d\n", ret);
> + dprintk(5, "vb2_dqbuf result: %d\n", ret);
> if (ret)
> return ret;
> fileio->dq_count += 1;
> @@ -2816,14 +2813,14 @@ static size_t __vb2_perform_fileio(struct vb2_queue
> *q, char __user *data, size_
> /*
> * Transfer data to userspace.
> */
> - dprintk(3, "file io: copying %zd bytes - buffer %d, offset %u\n",
> + dprintk(3, "copying %zd bytes - buffer %d, offset %u\n",
> count, index, buf->pos);
> if (read)
> ret = copy_to_user(data, buf->vaddr + buf->pos, count);
> else
> ret = copy_from_user(buf->vaddr + buf->pos, data, count);
> if (ret) {
> - dprintk(3, "file io: error copying data\n");
> + dprintk(3, "error copying data\n");
> return -EFAULT;
> }
>
> @@ -2843,7 +2840,7 @@ static size_t __vb2_perform_fileio(struct vb2_queue *q,
> char __user *data, size_
> */
> if (read && (fileio->flags & VB2_FILEIO_READ_ONCE) &&
> fileio->dq_count == 1) {
> - dprintk(3, "file io: read limit reached\n");
> + dprintk(3, "read limit reached\n");
> return __vb2_cleanup_fileio(q);
> }
>
> @@ -2856,7 +2853,7 @@ static size_t __vb2_perform_fileio(struct vb2_queue *q,
> char __user *data, size_
> fileio->b.index = index;
> fileio->b.bytesused = buf->pos;
> ret = vb2_internal_qbuf(q, &fileio->b);
> - dprintk(5, "file io: vb2_dbuf result: %d\n", ret);
> + dprintk(5, "vb2_dbuf result: %d\n", ret);
> if (ret)
> return ret;
>
> --
> 1.9.1
>
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
ell, that's why the internal
> functions were created...
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 39
>
> include/media/videobuf2-core.h | 17 ++
> 2 fi
On Mon, Apr 7, 2014 at 10:11 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> The bytesused field of struct v4l2_buffer is not used for multiplanar
> formats, so just zero it to prevent it from having some random value.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
Ah, alas, Sakari is right. This should not be needed, since we memcpy
vb->v4l2_buf to this, also overwriting bytesused.
On Thu, Apr 10, 2014 at 10:08 AM, Pawel Osciak wrote:
> On Mon, Apr 7, 2014 at 10:11 PM, Hans Verkuil wrote:
>> From: Hans Verkuil
>>
>> The b
t;
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-core.c | 58
>
> 1 file changed, 29 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/videobuf2-core.c
> b/driver
Hi Kamil,
On Fri, May 9, 2014 at 1:22 AM, Kamil Debski wrote:
> Hi,
>
>> From: Arun Kumar K [mailto:arunkk.sams...@gmail.com] On Behalf Of Arun
>> Kumar K
>> Sent: Friday, March 21, 2014 9:37 AM
>>
>> From: Pawel Osciak
>>
>> Currently, we alloc
M
>> To: linux-media@vger.kernel.org; linux-samsung-...@vger.kernel.org
>> Cc: k.deb...@samsung.com; s.nawro...@samsung.com; posc...@chromium.org;
>> arunkk.sams...@gmail.com
>> Subject: [PATCH] [media] s5p-mfc: Add a control for IVF format for VP8
>> encoder
>>
>>
Hi Kamil,
I like the solution as well. Two suggestions to consider below.
On Fri, May 16, 2014 at 9:03 PM, Kamil Debski wrote:
> MFC versions support a different set of formats, this specially applies
> to the raw YUV formats. This patch changes enum_fmt, so that it only
> reports formats that ar
ueue is not streaming. Buffer underruns during
> streaming are not treated specially anymore and just result in poll()
> blocking until the next event.
>
> Signed-off-by: Laurent Pinchart
> Acked-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videob
Hi Laurent,
Thanks for the patch. Did you test this to work in fileio mode? Looks
like it should, but would like to make sure.
Thanks,
Pawel
On Thu, Jun 5, 2014 at 9:23 PM, Laurent Pinchart
wrote:
> When a fatal error occurs that render the device unusable, the only
> options for a driver to sign
Hi Philipp,
On Thu, Jan 22, 2015 at 11:58 PM, Philipp Zabel wrote:
> Hi,
>
> Are you planning to pour the workshop's codec API document into a V4L2
> documentation patch?
Yes, definitely, I am a bit delayed, but will do this eventually, this
is in progress. Sorry for the delay. Please feel free
kfree(buf);
> }
>
> @@ -354,6 +373,27 @@ const struct vb2_mem_ops vb2_dma_sg_memops = {
> };
> EXPORT_SYMBOL_GPL(vb2_dma_sg_memops);
>
> +void *vb2_dma_sg_init_ctx(struct device *dev)
> +{
> + struct vb2_dma_sg_conf *conf;
> +
> + conf = kzalloc(sizeof(*conf), GF
ffer is fine.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
or the dmabuf with the user device */
I'd remove this comment, it's not that correct either.
> + dba = dma_buf_attach(dbuf, buf->dev);
> + if (IS_ERR(dba)) {
> + pr_err("failed to attach dmabuf\n");
> + kfree(buf);
> +
On Sat, Nov 8, 2014 at 7:20 PM, Pawel Osciak wrote:
> Hi Hans,
> Thank you for the patch.
>
> On Fri, Nov 7, 2014 at 5:50 PM, Hans Verkuil wrote:
>> From: Hans Verkuil
>>
>> Add support for dmabuf to vb2-dma-sg.
>
> importing dmabuf into videobuf2-dma-sg.
&g
_direction dir)
> +{
> + /* nothing to be done here */
> +}
> +
> +static void vb2_dma_sg_dmabuf_ops_release(struct dma_buf *dbuf)
> +{
> + /* drop reference obtained in vb2_dma_sg_get_dmabuf */
> + vb2_dma_sg_put(dbuf->priv);
> +}
> +
> +static void *vb2_dma_sg_dmabuf_ops_kmap(struct dma_buf *dbuf, unsigned long
> pgnum)
> +{
> + struct vb2_dma_sg_buf *buf = dbuf->priv;
> +
> + return buf->vaddr + pgnum * PAGE_SIZE;
As opposed to contig, which assigns vaddr on alloc(), vaddr can very
well be NULL here for sg.
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
he dma_dir value anyway it is now replaced by
> the correct dma_dir value which is unambiguous.
Do we need the first patch adding write then? Maybe we could squash
somehow and redo the series please?
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe
alue anyway it is now replaced by
> the correct dma_dir value which is unambiguous.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to ma
On Mon, Nov 10, 2014 at 8:49 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> This is needed for the next patch where the dma-sg alloc memop needs
> to know the dma_dir.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
--
Best regards,
Pawel Osciak
--
To unsubscr
f *conf;
> +
> + conf = kzalloc(sizeof(*conf), GFP_KERNEL);
> + if (!conf)
> + return ERR_PTR(-ENOMEM);
> +
> + conf->dev = dev;
> +
> + return conf;
> +}
> +EXPORT_SYMBOL_GPL(vb2_dma_sg_init_ctx);
> +
> +void vb2_dma_sg_cleanup_
On Mon, Nov 10, 2014 at 8:49 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Add support for importing dmabuf to videobuf2-dma-sg.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "uns
On Mon, Nov 10, 2014 at 8:49 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Add DMABUF export support to vb2-dma-sg.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linu
*dbuf;
> +
> + /* DMABUF related */
> + struct dma_buf_attachment *db_attach;
Unused?
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Nov 10, 2014 at 8:49 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Signed-off-by: Hans Verkuil
Reviewed-by: Pawel Osciak
> ---
> drivers/media/platform/vim2m.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/vim2m.c b/driver
On Mon, Nov 10, 2014 at 8:49 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Now that vb2 supports DMABUF export for dma-sg and vmalloc memory
> modes, we can enable the vb2_expbuf support in vivid.
>
> Signed-off-by: Hans Verkuil
Reviewed-by: Pawel Osciak
> ---
>
direction */
> - ret = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents, dma_dir);
> + /* Mapping to the client with new direction */
> + ret = dma_map_sg(db_attach->dev, sgt->sgl, sgt->orig_nents,
> +dma_dir);
Do we need this
On Tue, Nov 18, 2014 at 9:51 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Don't try to free a pointer containing an ERR_PTR().
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line &quo
On Tue, Nov 18, 2014 at 9:51 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Require that dma-sg also uses an allocation context. This is in preparation
> for adding prepare/finish memops to sync the memory between DMA and CPU.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel
On Tue, Nov 18, 2014 at 9:51 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Add support for DMABUF exporting to the vb2-vmalloc implementation.
>
> All memory models now have support for both importing and exporting of
> DMABUFs.
>
> Signed-off-by: Hans Verkuil
On Tue, Nov 18, 2014 at 9:50 PM, Hans Verkuil wrote:
> From: Hans Verkuil
>
> Document that drivers can access/modify the buffer contents in buf_prepare
> and buf_finish. That was not clearly stated before.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
>
e reverse is true for dma_unmap_sg, buf_finish and the finish
> memop.
>
> To prevent unnecessary syncs we ask dma_(un)map_sg to skip the
> sync.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-dma-contig.c | 24 +++
Hi,
On Tue, Apr 7, 2015 at 11:44 PM, Kamil Debski wrote:
> Hi,
>
> From: Hans Verkuil [mailto:hverk...@xs4all.nl]
> Sent: Tuesday, March 17, 2015 5:09 PM
>>
>> On 03/17/2015 11:46 AM, Philipp Zabel wrote:
>> > Hi,
>> >
>> > Am Freitag, den 06.03.2015, 11:18 +0100 schrieb Philipp Zabel:
>> >> At t
Hi,
Thanks for working on this!
On Wed, Mar 25, 2015 at 2:46 AM, Philipp Zabel wrote:
> From: Peter Seiderer
>
> This v4l2_buffer flag can be used by drivers to mark a capture buffer
> as the last generated buffer, for example after a V4L2_DEC_CMD_STOP
> command was issued.
> The DocBook is upda
Hi,
On Wed, Mar 25, 2015 at 2:46 AM, Philipp Zabel wrote:
> If the last buffer was dequeued from a capture queue, let poll return
> immediately and let DQBUF return -EPIPE to signal there will no more
> buffers to dequeue until STREAMOFF.
> The driver signals the last buffer by setting the V4L2_B
obuf2-core.h header that explains what drivers are supposed
> to do in these situations. That should help point developers in the
> right direction if they see these warnings.
>
> Signed-off-by: Hans Verkuil
Acked-by: Pawel Osciak
> ---
> drivers/media/v4l2-core/videobuf2-core
On Thu, Aug 7, 2014 at 12:10 AM, Vincent Palatin wrote:
>
> On Sun, Aug 3, 2014 at 10:52 PM, Pawel Osciak wrote:
> > This looks good to me in general (with one comment below). I don't think we
> > can easily implement current V4L2 pan and tilt controls that are for
>
sers, mem_priv) >= 1)
> return true;
> }
> return false;
> --
> 1.7.9.5
--
Thanks,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Philipp,
On Fri, Aug 22, 2014 at 10:09 PM, Philipp Zabel wrote:
> - Helping userspace to use mem2mem devices; clarification of
> encoder/decoder handling, clarification of format/size setting
> in case of dependencies between input and output formats,
> possibly broad categorisation of m
On Sat, Aug 16, 2014 at 4:08 AM, Vincent Palatin wrote:
>
> The V4L2_CID_PAN_SPEED and V4L2_CID_TILT_SPEED controls allow to move the
> camera by setting its rotation speed around its axis.
>
> Signed-off-by: Vincent Palatin
Reviewed-by: Pawel Osciak
>
> ---
> Changes
userspace using the VIDIOC_S_CTRL ioctl.
> Verified that it can pan and tilt at the same time in both directions.
>
> Signed-off-by: Vincent Palatin
Reviewed-by: Pawel Osciak
> Change-Id: I7b70b228e5c0126683f5f0be34ffd2807f5783dc
> ---
> driv
On Thu, Sep 4, 2014 at 4:40 AM, Vincent Palatin wrote:
> Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC
> CT_PANTILT_RELATIVE_CONTROL terminal control request.
>
> Tested by plugging a Logitech ConferenceCam C3000e USB camera
> and controlling pan/tilt from the userspace using
gfp_t gfp_flags)
I agree with Laurent that "write" is confusing, this could be a
direction flag, but the dma direction allows bidirectional, which we
would not be using. So I would personally prefer a binary flag or
enum. So perhaps we should keep this, only documenting it please.
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
a buffer, while prepare and finish should only sync.
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
/
> +
> +static int vb2_dma_sg_map_dmabuf(void *mem_priv)
> +{
> + struct vb2_dma_sg_buf *buf = mem_priv;
> + struct sg_table *sgt;
> +
> + if (WARN_ON(!buf->db_attach)) {
> + pr_err("trying to pin a non attached buffer\n");
s/a non attached/a
e.
Perhaps I'm missing something, but couldn't we just dma_map_sg on
allocation/get in dma-sg and unmap on put?
--
Best regards,
Pawel Osciak
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
Mor
t device *alloc_ctx;
>
> That simplifies the code quite a bit and I don't see and need for anything
> else. The last option would make it impossible to have different allocation
> contexts for different planes, but that might be something that Samsumg needs.
>
&
301 - 354 of 354 matches
Mail list logo