[PATCH 1/4] media: v4l: Simplify dev_debug flags

2019-02-18 Thread Ezequiel Garcia
former is needed. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-dev.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index d7528f82a66a..34e4958663bf 100644 --- a/drivers/media

[PATCH 4/4] media: v4l: ctrls: Add debug messages

2019-02-18 Thread Ezequiel Garcia
Currently, the v4l2 control code is a bit silent on errors. To ease debugging of the control logic, add debug messages on (hopefully) most of the error paths. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-ctrls.c | 63 +++- include/media/v4l2-ioctl.h

[PATCH 3/4] media: v4l: Add a module parameter to control global debugging

2019-02-18 Thread Ezequiel Garcia
to the subsystem, since other v4l2 modules expose the same parameter. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-dev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index

[PATCH 2/4] media: v4l: Improve debug dprintk macro

2019-02-18 Thread Ezequiel Garcia
Instead of checking the dev_debug flags before each dprintk call, make the macro smarter by passing the parameters. This makes the code simpler and will allow to add more debug logic. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-dev.c | 38 +- 1

Re: [PATCH 01/10] media: Introduce helpers to fill pixel format structs

2019-02-21 Thread Ezequiel Garcia
On Wed, 2019-02-20 at 09:39 +0100, Hans Verkuil wrote: > On 2/20/19 7:53 AM, Tomasz Figa wrote: > > On Thu, Feb 7, 2019 at 1:36 AM Hans Verkuil wrote: > > > On 2/6/19 5:22 PM, Ezequiel Garcia wrote: > > > > On Wed, 2019-02-06 at 11:43 +0100, Hans Verkui

Re: [PATCH v4 1/2] media: uapi: Add H264 low-level decoder API compound controls.

2019-02-22 Thread Ezequiel Garcia
On Fri, 2019-02-22 at 16:46 +0900, Tomasz Figa wrote: > Hi Maxime, > > On Wed, Feb 20, 2019 at 11:17 PM Maxime Ripard > wrote: > > From: Pawel Osciak > > > > Stateless video codecs will require both the H264 metadata and slices in > > order to be able to decode frames. > > > > This introduces

Re: [PATCH 4/4] media: v4l: ctrls: Add debug messages

2019-02-25 Thread Ezequiel Garcia
On Mon, 2019-02-18 at 17:15 -0300, Ezequiel Garcia wrote: > Currently, the v4l2 control code is a bit silent on errors. > To ease debugging of the control logic, add debug messages > on (hopefully) most of the error paths. > I'm thinking some of these could receive a struct vid

Re: urb issue with an spca561 webcam

2019-02-27 Thread Ezequiel Garcia
+linux-media On Fri, 2018-11-23 at 23:37 +, softwarebugs wrote: > After each time I click to stop capturing, the below messages are logged. > > spca561 : urb status: -2 > gspca_main: usb_submit_urb() ret -1 > spca561 : urb status: -2 > gspca_main: usb_submit_urb() ret -1 > spca561 : urb statu

[PATCH] gspca: Kill URBs on USB device disconnect

2019-02-27 Thread Ezequiel Garcia
rrupt storm coming from the URB completion handler. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/gspca/gspca.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index 9448ac0b8bc9..0510c20273aa 100644

[PATCH v2 4/4] media: v4l: ctrls: Add debug messages

2019-02-27 Thread Ezequiel Garcia
are forced to use the global debug parameter only. Add a warning in case the user enables control debugging at the per-device dev_debug level. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-ctrls.c | 93 +-- drivers/media/v4l2-core/v4l2-dev.c| 2

[PATCH v2 3/4] media: v4l: Add a module parameter to control global debugging

2019-02-27 Thread Ezequiel Garcia
to the subsystem, since other v4l2 modules expose the same parameter. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-dev.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index

[PATCH v2 2/4] media: v4l: Improve debug dprintk macro

2019-02-27 Thread Ezequiel Garcia
Instead of checking the dev_debug flags before each dprintk call, make the macro smarter by passing the parameters. This makes the code simpler and will allow to add more debug logic. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-dev.c | 35 ++ 1

[PATCH v2 1/4] media: v4l: Simplify dev_debug flags

2019-02-27 Thread Ezequiel Garcia
former is needed. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-dev.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c index d7528f82a66a..34e4958663bf 100644 --- a/drivers/media

[PATCH v2 0/4] Add debug messages to v4l2-ctrls

2019-02-27 Thread Ezequiel Garcia
odule parameter, and a new debug level, which enables v4l2-ctrl debugging. Having this is quite useful when bringing-up stateless codecs, using the Request API. Ezequiel Garcia (4): media: v4l: Simplify dev_debug flags media: v4l: Improve debug dprintk macro media: v4l: Add a module paramet

[PATCH v2] gspca: Kill URBs on USB device disconnect

2019-02-28 Thread Ezequiel Garcia
rrupt storm coming from the URB completion handler. Signed-off-by: Ezequiel Garcia --- v2: * Also kill the int URB. drivers/media/usb/gspca/gspca.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c index 9448ac0

