RFC multi-crop (was: Multiple Rectangle cropping)

2013-09-05 Thread Ricardo Ribalda Delgado
Hello I am working porting a industrial camera driver to v4l. So far I have been able to describe most of the old functionality with v4l equivalents. The only thing that I am missing is multi cropping. The sensor (both a cmosis and a ccd chips) supports skipping lines from up to 8 regions. This

Re: RFC multi-crop (was: Multiple Rectangle cropping)

2013-09-06 Thread Ricardo Ribalda Delgado
on this? Of course the names should be better chosen, this is just a declaration of intentions. Cheers! On Thu, Sep 5, 2013 at 11:44 PM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: On 09/05/2013 11:10 PM, Ricardo Ribalda Delgado wrote: Hello Hi, I am working porting a industrial

videobuf2: V4L2_BUF_TYPE_VIDEO_CAPTURE and V4L2_BUF_TYPE_VIDEO_OUTPUT at the same time?

2013-09-10 Thread Ricardo Ribalda Delgado
Hello! I am writing the driver for a device that can work as an input and as output at the same time. It is used for debugging of the video pipeline. Is it possible to have a vb2 queue that supports capture and out at the same time? After a fast look on the code it seems that the code flow is

Re: RFC multi-crop

2013-09-11 Thread Ricardo Ribalda Delgado
Hello Thanks for your comments On Wed, Sep 11, 2013 at 12:05 AM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi All, On 09/10/2013 11:41 PM, Sakari Ailus wrote: Hi Ricardo, On Fri, Sep 06, 2013 at 10:30:18AM +0200, Ricardo Ribalda Delgado wrote: Hi Sylvester Thanks for your

Re: RFC multi-crop (was: Multiple Rectangle cropping)

2013-09-11 Thread Ricardo Ribalda Delgado
Hello Sakari On Wed, Sep 11, 2013 at 12:35 AM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Ricardo, On Fri, Sep 06, 2013 at 10:30:18AM +0200, Ricardo Ribalda Delgado wrote: Any comment on this? Of course the names should be better chosen, this is just a declaration of intentions. I forgot

[PATCH] RFC: Support for multiple selections

2013-09-11 Thread Ricardo Ribalda Delgado
. This is needed in cases where the user has to change multiple selections at the same time to get a valid combination. On devices where the control V4L2_CID_SELECTION_BITMASK does not exist, the id field is ignored Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- Documentation/DocBook

Re: [PATCH] RFC: Support for multiple selections

2013-09-11 Thread Ricardo Ribalda Delgado
Hi Hans Thanks for your feedback On Wed, Sep 11, 2013 at 11:04 AM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 09/11/2013 10:30 AM, Ricardo Ribalda Delgado wrote: A new id field is added to the struct selection. On devices that supports multiple sections this id indicate which

Re: [PATCH] RFC: Support for multiple selections

2013-09-11 Thread Ricardo Ribalda Delgado
Hello Hans On Wed, Sep 11, 2013 at 12:49 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 09/11/2013 11:34 AM, Ricardo Ribalda Delgado wrote: Hi Hans Thanks for your feedback On Wed, Sep 11, 2013 at 11:04 AM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 09/11/2013 10

[PATCH] RFCv2: Support for multiple selections

2013-09-12 Thread Ricardo Ribalda Delgado
the pr array is used instead of the r field. A new structure v4l2_ext_rect has been defined, containing 4 reserved fields for future improvements, as suggested by Hans. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core/v4l2-ioctl.c | 54

Re: [PATCH] RFC: Support for multiple selections

2013-09-12 Thread Ricardo Ribalda Delgado
Hi Hans On Wed, Sep 11, 2013 at 3:02 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 09/11/2013 02:13 PM, Ricardo Ribalda Delgado wrote: Hello Hans On Wed, Sep 11, 2013 at 12:49 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 09/11/2013 11:34 AM, Ricardo Ribalda

[PATCH] v4l2: Support for multiple selections

2013-09-16 Thread Ricardo Ribalda Delgado
of converting a pr pointer with one item to a flatten struct. This function is used in all the old drivers that dont support multiple selections. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/platform/exynos-gsc/gsc-m2m.c | 6 +++ drivers/media/platform/exynos4

Patchwork is down or only for me?

2013-09-16 Thread Ricardo Ribalda Delgado
Hello I have sent a patch and it does not appear on patchwork, it is also slower than usual. Also a patch from David Jedelsky is not there. Regards! -- Ricardo Ribalda -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org

Re: Patchwork is down or only for me?