[DONTCOMMIT/WIP] gspca: Check device presence before accessing hardware

2019-02-28 Thread Ezequiel Garcia
easing when the USB device is disconnected. TODO: Check what's the deal with the konica device, which is allocating URB memory in sd_desc.start. This seems wrong. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/gspca/gspca.c | 11 ++- drivers/media/usb/gspca/gspca.h | 6 +++---

Re: [PATCH] Remove deductively redundant NULL pointer checks

2019-03-03 Thread Ezequiel Garcia
On Tue, 2019-02-26 at 17:43 -0700, Shaobo He wrote: > The fixes included in this commit essentially removes NULL pointer > checks on the return values of function `get_queue_ctx` as well as > `v4l2_m2m_get_vq` defined in file v4l2-mem2mem.c. > > Function `get_queue_ctx` is very unlikely to return

Re: [PATCH v4 1/2] media: uapi: Add H264 low-level decoder API compound controls.

2019-03-04 Thread Ezequiel Garcia
On Wed, 2019-02-20 at 15:17 +0100, Maxime Ripard wrote: > From: Pawel Osciak > > Stateless video codecs will require both the H264 metadata and slices in > order to be able to decode frames. > > This introduces the definitions for a new pixel format for H264 slices that > have been parsed, as we

[PATCH v2 00/11] Add MPEG-2 decoding to Rockchip VPU

2019-03-04 Thread Ezequiel Garcia
0 on the MPEG-2 decoder. * Addressed comments from Hans and Tomasz on the pixel format helpers. Ezequiel Garcia (10): rockchip/vpu: Rename pixel format helpers media: Introduce helpers to fill pixel format structs rockchip/vpu: Use pixel format helpers rockchip/vpu: Use

[PATCH v2 01/11] rockchip/vpu: Rename pixel format helpers

2019-03-04 Thread Ezequiel Garcia
The rockchip VPU driver uses generic names for its pixel format helpers. We want to use the same names for generic versions of these helpers, so rename the rockchip ones. The driver will be switched to the generic helpers later. Signed-off-by: Ezequiel Garcia --- .../staging/media/rockchip/vpu

[PATCH v2 07/11] rockchip/vpu: Open-code media controller register

2019-03-04 Thread Ezequiel Garcia
In preparation to support decoders, using a single memory-to-memory device, we need to roll our own media controller entities registration. Signed-off-by: Ezequiel Garcia --- .../staging/media/rockchip/vpu/rockchip_vpu.h | 35 .../media/rockchip/vpu/rockchip_vpu_drv.c | 181

[PATCH v2 05/11] rockchip/vpu: Cleanup macroblock alignment

2019-03-04 Thread Ezequiel Garcia
We need to make the macrobock alignment generic, in order to support multiple codecs. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rockchip_vpu_enc.c | 20 --- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu

[PATCH v2 02/11] media: Introduce helpers to fill pixel format structs

2019-03-04 Thread Ezequiel Garcia
Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp, to be used by drivers to calculate plane sizes and bytes per lines. Note that driver-specific padding and alignment are not taken into account, and must be done by drivers using this API. Signed-off-by: Ezequiel Garcia

[PATCH v2 03/11] rockchip/vpu: Use pixel format helpers

2019-03-04 Thread Ezequiel Garcia
Now that we've introduced the pixel format helpers, use them in vpu driver, and get rid of the internal helpers. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rockchip_vpu_enc.c | 91 +-- 1 file changed, 2 insertions(+), 89 deletions(-) diff --git a/dr

[PATCH v2 06/11] rockchip/vpu: Cleanup JPEG bounce buffer management

2019-03-04 Thread Ezequiel Garcia
In order to make the code more generic, introduce a pair of start/stop codec operations, and use them to allocate and release the JPEG bounce buffer. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rk3288_vpu_hw.c| 2 ++ .../rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 4

[PATCH v2 04/11] rockchip/vpu: Use v4l2_m2m_buf_copy_metadata

2019-03-04 Thread Ezequiel Garcia
Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu

[PATCH v2 08/11] rockchip/vpu: Support the Request API

2019-03-04 Thread Ezequiel Garcia
Introduce support for the Request API. Although the JPEG encoder does not mandate using the Request API, it's perfectly possible to use it, if the application wants to. In addition, add helpers that will be used by video decoders. Signed-off-by: Ezequiel Garcia --- .../rockchi

[PATCH v2 10/11] rockchip/vpu: Add support for non-standard controls

2019-03-04 Thread Ezequiel Garcia
Rework the way controls are registered by the driver, so it can support non-standard controls, such as those used by stateless codecs. Signed-off-by: Ezequiel Garcia --- .../media/rockchip/vpu/rk3288_vpu_hw.c| 2 +- .../media/rockchip/vpu/rk3399_vpu_hw.c| 2 +- .../staging

[PATCH v2 11/11] rockchip/vpu: Add support for MPEG-2 decoding