2013-09-16 Thread Ricardo Ribalda Delgado
I was looking to this one: https://patchwork.linuxtv.org/project/linux-media/list/ Where the latest patch is https://patchwork.linuxtv.org/patch/20090/ On Mon, Sep 16, 2013 at 4:58 PM, Antti Palosaari cr...@iki.fi wrote: On 09/16/2013 05:48 PM, Ricardo Ribalda Delgado wrote: Hello I have

Re: Patchwork is down or only for me?

2013-09-16 Thread Ricardo Ribalda Delgado
Yes, it is working fine. Thanks! On Mon, Sep 16, 2013 at 9:04 PM, Johannes Stezenbach j...@linuxtv.org wrote: On Mon, Sep 16, 2013 at 05:01:36PM +0200, Ricardo Ribalda Delgado wrote: I was looking to this one: https://patchwork.linuxtv.org/project/linux-media/list/ Where the latest patch

Re: [PATCH] v4l2: Support for multiple selections

2013-09-30 Thread Ricardo Ribalda Delgado
the platform driver patches for now until the core support is correct. On 09/16/2013 02:54 PM, Ricardo Ribalda Delgado wrote: From: Ricardo Ribalda ricardo.riba...@gmail.com Extend v4l2 selection API to support multiple selection areas, this way sensors that support multiple readout areas can work

[RFC v2] [RFC] v4l2: Support for multiple selections

2013-10-01 Thread Ricardo Ribalda Delgado
@neopili:/tmp$ ./a.out Size of v4l2_selection=64 ricardo@neopili:/tmp$ gcc kk.c ricardo@neopili:/tmp$ ./a.out Size of v4l2_selection=64 This patch includes all the comments by Hans Verkuil. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core/v4l2-common.c | 39

Re: [PATCH] v4l2: Support for multiple selections

2013-10-01 Thread Ricardo Ribalda Delgado
Hello Hans I have just posted a new patch that only takes care of the core. Thanks! On Mon, Sep 30, 2013 at 2:11 PM, Hans Verkuil hverk...@xs4all.nl wrote: On 09/30/2013 01:17 PM, Ricardo Ribalda Delgado wrote: Hello Hans As allways thank you very much for your comments. On Mon, Sep 30

[RFC v3] [RFC] v4l2: Support for multiple selections

2013-10-01 Thread Ricardo Ribalda Delgado
to the core. Once it is agreed, a new version including changes on the drivers that handle the selection api will come. This patch includes all the comments by Hans Verkuil. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- v3: -Changes on compat-ioctl32 -Remove checks

Re: [RFC v2] [RFC] v4l2: Support for multiple selections

2013-10-01 Thread Ricardo Ribalda Delgado
Hello Hans Thanks for your comments I have just posted a new version. Regards! On Tue, Oct 1, 2013 at 11:13 AM, Hans Verkuil hverk...@xs4all.nl wrote: On Tue 1 October 2013 10:26:56 Ricardo Ribalda Delgado wrote: Extend v4l2 selection API to support multiple selection areas, this way

[PATCH] vb2: Allow STREAMOFF for io emulator

2013-10-04 Thread Ricardo Ribalda Delgado
. With this patch a video device opened in io emulator can be stopped on demand. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core/videobuf2-core.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2

Re: [PATCH] vb2: Allow STREAMOFF for io emulator

2013-10-04 Thread Ricardo Ribalda Delgado
://pypi.python.org/pypi/v4l2 , but it is quite old. Thanks! On Fri, Oct 4, 2013 at 4:09 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 10/04/2013 03:49 PM, Ricardo Ribalda Delgado wrote: A video device opened and streaming in io emulator mode can only stop streamming if its file descriptor

Re: [PATCH] vb2: Allow STREAMOFF for io emulator

2013-10-08 Thread Ricardo Ribalda Delgado
...@samsung.com wrote: Hello, On 2013-10-04 15:49, Ricardo Ribalda Delgado wrote: A video device opened and streaming in io emulator mode can only stop streamming if its file descriptor is closed. There are some parameters that can only be changed if the device is not streaming. Also, the power

Re: [RFC v3] [RFC] v4l2: Support for multiple selections

2013-10-13 Thread Ricardo Ribalda Delgado
Ping? Any comment about this version? Shall I post a new one with the modified device drivers? Thanks! On Tue, Oct 1, 2013 at 12:33 PM, Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Extend v4l2 selection API to support multiple selection areas, this way sensors that support

Possible race condition on videobuf2?