2019-03-04 Thread Ezequiel Garcia
From: Jonas Karlman Add MPEG-2 decoding, only on RK3399. Other SoCs and support for other codecs will be added in the future. Signed-off-by: Jonas Karlman Signed-off-by: Ezequiel Garcia --- drivers/staging/media/rockchip/vpu/Makefile | 4 +- .../media/rockchip/vpu/rk3399_vpu_hw.c

[PATCH v2 09/11] rockchip/vpu: Add decoder boilerplate

2019-03-04 Thread Ezequiel Garcia
This commit adds the needed boilerplate code to support the VPU in decoding operation. Two v4l2 interfaces are exposed, one for encoding and one for decoding, but a single m2m device is shared by them, so jobs are properly serialized. Signed-off-by: Ezequiel Garcia --- drivers/staging/media

Re: [PATCH v4 1/2] media: uapi: Add H264 low-level decoder API compound controls.

2019-03-05 Thread Ezequiel Garcia
On Tue, 2019-03-05 at 12:16 +0100, Maxime Ripard wrote: > On Fri, Feb 22, 2019 at 04:46:17PM +0900, Tomasz Figa wrote: > > Hi Maxime, > > > > On Wed, Feb 20, 2019 at 11:17 PM Maxime Ripard > > wrote: > > > From: Pawel Osciak > > > > > > Stateless video codecs will require both the H264 metadata

Re: [PATCH v2 02/11] media: Introduce helpers to fill pixel format structs

2019-03-22 Thread Ezequiel Garcia
On Tue, 2019-03-12 at 09:29 +0100, Hans Verkuil wrote: > On 3/4/19 8:25 PM, Ezequiel Garcia wrote: > > Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp, > > to be used by drivers to calculate plane sizes and bytes per lines. > > > > Note that driver-spe

Re: [PATCH v2] gspca: Kill URBs on USB device disconnect

2019-03-24 Thread Ezequiel Garcia
On Thu, 2019-02-28 at 12:28 -0300, Ezequiel Garcia wrote: > In order to prevent ISOC URBs from being infinitely resubmitted, > the driver's USB disconnect handler must kill all the in-flight URBs. > > While here, change the URB packet status message to a debug level, > t

[PATCH] media: vb2: Minor function naming fix

2019-03-28 Thread Ezequiel Garcia
Minor fix for helper function and comment, s/v4l2_vb2_buffer/vb2_v4l2_buffer. Signed-off-by: Ezequiel Garcia --- drivers/media/common/videobuf2/videobuf2-v4l2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/common/videobuf2/videobuf2-v4l2.c b/drivers

[PATCH v3 2/2] media: Introduce helpers to fill pixel format structs

2019-03-28 Thread Ezequiel Garcia
Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp, to be used by drivers to calculate plane sizes and bytes per lines. Note that driver-specific padding and alignment are not taken into account, and must be done by drivers using this API. Signed-off-by: Ezequiel Garcia

[PATCH v3 1/2] rockchip/vpu: Rename pixel format helpers

2019-03-28 Thread Ezequiel Garcia
The rockchip VPU driver uses generic names for its pixel format helpers. We want to use the same names for generic versions of these helpers, so rename the rockchip ones. The driver will be switched to the generic helpers later. Signed-off-by: Ezequiel Garcia --- .../staging/media/rockchip/vpu

[PATCH 0/2] media: Introduce pixel format helpers

2019-03-28 Thread Ezequiel Garcia
Thanks! [1] https://patchwork.kernel.org/cover/10838327/ [2] https://patchwork.kernel.org/patch/10851639/ Ezequiel Garcia (2): rockchip/vpu: Rename pixel format helpers media: Introduce helpers to fill pixel format structs drivers/media/v4l2-core/v4l2-common.c | 164 ++ ..

Re: [PATCH v2 06/11] rockchip/vpu: Cleanup JPEG bounce buffer management

2019-03-28 Thread Ezequiel Garcia
On Thu, 2019-03-28 at 15:15 +0900, Tomasz Figa wrote: > Hi Ezequiel, > > On Tue, Mar 5, 2019 at 4:26 AM Ezequiel Garcia wrote: > > In order to make the code more generic, introduce a pair of start/stop > > codec operations, and use them to allocate and release the J

Re: [PATCH v2 08/11] rockchip/vpu: Support the Request API

2019-03-28 Thread Ezequiel Garcia
On Thu, 2019-03-28 at 16:20 +0900, Tomasz Figa wrote: > On Tue, Mar 5, 2019 at 4:27 AM Ezequiel Garcia wrote: > > Introduce support for the Request API. Although the JPEG encoder > > does not mandate using the Request API, it's perfectly possible to > > use it, i

Re: [PATCH v2 09/11] rockchip/vpu: Add decoder boilerplate

2019-03-28 Thread Ezequiel Garcia
Hey Tomasz, Thanks for taking the time to review this carefully! On Thu, 2019-03-28 at 18:57 +0900, Tomasz Figa wrote: > On Tue, Mar 5, 2019 at 4:27 AM Ezequiel Garcia wrote: > [snip] > > +static const struct rockchip_vpu_fmt * > > +rockchip_vpu_find_format(struct rockchip

Re: [PATCH v2 07/11] rockchip/vpu: Open-code media controller register

2019-03-28 Thread Ezequiel Garcia
On Thu, 2019-03-28 at 16:11 +0900, Tomasz Figa wrote: > On Tue, Mar 5, 2019 at 4:27 AM Ezequiel Garcia wrote: > > In preparation to support decoders, using a single memory-to-memory > > device, we need to roll our own media controller entities registration. > > > > Sig

Re: [PATCH v3 2/2] media: Introduce helpers to fill pixel format structs

2019-04-01 Thread Ezequiel Garcia
On Thu, 2019-03-28 at 21:05 +0100, Jacopo Mondi wrote: > Hi Ezequiel, >this is very nice, thank you! > Hi Jacopo, > On Thu, Mar 28, 2019 at 03:07:04PM -0300, Ezequiel Garcia wrote: > > Add two new API helpers, v4l2_fill_pixfmt and v4l2_fill_pixfmt_mp, > > to be used

Re: [PATCH v2 10/11] rockchip/vpu: Add support for non-standard controls

2019-04-12 Thread Ezequiel Garcia
On Mon, 2019-04-01 at 12:14 +0900, Tomasz Figa wrote: > On Tue, Mar 5, 2019 at 4:27 AM Ezequiel Garcia wrote: > > Rework the way controls are registered by the driver, > > so it can support non-standard controls, such as those > > used by stateless codecs. > > > &g

[PATCH 2/5] media: coda: Remove unbalanced and unneeded mutex unlock

2019-04-25 Thread Ezequiel Garcia
The mutex unlock in the threaded interrupt handler is not paired with any mutex lock. Remove it. This bug has been here for a really long time, so it applies to any stable repo. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/coda/coda-bit.c | 1 - 1 file changed, 1 deletion(-) diff

[PATCH 0/5] Assorted CODA fixes

2019-04-25 Thread Ezequiel Garcia
e it's so small and we have some indications that it's actually the right thing to do. Ezequiel Garcia (5): media: coda: Print a nicer device registered message media: coda: Remove unbalanced and unneeded mutex unlock media: coda: Replace the threaded interrupt with a hard interr

[PATCH 1/5] media: coda: Print a nicer device registered message

2019-04-25 Thread Ezequiel Garcia
.vpu: decoder registered as /dev/video5 Signed-off-by: Ezequiel Garcia --- drivers/media/platform/coda/coda-common.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index

[PATCH 3/5] media: coda: Replace the threaded interrupt with a hard interrupt

2019-04-25 Thread Ezequiel Garcia
regular hard interrupt context. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 1f53ca4effd2

[PATCH 5/5] media: coda: Clear the interrupt reason

2019-04-25 Thread Ezequiel Garcia
the CODA hardware, and should be cleared by the host. While the CODA versions that are currently supported by this driver don't seem to need this change, it's a really small change, so it seems a wise thing to do to avoid hitting some rare race-condition in the hardware. Signed-off-by

[PATCH 4/5] media: coda: Remove pic_run_work worker

2019-04-25 Thread Ezequiel Garcia
ff-by: Ezequiel Garcia --- drivers/media/platform/coda/coda-common.c | 9 - drivers/media/platform/coda/coda.h| 1 - 2 files changed, 10 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 617d4547ec82..e0227593a649 1

Re: [PATCH 13/13] media: coda: fix unset field and fail on invalid field in buf_prepare

2019-04-25 Thread Ezequiel Garcia
On Fri, 2019-04-12 at 17:51 +0200, Philipp Zabel wrote: > v4l2-compliance likes to queue a buffer with field set to V4L2_FIELD_ANY > and expects it to be returned corrected to a valid field. > > Follow vicodec in handling this in the buf_prepare callback. > > Signed-off-by: Philipp Zabel > --- >

Re: [PATCH v8 09/13] [media] vb2: add in-fence support to QBUF

2018-04-25 Thread Ezequiel Garcia
On 14 March 2018 at 12:55, Hans Verkuil wrote: > On 03/09/2018 09:49 AM, Gustavo Padovan wrote: >> From: Gustavo Padovan >> >> Receive in-fence from userspace and add support for waiting on them >> before queueing the buffer to the driver. Buffers can't be queued to the >> driver before its fence

Re: [PATCH v8 10/13] [media] vb2: add out-fence support to QBUF

2018-04-30 Thread Ezequiel Garcia
Hi guys, I've a couple questions. On 9 March 2018 at 14:49, Gustavo Padovan wrote: > From: Gustavo Padovan > > If V4L2_BUF_FLAG_OUT_FENCE flag is present on the QBUF call we create > an out_fence and send its fd to userspace on the fence_fd field as a > return arg for the QBUF call. > > The fen

[PATCH] dma-buf: Remove unneeded stubs around sync_debug interfaces

2018-05-04 Thread Ezequiel Garcia
The sync_debug.h header is internal, and only used by sw_sync.c. Therefore, SW_SYNC is always defined and there is no need for the stubs. Remove them and make the code simpler. Signed-off-by: Ezequiel Garcia --- drivers/dma-buf/sync_debug.h | 10 -- 1 file changed, 10 deletions(-) diff

[PATCH v9 06/15] v4l: add unordered flag to format description ioctl

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan For explicit synchronization it important for userspace to know if the format being used by the driver can deliver the buffers back to userspace in the same order they were queued with QBUF. Ordered streams fits nicely in a pipeline with DRM for example, where ordered buffe

[PATCH v9 08/15] cobalt: set queue as unordered

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan The cobalt driver may reorder the capture buffers so we need to report it as such. v3: set unordered as a property v2: use vb2_ops_set_unordered() helper Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- drivers/media/pci/cobalt/cobalt-v4l2.c | 1 + 1

[PATCH v9 14/15] v4l: Add V4L2_CAP_FENCES to drivers

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan Drivers that use videobuf2 are capable of using fences and should report that to userspace. v9: Add in the core. Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-ioctl.c | 8 include/media/v4l2-fh.h

[PATCH v9 15/15] v4l: Document explicit synchronization behavior

2018-05-04 Thread Ezequiel Garcia
: - mention that fences are files (Hans) - rework for the new API Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/vidioc-qbuf.rst | 54 +++- Documentation/media/uapi/v4l/vidioc-querybuf.rst | 12 -- 2 files changed, 62

[PATCH v9 13/15] v4l: introduce the fences capability

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan Drivers capable of using fences (vb2 drivers) should report the V4L2_CAP_FENCES to userspace, so add this flag to the uapi. v2: minor doc/english fix (Hans Verkuil) Signed-off-by: Gustavo Padovan --- Documentation/media/uapi/v4l/vidioc-querycap.rst | 3 +++ include/uapi/

[PATCH v9 10/15] vb2: add explicit fence user API

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan Turn the reserved2 field into fence_fd that we will use to send an in-fence to the kernel or return an out-fence from the kernel to userspace. Two new flags were added, V4L2_BUF_FLAG_IN_FENCE, that should be used when sending an in-fence to the kernel to be waited on, and V

[PATCH v9 11/15] vb2: add in-fence support to QBUF

2018-05-04 Thread Ezequiel Garcia
DMABUF only (Javier) - check num of ready buffers to start streaming - when queueing, start from the first ready buffer - handle queue cancel Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- drivers/media/common/videobuf2/videobuf2-core.c | 197 d

[PATCH v9 07/15] v4l: mark unordered formats

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan Now that we've introduced the V4L2_FMT_FLAG_UNORDERED flag, mark the appropriate formats. Signed-off-by: Gustavo Padovan --- drivers/media/v4l2-core/v4l2-ioctl.c | 55 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/dri

[PATCH v9 05/15] vb2: add unordered vb2_queue property for drivers

2018-05-04 Thread Ezequiel Garcia
vb2_ops_is_unordered() (Hans Verkuil) v3: - make it bool (Hans) - create vb2_ops_set_unordered() helper v2: improve comments for is_unordered flag (Hans Verkuil) Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- include/media/videobuf2-core.h | 3 +++ 1 file changed, 3

[PATCH v9 01/15] xilinx: regroup caps on querycap

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan To better organize the code we concentrate the setting of V4L2_CAP_STREAMING in one place. v2: move cap->capabilities assignment down (Hans Verkuil) Signed-off-by: Gustavo Padovan --- drivers/media/platform/xilinx/xilinx-dma.c | 10 ++ 1 file changed, 6 insertion

[PATCH v9 04/15] vb2: move vb2_ops functions to videobuf2-core.[ch]

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan vb2_ops_wait_prepare() and vb2_ops_wait_finish() were in the wrong file. Signed-off-by: Gustavo Padovan --- drivers/media/common/videobuf2/videobuf2-core.c | 14 ++ drivers/media/common/videobuf2/videobuf2-v4l2.c | 14 -- include/media/videobuf2-co

[PATCH v9 02/15] hackrf: group device capabilities

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan Instead of putting V4L2_CAP_STREAMING and V4L2_CAP_READWRITE everywhere, set device_caps earlier with these values. Signed-off-by: Gustavo Padovan --- drivers/media/usb/hackrf/hackrf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers

[PATCH v9 09/15] vb2: mark codec drivers as unordered

2018-05-04 Thread Ezequiel Garcia
as unordered (Nicolas and Hans) Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 2 ++ drivers/media/platform/mtk-vcodec/mtk_vcodec_enc.c | 1 + drivers/media/platform/qcom/venus/venc.c | 2 ++ drivers/media/platform

[PATCH v9 03/15] omap3isp: group device capabilities

2018-05-04 Thread Ezequiel Garcia
From: Gustavo Padovan Instead of putting V4L2_CAP_STREAMING everywhere, set device_caps earlier with this value. v2: move cap->capabilities assignment down (Hans Verkuil) Signed-off-by: Gustavo Padovan --- drivers/media/platform/omap3isp/ispvideo.c | 10 ++ 1 file changed, 6 insertion

[PATCH v9 12/15] vb2: add out-fence support to QBUF

2018-05-04 Thread Ezequiel Garcia
and fence for the next queued buffer v2: check if the queue is ordered. Signed-off-by: Gustavo Padovan Signed-off-by: Ezequiel Garcia --- drivers/media/common/videobuf2/videobuf2-core.c | 95 +++-- drivers/media/common/videobuf2/videobuf2-v4l2.c | 22 +- dri

[PATCH v9 00/15] V4L2 Explicit Synchronization

2018-05-04 Thread Ezequiel Garcia
Hi all, Gustavo has asked to me to take care of the final issues with this series. I'm working on adding some fences tests to v4l2-compliance, which I'll be posting shortly. So, here's a new version of the "video4linux meet fences" series. This new round hopefully addresses all the feedback rece

Re: [PATCH v3] media: imx: mipi csi-2: Don't fail if initial state times-out

2019-08-07 Thread Ezequiel Garcia
Hi Sakari, Thanks for reviewing the patch. On Wed, 2019-08-07 at 15:06 +0300, Sakari Ailus wrote: > On Tue, Jul 30, 2019 at 05:14:24AM -0300, Ezequiel Garcia wrote: > > Hey Hans, > > > > On Mon, 2019-07-01 at 08:48 +0200, Philipp Zabel wrote: > > > On Thu, 20

[PATCH v3] media: i2c: ov5645: Fix power sequence

2019-08-08 Thread Ezequiel Garcia
th this commit the sensor is able to enter LP-11 mode during power up, as expected by some CSI-2 controllers. Many thanks to Fabio Estevam for his help debugging this issue. Tested-by: Fabio Estevam Signed-off-by: Ezequiel Garcia Reviewed-by: Philipp Zabel Reviewed-by: Jacopo Mondi ---

[PATCH v2 1/6] media: v4l2-core: Module re-organization

2019-08-15 Thread Ezequiel Garcia
s y/m/n. This commit makes v4l2-common part of our V4L2 core driver (videodev.ko). Signed-off-by: Ezequiel Garcia --- Changes v2: * Fix MODULE_xxx macros, combining all the authors and amending the description. --- drivers/media/v4l2-core/Makefile | 3 +-- drivers/media/v4l2-core/v4l2-com

[PATCH v2 2/6] media: v4l2-core: move spi helpers out of v4l2-common.c

2019-08-15 Thread Ezequiel Garcia
Separate the spi helpers to v4l2-spi.c, in order to get rid of the ifdefery. No functional changes intended, this is just a cosmetic change to organize the code better. Signed-off-by: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2

[PATCH v2 6/6] media: v4l2-core: Remove BUG() from i2c and spi helpers

2019-08-15 Thread Ezequiel Garcia
prepared for a NULL result. Signed-off-by: Ezequiel Garcia --- Changes v2: * New patch. --- drivers/media/v4l2-core/v4l2-i2c.c | 3 ++- drivers/media/v4l2-core/v4l2-spi.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-i2c.c b/drivers/media

[PATCH v2 0/6] V4L2 core I2C/SPI code cleanup

2019-08-15 Thread Ezequiel Garcia
#x27;m not addressing that in this series. The entire series should not affect any functionality, but just clean-up the code a bit. Thanks, Eze Ezequiel Garcia (6): media: v4l2-core: Module re-organization media: v4l2-core: move spi helpers out of v4l2-common.c media: v4l2-core: move i2c helpers o

[PATCH v2 4/6] media: v4l2-core: introduce a helper to unregister a spi subdev

2019-08-15 Thread Ezequiel Garcia
Introduce a new video4linux2 spi helper, to unregister a subdev. This allows to get rid of some more ifdefs. Signed-off-by: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/v4l2-device.c | 14 ++ drivers/media/v4l2-core/v4l2-spi.c| 8 include/media

[PATCH v2 5/6] media: v4l2-core: introduce a helper to unregister a i2c subdev

2019-08-15 Thread Ezequiel Garcia
Introduce a new video4linux2 i2c helper, to unregister a subdev. This allows to get rid of yet another ifdef. Signed-off-by: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/v4l2-device.c | 25 ++--- drivers/media/v4l2-core/v4l2-i2c.c| 20

[PATCH v2 3/6] media: v4l2-core: move i2c helpers out of v4l2-common.c

2019-08-15 Thread Ezequiel Garcia
: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/Kconfig | 5 + drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-core/v4l2-common.c | 145 - drivers/media/v4l2-core/v4l2-i2c.c| 147 ++ include/media/v4l2

[PATCH] media: rockchip/rga: Update maintainership

2019-08-15 Thread Ezequiel Garcia
Update Jacob's address and add myself as co-maintainer. Signed-off-by: Ezequiel Garcia --- Note that I have a few minor changes in mind for this driver, but frst, I'll need to fix whatever is wrong with gstreamer not probing it anymore. MAINTAINERS | 3 ++- 1 file changed, 2 insert

Re: [ANN] Topics for a media summit in Lyon in October

2019-08-19 Thread Ezequiel Garcia
On Mon, 2019-08-19 at 09:44 +0200, Hans Verkuil wrote: > On 8/16/19 10:06 AM, Hans Verkuil wrote: > > Rather then discussing topics for a meeting under the subject 'Lisbon' > > let's start a new thread referring to the right place :-) > > > > I will try to organize a room, either during the ELCE o

[PATCH 0/4] Enable Hantro G1 post-processor

2019-09-03 Thread Ezequiel Garcia
and YUV-packed surfaces. Thanks, Ezequiel Ezequiel Garcia (4): media: hantro: Simplify macroblock macros media: hantro: Simplify buffer helpers media: hantro: Add helper for the H264 motion vectors allocation media: hantro: Support color conversion via post-processing drivers/staging/media/

[PATCH 2/4] media: hantro: Simplify buffer helpers

2019-09-03 Thread Ezequiel Garcia
Modify hantro_get_ref() and hantro_h264_get_ref_buf() helpers to return the buffer DMA address, this makes the code simpler and at the same time will allow easier enablement of the post-processing feature. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/hantro/hantro.h | 2

[PATCH 3/4] media: hantro: Add helper for the H264 motion vectors allocation

2019-09-03 Thread Ezequiel Garcia
Introduce a helper to allow easier enablement of the post-processing feature. No functional changes intended. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/hantro/hantro.h | 6 ++ drivers/staging/media/hantro/hantro_v4l2.c | 4 ++-- 2 files changed, 8 insertions(+), 2

[PATCH 1/4] media: hantro: Simplify macroblock macros

2019-09-03 Thread Ezequiel Garcia
It seems all codecs are using a 16x16 size macroblock, and so it's possible to have just one set of macroblock macros. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/hantro/hantro.h | 18 +++--- .../staging/media/hantro/hantro_g1_h264_dec.c | 2 +- .../st

[PATCH 4/4] media: hantro: Support color conversion via post-processing

2019-09-03 Thread Ezequiel Garcia
them. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/hantro/Makefile | 1 + drivers/staging/media/hantro/hantro.h | 23 +- drivers/staging/media/hantro/hantro_drv.c | 24 +- .../staging/media/hantro/hantro_g1_h264_dec.c | 2 +- .../media/hantro/hantro_g1_mpeg2_

Re: [PATCH 3/4] media: hantro: Add helper for the H264 motion vectors allocation

2019-09-04 Thread Ezequiel Garcia
On Wed, 2019-09-04 at 12:17 +0200, Philipp Zabel wrote: > On Tue, 2019-09-03 at 15:17 -0300, Ezequiel Garcia wrote: > > Introduce a helper to allow easier enablement of the post-processing > > feature. No functional changes intended. > > > > Signed-off-by: Ezequiel G

Re: [PATCH 0/4] Enable Hantro G1 post-processor

2019-09-11 Thread Ezequiel Garcia
On Mon, 2019-09-09 at 16:07 +0900, Tomasz Figa wrote: > Hi Ezequiel, > > On Wed, Sep 4, 2019 at 3:17 AM Ezequiel Garcia wrote: > > Hi all, > > > > This series enables the post-processor support available > > on the Hantro G1 VPU. The post-processor block can

Re: [PATCH 4/4] media: hantro: Support color conversion via post-processing

2019-09-11 Thread Ezequiel Garcia
On Mon, 2019-09-09 at 13:03 +0200, Hans Verkuil wrote: > On 9/3/19 8:17 PM, Ezequiel Garcia wrote: > > The Hantro G1 decoder is able to enable a post-processor > > on the decoding pipeline, which can be used to perform > > scaling and color conversion. > > > > Th

Re: [PATCH] rcar-vin: Use bytes per line instead of width for UV offset

2019-09-11 Thread Ezequiel Garcia
Hello Niklas, On Thu, 2019-09-05 at 23:25 +0200, Niklas Söderlund wrote: > The image size is doubled for NV16 and is calculated as bytesperline * > height * 2 to accommodate the split of UV data. When writing the offset > to hardware width is used instead of bytesperline, fix this. > > Signed-off

Re: [PATCH 0/4] Enable Hantro G1 post-processor

2019-09-12 Thread Ezequiel Garcia
On Thu, 2019-09-12 at 14:52 +0900, Tomasz Figa wrote: > On Thu, Sep 12, 2019 at 4:49 AM Nicolas Dufresne wrote: > > Le mercredi 11 septembre 2019 à 09:27 +0100, Ezequiel Garcia a écrit : > > > On Mon, 2019-09-09 at 16:07 +0900, Tomasz Figa wrote: > > > > Hi Ezequiel

Re: [PATCHv2 1/2] v4l: Add macros for printing V4L fourcc values

2019-10-02 Thread Ezequiel Garcia
side-effects. > + */ > +#define v4l2_fourcc_args(fourcc) \ > + (fourcc) & 0x7f, ((fourcc) >> 8) & 0x7f, ((fourcc) >> 16) & 0x7f, \ > + ((fourcc) >> 24) & 0x7f, ((fourcc) & (1 << 31) ? "-BE" : "") > + > /* > * E N U M S > */ Reviewed-by: Ezequiel Garcia Thanks, Ezequiel

Re: [PATCHv2 2/2] v4l2-ioctl.c: use new v4l2_fourcc_conv/args macros

2019-10-02 Thread Ezequiel Garcia
(char)((fmt->pixelformat >> 8) & 0x7f), > - (char)((fmt->pixelformat >> 16) & 0x7f), > - (char)((fmt->pixelformat >> 24) & 0x7f), > - (fmt->pixelformat & (1UL << 31)) ? > "-BE" : ""); > + snprintf(fmt->description, sz, v4l2_fourcc_conv, > + v4l2_fourcc_args(fmt->pixelformat)); > break; > } > } Nice cleanup! I think these are the only media drivers that would have to be converted, in case anyone wants to tackle this. drivers/media/common/saa7146/saa7146_video.c: vv->ov_fmt->pixelformat, v4l2_field_names[vv->ov.win.field]); drivers/media/platform/atmel/atmel-isc-base.c: (char *)&pixfmt->pixelformat, (char *)&sd_fmt->fourcc); drivers/media/platform/sti/delta/delta-debug.c: (char *)&f->pixelformat, f->width, f->height, drivers/media/platform/vsp1/vsp1_drm.c: cfg->pixelformat, cfg->pitch, &cfg->mem[0], &cfg->mem[1], Reviewed-by: Ezequiel Garcia Thanks, Ezequiel