2013-10-13 Thread Ricardo Ribalda Delgado
Hello These days I have been testing an app that uses the old read/write API. It is interfacing a videobuf2-sg driver. Once in a while I get an oops on the vb2_perform_fileio function. After digging a while I have been able to fix the bug like this: int vb2_fop_release(struct file *file) {

[PATCH] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-14 Thread Ricardo Ribalda Delgado
] [ 308.298507] RSP 88014dc03df8 [ 308.298514] CR2: 0260 [ 308.298526] ---[ end trace e8f01717c96d1e41 ]--- Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core/videobuf2-core.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: Possible race condition on videobuf2?

2013-10-14 Thread Ricardo Ribalda Delgado
: 0260 [ 57.568606] ---[ end trace d664b8a0460e8ca5 ]--- On Sun, Oct 13, 2013 at 6:42 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 10/13/2013 03:03 PM, Ricardo Ribalda Delgado wrote: Hello These days I have been testing an app that uses the old read/write API

Re: Possible race condition on videobuf2?

2013-10-14 Thread Ricardo Ribalda Delgado
, Ricardo Ribalda Delgado wrote: Hello Hans Thanks for your feedback. I have send a patch to the list with your suggestion. If I dont apply my patch, but your your branch I still get the error: Thanks for testing this. I suspected that might be the case. What exactly is the sequence

Re: [PATCH] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-19 Thread Ricardo Ribalda Delgado
Hello Sylwester On Sat, Oct 19, 2013 at 11:55 AM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi Ricardo, On 10/14/2013 09:41 AM, Ricardo Ribalda Delgado wrote: vb2_fop_relase does not held the lock although it is modifying the queue-owner field. [...] diff --git a/drivers

Re: [PATCH] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-19 Thread Ricardo Ribalda Delgado
Ribalda Delgado wrote: On Sat, Oct 19, 2013 at 11:55 AM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: On 10/14/2013 09:41 AM, Ricardo Ribalda Delgado wrote: vb2_fop_relase does not held the lock although it is modifying the queue-owner field. [...] diff --git a/drivers

Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-19 Thread Ricardo Ribalda Delgado
Hello Sylwester On Sat, Oct 19, 2013 at 8:27 PM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: On 10/19/2013 06:07 PM, Ricardo Ribalda wrote: [...] --- drivers/media/platform/exynos4-is/fimc-capture.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c| 2 +-

Re: [RFC v3] [RFC] v4l2: Support for multiple selections

2013-10-28 Thread Ricardo Ribalda Delgado
Hello Tomasz Sorry for the late reply, but I have been offline the last week due to the conference. On Thu, Oct 24, 2013 at 12:31 PM, Tomasz Stanislawski t.stanisl...@samsung.com wrote: Hi Ricardo, I am the designer of selection API. I hope I can help you a little. I think that there are two

Re: [PATCH v2] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-29 Thread Ricardo Ribalda Delgado
Hello Anybody has a comment here? If not I will post a patch with the modifications propossed by Sylwester. Thanks! On Sat, Oct 19, 2013 at 10:08 PM, Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Hello Sylwester On Sat, Oct 19, 2013 at 8:27 PM, Sylwester Nawrocki

[[PATCH v3]] videobuf2: Add missing lock held on vb2_fop_relase

2013-10-31 Thread Ricardo Ribalda Delgado
-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/platform/exynos4-is/fimc-capture.c | 2 +- drivers/media/platform/exynos4-is/fimc-lite.c| 2 +- drivers/media/v4l2-core/videobuf2-core.c | 24 +++- include/media/videobuf2-core.h

Re: [[PATCH v3]] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-02 Thread Ricardo Ribalda Delgado
Hello Sylwester Thanks for your comments. There is a new patch: v4! :) On Fri, Nov 1, 2013 at 11:36 PM, Sylwester Nawrocki sylvester.nawro...@gmail.com wrote: Hi Ricardo, On 10/31/2013 09:54 PM, Ricardo Ribalda Delgado wrote: From: Ricardo Ribaldaricardo.riba...@gmail.com vb2_fop_relase

[PATCH v4] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-02 Thread Ricardo Ribalda Delgado
From: Ricardo Ribalda ricardo.riba...@gmail.com vb2_fop_relase does not held the lock although it is modifying the queue-owner field. This could lead to race conditions on the vb2_perform_io function when multiple applications are accessing the video device via read/write API: [ 308.297741]

Re: [PATCH v4] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-04 Thread Ricardo Ribalda Delgado
Hello Hans Thanks for your comments. Please take a look to v4 of this patch https://patchwork.linuxtv.org/patch/20529/ On Mon, Nov 4, 2013 at 1:37 PM, Hans Verkuil hverk...@xs4all.nl wrote: On 11/02/2013 10:53 AM, Ricardo Ribalda Delgado wrote: From: Ricardo Ribalda ricardo.riba...@gmail.com