Re: [ANN v2] Media sessions in Lyon in October: libcamera

2019-10-20 Thread Ezequiel Garcia
Attendees for this session: > > Nicolas Dufresne > Tomasz Figa > Ezequiel Garcia > Dafna Hirschfeld I beliebe Dafna and I should not be on this list, and instead Helen Koike and Nicolas Dufresne would be attending. Thanks, Ezequiel > Eugen Hristev > Jacopo Mondi > Laurent Pi

Re: Sabrent (stk1160) / Easycap driver problem

2015-12-21 Thread Ezequiel Garcia
Hi Philippe, On 20 December 2015 at 20:32, Philippe Desrochers wrote: > Hello Ezequiel, > > I tested with saa7115.c and the problem is in the "saa711x_detect_chip" > function. > In fact, the CJC7113 chip seems to returns all '1' when reading register 0. > ("" found @ 0x4a (stk116

[PATCH] stk1160: Remove redundant vb2_buf payload set

2015-12-24 Thread Ezequiel Garcia
Calling vb2_set_plane_payload is enough, there's no need to set the planes[] bytesused field. Remove it. Signed-off-by: Ezequiel Garcia --- drivers/media/usb/stk1160/stk1160-video.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/usb/stk1160/stk1160-video.c b/drivers/medi

[PATCH] media: Support Intersil/Techwell TW686x-based video capture cards

2015-12-26 Thread Ezequiel Garcia
Hałasa Signed-off-by: Ezequiel Garcia --- This patchset superseeds Krzysztof's original patch: https://patchwork.linuxtv.org/patch/30448/ Tested on a custom TW6869-based capture card. Latest v4l2-compliance test pass: $ /usr/bin/v4l2-compliance -f -s Driver Info: Driver name : t

[PATCH v3] media: Support Intersil/Techwell TW686x-based video capture cards

2016-03-02 Thread Ezequiel Garcia
channels, second generation chip). Cc: Krzysztof Hałasa Signed-off-by: Ezequiel Garcia --- Changelog = Changes from v2: * Add Krzysztof as MODULE_AUTHOR. * Put back V4L2_CAP_VIDEO_CAPTURE and VB2_READ which was accidentally removed in v2. * Document the dma_interval module

Re: STK1160 - no video

2016-03-03 Thread Ezequiel Garcia
Hi Kevin, Thanks for the report. On 3 March 2016 at 14:20, Kevin Fitch wrote: > I recently purchased a STK1160 based USB video capture device (Sabrent > USB-AVCPT). I have tested it on a windows computer and it works fine, > but not on any linux box I have tried. > > lsusb reports: > Bus 002 Dev

Re: STK1160 - no video

2016-03-03 Thread Ezequiel Garcia
On 3 March 2016 at 21:50, Kevin Fitch wrote: > Thank you for the quick response. Hmm, I am not seeing anything about > the saa7113 or similar chip. I just replugged it, and here is what > showed up in the log: > > Mar 3 19:32:45 home kernel: [122185.832751] usb 2-3: New USB device > found, idVend

Re: STK1160 - no video

2016-03-19 Thread Ezequiel Garcia
Hey Kevin, On 4 March 2016 at 00:11, Kevin Fitch wrote: > Here is a quick patch that gives me actual video. That being said I > see some curious stuff being logged while video is streaming: > Patch looks more or less good, but that kernel log is not good. It indicates that the USB packet is not

<    1   2   3   4   5   6   7   8   9   10   >