[PATCH v5] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-06 Thread Ricardo Ribalda Delgado
From: Ricardo Ribalda ricardo.riba...@gmail.com vb2_fop_relase does not held the lock although it is modifying the queue-owner field. This could lead to race conditions on the vb2_perform_io function when multiple applications are accessing the video device via read/write API: [ 308.297741]

Re: [PATCH v4] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-06 Thread Ricardo Ribalda Delgado
Verkuil hverk...@xs4all.nl wrote: On 11/04/2013 03:24 PM, Sylwester Nawrocki wrote: On 04/11/13 15:12, Hans Verkuil wrote: On 11/04/2013 02:54 PM, Ricardo Ribalda Delgado wrote: Hello Hans Thanks for your comments. Please take a look to v4 of this patch https://patchwork.linuxtv.org/patch/20529

[PATCH] em28xx-video: Swap release order to avoid lock nesting

2013-11-06 Thread Ricardo Ribalda Delgado
vb2_fop_release might take the video queue mutex lock. In order to avoid nesting mutexes the private mutex is taken after the fop_release has finished. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/usb/em28xx/em28xx-video.c | 2 +- 1 file changed, 1 insertion

Re: [PATCH v4] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-06 Thread Ricardo Ribalda Delgado
Here are the patches https://patchwork.linuxtv.org/patch/20668/ https://patchwork.linuxtv.org/patch/20669/ Thanks! On Wed, Nov 6, 2013 at 9:26 AM, Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Hello Hans and Sywester I have just posted a new patch. I think it fits

Re: [PATCH v5] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-06 Thread Ricardo Ribalda Delgado
Hello Hans I will fix both things, but I will wait a couple of hours in case there is more changes, to avoid spamming the list. Thanks On Wed, Nov 6, 2013 at 10:07 AM, Hans Verkuil hverk...@xs4all.nl wrote: On 11/06/13 09:24, Ricardo Ribalda Delgado wrote: From: Ricardo Ribalda ricardo.riba

[PATCH] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
As addressed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields into unsigned. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/i2c/mt9m032.c| 16

[PATCH] smiapp: Fix BUG_ON() on an impossible condition

2013-11-06 Thread Ricardo Ribalda Delgado
-core.c:402:9: note: in expansion of macro ‘min’ BUG_ON(min(internal_csi_format_idx, csi_format_idx) 0); ^ Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/i2c/smiapp/smiapp-core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c

[PATCH] ths7303: Declare as static a private function

2013-11-06 Thread Ricardo Ribalda Delgado
ths7303_filter_mode mode) ^ Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/i2c/ths7303.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c index 42276d9..16da153 100644 --- a/drivers

[PATCH v6] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-06 Thread Ricardo Ribalda Delgado
[a07a9fd2] vb2_perform_fileio+0x372/0x610 [videobuf2_core] [ 308.298507] RSP 88014dc03df8 [ 308.298514] CR2: 0260 [ 308.298526] ---[ end trace e8f01717c96d1e41 ]--- Acked-by: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- v2

[PATCH v2] ths7303: Declare as static a private function

2013-11-06 Thread Ricardo Ribalda Delgado
ths7303_filter_mode mode) ^ Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- v2: Comment by Laurent Pinchart Align parameters drivers/media/i2c/ths7303.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

Re: [PATCH] ths7303: Declare as static a private function

2013-11-06 Thread Ricardo Ribalda Delgado
Hello Laurent I have just uploaded a patch, please take a look if I align it properly. Thanks! On Wed, Nov 6, 2013 at 3:33 PM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Ricardo, Thank you for the patch. On Wednesday 06 November 2013 15:27:48 Ricardo Ribalda Delgado wrote

Re: [PATCH] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
, Ricardo Ribalda Delgado wrote: ... diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index ae66d91..9036e64 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2028,8 +2028,8 @@ static int

Re: [PATCH] smiapp: Fix BUG_ON() on an impossible condition

2013-11-06 Thread Ricardo Ribalda Delgado
Ailus sakari.ai...@iki.fi wrote: Hi Ricardo, Thanks for the patch. I've removed LKML from cc since I don't think this is anything but noise there. On Wed, Nov 06, 2013 at 03:21:30PM +0100, Ricardo Ribalda Delgado wrote: internal_csi_format_idx and csi_format_idx are unsigned integers

[PATCH v2] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
As addressed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields into unsigned. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- v2: Comments by Sakari Ailus and Laurent Pinchart -Fix

[PATCH v7] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-06 Thread Ricardo Ribalda Delgado
[a07a9fd2] vb2_perform_fileio+0x372/0x610 [videobuf2_core] [ 308.298507] RSP 88014dc03df8 [ 308.298514] CR2: 0260 [ 308.298526] ---[ end trace e8f01717c96d1e41 ]--- Acked-by: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- v2

[PATCH v2] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
As addressed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields into unsigned. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- v2: Comments by Sakari Ailus and Laurent Pinchart -Fix

Re: [PATCH v2] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
Hello Sakai It has to be done in the same patch? or on a separated patch just changing the xml file? Thanks! On Wed, Nov 6, 2013 at 4:53 PM, Sakari Ailus sakari.ai...@iki.fi wrote: On Wed, Nov 06, 2013 at 04:43:04PM +0100, Ricardo Ribalda Delgado wrote: As addressed on the media summit 2013

[PATCH v3] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
-Replace min with min_t where possible and remove unneeded checks Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- Documentation/DocBook/media/v4l/compat.xml | 12 Documentation/DocBook/media/v4l/dev-overlay.xml| 8 ++--- Documentation/DocBook/media/v4l

[PATCH v4] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
As addressed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields into unsigned. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- v3: Comments by Sakari -Update also doc v2: Comments

[PATCH v5] videodev2: Set vb2_rect's width and height as unsigned

2013-11-06 Thread Ricardo Ribalda Delgado
As discussed on the media summit 2013, there is no reason for the width and height to be signed. Therefore this patch is an attempt to convert those fields from __s32 to __u32. Acked-by: Sakari Ailus sakari.ai...@iki.fi (documentation and smiapp) Signed-off-by: Ricardo Ribalda Delgado

[PATCH] videobuf2-dma-sg: Fix typo on debug message

2013-11-06 Thread Ricardo Ribalda Delgado
num_pages_from_user and buf-num_pages were swapped. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2

[PATCH] videobuf2-dma-sg: Support io userptr operations on io memory

2013-11-06 Thread Ricardo Ribalda Delgado
Memory exported via remap_pfn_range cannot be remapped via get_user_pages. Other videobuf2 methods (like the dma-contig) supports io memory. This patch adds support for this kind of memory. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core/videobuf2

Re: [PATCH v5] videodev2: Set vb2_rect's width and height as unsigned

2013-11-08 Thread Ricardo Ribalda Delgado
Hello Laurent Thanks for your comments On Fri, Nov 8, 2013 at 3:42 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: Hi Ricardo, Thank you for the patch. On Wednesday 06 November 2013 19:42:16 Ricardo Ribalda Delgado wrote: As discussed on the media summit 2013

Re: [PATCH v5] videodev2: Set vb2_rect's width and height as unsigned

2013-11-08 Thread Ricardo Ribalda Delgado
Hello Sakari On Fri, Nov 8, 2013 at 11:39 AM, Sakari Ailus sakari.ai...@iki.fi wrote: On Fri, Nov 08, 2013 at 11:12:54AM +0100, Ricardo Ribalda Delgado wrote: ... Also I am not aware of a reason why clamp_t is better than clamp (I am probably wrong here). If there is a good reason

[PATCH v8] videobuf2: Add missing lock held on vb2_fop_relase

2013-11-25 Thread Ricardo Ribalda Delgado
From: Ricardo Ribalda ricardo.riba...@gmail.com vb2_fop_release does not held the lock although it is modifying the queue-owner field. This could lead to race conditions on the vb2_perform_io function when multiple applications are accessing the video device via read/write API: [ 308.297741]

Re: [PATCH] videobuf2-dma-sg: Support io userptr operations on io memory

2013-11-25 Thread Ricardo Ribalda Delgado
Hello Mathias Memory managing is definately not my topic. I have done the same as in vb2-dmacontig, and it has worked on my driver (out of tree). I think that if there is something wrong it will also be wrong on the dmacontig part, and much more drivers would be affected, so please also take a

Re: [PATCH v5] videodev2: Set vb2_rect's width and height as unsigned

2013-11-25 Thread Ricardo Ribalda Delgado
Hello Is there anything that needs to be addressed on this patch? Thanks! On Fri, Nov 8, 2013 at 2:41 PM, Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Hello Sakari On Fri, Nov 8, 2013 at 11:39 AM, Sakari Ailus sakari.ai...@iki.fi wrote: On Fri, Nov 08, 2013 at 11:12:54AM +0100

Re: [PATCH] videobuf2-dma-sg: Support io userptr operations on io memory

2013-11-25 Thread Ricardo Ribalda Delgado
Hello Marek Could you review the patch? Is there something that needs to be fixed? Thanks! On Mon, Nov 25, 2013 at 4:41 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 2013-11-11 12:36, Matthias Wächter wrote: @@ -180,7 +186,26 @@ static void *vb2_dma_sg_get_userptr(void

[PATCH v6] videodev2: Set vb2_rect's width and height as unsigned

2013-11-25 Thread Ricardo Ribalda Delgado
(documentation and smiapp) Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com Documentation/DocBook/media/v4l/compat.xml | 12 Documentation/DocBook/media/v4l/dev-overlay.xml| 9 ++ Documentation/DocBook/media/v4l

[PATCH v7] videodev2: Set vb2_rect's width and height as unsigned

2013-11-26 Thread Ricardo Ribalda Delgado
-by: Sakari Ailus sakari.ai...@iki.fi (documentation and smiapp) Acked-by: Lad, Prabhakar prabhakar.cse...@gmail.com Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com Documentation/DocBook/media/v4l/compat.xml | 12 Documentation/DocBook/media/v4l/dev-overlay.xml| 9

[PATCH v2] videobuf2-dma-sg: Support io userptr operations on io memory

2013-11-26 Thread Ricardo Ribalda Delgado
Memory exported via remap_pfn_range cannot be remapped via get_user_pages. Other videobuf2 methods (like the dma-contig) supports io memory. This patch adds support for this kind of memory. v2: Comments by Marek Szyprowski -Use vb2_get_vma and vb2_put_vma Signed-off-by: Ricardo Ribalda Delgado

Re: [PATCH] media: v4l2-dev: fix video device index assignment

2013-12-03 Thread Ricardo Ribalda Delgado
Acked-by: Ricardo Ribalda ricardo.riba...@gmail.com On Tue, Dec 3, 2013 at 2:23 PM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi, Marek! Thanks for the patch. On Tue, Dec 03, 2013 at 02:14:29PM +0100, Marek Szyprowski wrote: The side effect of commit 1056e4388b045 (v4l2-dev: Fix race

Re: [RFC v3] [RFC] v4l2: Support for multiple selections

2013-12-10 Thread Ricardo Ribalda Delgado
two weeks. Please refer to the comments below. On 10/28/2013 11:46 PM, Ricardo Ribalda Delgado wrote: Hello Tomasz Sorry for the late reply, but I have been offline the last week due to the conference. On Thu, Oct 24, 2013 at 12:31 PM, Tomasz Stanislawski t.stanisl...@samsung.com wrote

Re: [RFC v3] [RFC] v4l2: Support for multiple selections

2013-12-10 Thread Ricardo Ribalda Delgado
Hello Tomasz and Hans On Thu, Nov 14, 2013 at 4:40 PM, Tomasz Stanislawski t.stanisl...@samsung.com wrote: Hi Hans, On 11/14/2013 11:18 AM, Hans Verkuil wrote: Hi Tomasz, On 11/12/13 15:54, Tomasz Stanislawski wrote: Hi Ricardo, Sorry for a late reply. I've been 'offline' for the last two

Re: Multiple Rectangle cropping

2012-10-12 Thread Ricardo Ribalda Delgado
12, 2012 at 12:32 AM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Ricardo, On Thu, Oct 11, 2012 at 12:40:03PM +0200, Ricardo Ribalda Delgado wrote: I want to port an old driver for an fpga based camera to the new media infrastructure. By reading the doc. I think it has almost all

Re: Multiple Rectangle cropping

2012-10-15 Thread Ricardo Ribalda Delgado
Hello Sakari I get the two areas sticked together. Of course both areas of interest have the save width. Kind Regards :) On Mon, Oct 15, 2012 at 10:50 PM, Sakari Ailus sakari.ai...@iki.fi wrote: Hi Ricardo, On Fri, Oct 12, 2012 at 09:18:42AM +0200, Ricardo Ribalda Delgado wrote: In fact

[PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-15 Thread Ricardo Ribalda Delgado
) that could not be handled by some DMA engines. This patch tries to minimize the number of DMA segments by using alloc_pages_exact. In the worst case it will behave as before, but most of the times it will reduce the number fo dma segments Signed-off-by: Ricardo Ribalda Delgado ricardo.riba

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-17 Thread Ricardo Ribalda Delgado
: Hello, On 7/15/2013 11:34 AM, Ricardo Ribalda Delgado wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through houndreds of pages. In the previous aproach, the pages were allocated individually

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-17 Thread Ricardo Ribalda Delgado
]); + i++; } while (usize 0); -- 1.7.10.4 On Wed, Jul 17, 2013 at 11:43 AM, Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Hi Marek alloc_pages_exact returns pages of order 0, every single page is filled into buf-pages, that then is used by vb2_dma_sg_mmap(), that also expects

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-17 Thread Ricardo Ribalda Delgado
do you prefer? Regards! On Wed, Jul 17, 2013 at 3:42 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 7/17/2013 11:43 AM, Ricardo Ribalda Delgado wrote: Hi Marek alloc_pages_exact returns pages of order 0, every single page is filled into buf-pages, that then is used

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-18 Thread Ricardo Ribalda Delgado
, Ricardo Ribalda Delgado wrote: Hello again Marek In my system I am doing the scatter gather compaction on device driver... But I agree that it would be better done on the vb2 layer. For the oversize sglist we could do one of this two things. If we want to have a simple pass processing we

[PATCH 3/4] media/marvell-ccic: Changes on the vb2-dma-sg API

2013-07-19 Thread Ricardo Ribalda Delgado
The struct vb2_dma_sg_desc has been replaced with the generic sg_table to describe the location of the video buffers. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/platform/marvell-ccic/mcam-core.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH 0/4] videobuf2-dma-sg: Contiguos memory allocation

2013-07-19 Thread Ricardo Ribalda Delgado
as possible. Ricardo Ribalda Delgado (4): videobuf2-dma-sg: Allocate pages as contiguous as possible videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table media/marvell-ccic: Changes on the vb2-dma-sg API media/solo6x10: Changes on the vb2-dma-sg API drivers/media/platform/marvell-ccic/mcam

[PATCH 1/4] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Ricardo Ribalda Delgado
) that could not be handled by some DMA engines. This patch tries to minimize the number of DMA segments by using alloc_pages. In the worst case it will behave as before, but most of the times it will reduce the number fo dma segments Signed-off-by: Ricardo Ribalda Delgado ricardo.riba

[PATCH 4/4] media/solo6x10: Changes on the vb2-dma-sg API

2013-07-19 Thread Ricardo Ribalda Delgado
The struct vb2_dma_sg_desc has been replaced with the generic sg_table to describe the location of the video buffers. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 20 ++-- 1 file changed, 10 insertions

[PATCH 2/4] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-07-19 Thread Ricardo Ribalda Delgado
Replace the private struct vb2_dma_sg_desc with the struct sg_table so we can benefit from all the helping functions in lib/scatterlist.c for things like allocating the sg or compacting the descriptor Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/v4l2-core

Re: [PATCH] videobuf2-dma-sg: Minimize the number of dma segments

2013-07-19 Thread Ricardo Ribalda Delgado
, Jul 18, 2013 at 3:34 PM, Marek Szyprowski m.szyprow...@samsung.com wrote: Hello, On 7/18/2013 9:39 AM, Ricardo Ribalda Delgado wrote: Hello again: I have started to implemt it, but I think there is more hidden work in this task as it seems. In order to call dma_map_sg

Re: [PATCH 2/4] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-07-19 Thread Ricardo Ribalda Delgado
Hello Sylwester I thought I had to split the API changes. Sorry :S. I will wait for more comments and then I will resubmit. Thanks for you comment! On Fri, Jul 19, 2013 at 10:51 AM, Sylwester Nawrocki s.nawro...@samsung.com wrote: Hi Ricardo, On 07/19/2013 09:58 AM, Ricardo Ribalda Delgado

Re: [PATCH 1/4] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Ricardo Ribalda Delgado
a.hei...@gmail.com wrote: On Fri, Jul 19, 2013 at 09:58:46AM +0200, Ricardo Ribalda Delgado wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through houndreds of pages. In the previous aproach

[PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Ricardo Ribalda Delgado
) that could not be handled by some DMA engines. This patch tries to minimize the number of DMA segments by using alloc_pages. In the worst case it will behave as before, but most of the times it will reduce the number of dma segments Signed-off-by: Ricardo Ribalda Delgado ricardo.riba

[PATCH 0/2] videobuf2-dma-sg: Contiguos memory allocation

2013-07-19 Thread Ricardo Ribalda Delgado
as possible. v2: Contains feedback from Andre Heider and Sylwester Nawrocki Andre: Fix error handling (--pages) Sylwester: Squash p3 and p4 into p2 Ricardo Ribalda Delgado (2): videobuf2-dma-sg: Allocate pages as contiguous as possible videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

[PATCH 2/2] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-07-19 Thread Ricardo Ribalda Delgado
Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/platform/marvell-ccic/mcam-core.c| 14 +-- drivers/media/v4l2-core/videobuf2-dma-sg.c | 103 drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 20 ++-- include/media/videobuf2-dma-sg.h

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-07-19 Thread Ricardo Ribalda Delgado
, 2013 at 10:16 PM, Jonathan Corbet cor...@lwn.net wrote: On Fri, 19 Jul 2013 19:02:33 +0200 Ricardo Ribalda Delgado ricardo.riba...@gmail.com wrote: Most DMA engines have limitations regarding the number of DMA segments (sg-buffers) that they can handle. Videobuffers can easily spread through

[PATCH] v4l2_compliance: -EINVAL is expected when ret is not 0

2013-07-30 Thread Ricardo Ribalda Delgado
Otherwise the driver can never return a register Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- utils/v4l2-compliance/v4l2-test-debug.cpp |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/v4l2-compliance/v4l2-test-debug.cpp b/utils/v4l2

Question about v4l2-compliance: cap-readbuffers

2013-07-30 Thread Ricardo Ribalda Delgado
Hello I am developing a driver for a camera that supports read/write and mmap access to the buffers. When I am running the compliance test, I cannot pass it because of this test on v4l2-test-formats.cpp 904 if (!(node-caps V4L2_CAP_READWRITE)) 905

Re: Question about v4l2-compliance: cap-readbuffers

2013-07-30 Thread Ricardo Ribalda Delgado
, 2013 at 3:45 PM, Hans Verkuil hverk...@xs4all.nl wrote: On Tue 30 July 2013 15:12:57 Ricardo Ribalda Delgado wrote: Hello I am developing a driver for a camera that supports read/write and mmap access to the buffers. When I am running the compliance test, I cannot pass it because

Re: Question about v4l2-compliance: cap-readbuffers

2013-07-30 Thread Ricardo Ribalda Delgado
. I could return -EINVAL, but I rather not show the controls to the user. What would be the proper way to do this? Thanks gain. On Tue, Jul 30, 2013 at 5:29 PM, Hans Verkuil hverk...@xs4all.nl wrote: On Tue 30 July 2013 17:18:58 Ricardo Ribalda Delgado wrote: Thanks for the explanation

Re: Question about v4l2-compliance: cap-readbuffers

2013-07-31 Thread Ricardo Ribalda Delgado
dont like that either, is this a false positive or I should behave differently?. Thank you again! On Tue, Jul 30, 2013 at 6:17 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Ricardo, On 07/30/2013 05:46 PM, Ricardo Ribalda Delgado wrote: Hello I have a camera that works on two modes: Mono

[PATCH] libv4lconvert: Support for Y16 pixel format

2013-08-01 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_Y16 format. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- lib/libv4lconvert/libv4lconvert.c | 19 +++ lib/libv4lconvert/rgbyuv.c| 30 ++ 2 files changed, 49 insertions(+) diff

[PATCH 2/2] libv4lconvert: Support for RGB32 and BGR32 format

2013-08-01 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_BGR32 and V4L2_PIX_FMT_BGR32 formats. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- lib/libv4lconvert/libv4lconvert-priv.h |5 ++- lib/libv4lconvert/libv4lconvert.c | 58 +--- lib/libv4lconvert

[PATCH 0/2] Add support for V4L2_PIX_FMT_Y16, V4L2_PIX_FMT_RGB32 and V4L2_PIX_FMT_BGR32

2013-08-01 Thread Ricardo Ribalda Delgado
This patch adds support for 3 new formats. Ricardo Ribalda Delgado (2): libv4lconvert: Support for Y16 pixel format libv4lconvert: Support for RGB32 and BGR32 format lib/libv4lconvert/libv4lconvert-priv.h | 11 +++- lib/libv4lconvert/libv4lconvert.c | 77

[PATCH 1/2] libv4lconvert: Support for Y16 pixel format

2013-08-01 Thread Ricardo Ribalda Delgado
This patch adds support for V4L2_PIX_FMT_Y16 format. Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- lib/libv4lconvert/libv4lconvert-priv.h |6 ++ lib/libv4lconvert/libv4lconvert.c | 19 +++ lib/libv4lconvert/rgbyuv.c | 30

Re: [PATCH 1/2] videobuf2-dma-sg: Allocate pages as contiguous as possible

2013-08-01 Thread Ricardo Ribalda Delgado
Hi Sakarius I think the whole point of the videobuf2 is sharing pages with the user space, so until vm_insert_page does not support high order pages we should split them. Unfortunately the mm is completely out of my topic, so I don't think that I could be very useful there. With my patch, in the

[PATCH v3 2/2] videobuf2-dma-sg: Replace vb2_dma_sg_desc with sg_table

2013-08-02 Thread Ricardo Ribalda Delgado
Szyprowski m.szyprow...@samsung.com Signed-off-by: Ricardo Ribalda Delgado ricardo.riba...@gmail.com --- drivers/media/platform/marvell-ccic/mcam-core.c| 14 +-- drivers/media/v4l2-core/videobuf2-dma-sg.c | 103 drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 20

  1   2   3   4   5   >