[PATCH] videobuf2-dma-sg: Fix NULL pointer dereference BUG

2014-04-25 Thread Ricardo Ribalda Delgado
209908] RSP [ 406.211760] CR2: 0040 [ 406.213676] ---[ end trace 996d9f64e6739a04 ]--- Signed-off-by: Ricardo Ribalda Delgado --- 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-s

Re: [PATCH 2/8] [media] au0828: Improve debug messages for urb_completion

2014-05-22 Thread Ricardo Ribalda Delgado
Hello Mauro Are you aware that using dynamic printk you can decide to print __func__ on demand? https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/dynamic-debug-howto.txt#n213 Perhaps it is better to not add __func__ Regards! On Wed, May 21, 2014 at 8:19 PM, Ma

[PATCH 3/3] media/videobuf2-dma-vmalloc: Save output from dma_map_sg

2015-02-09 Thread Ricardo Ribalda Delgado
dma_map_sg returns the actual number of areas mapped. Save it on nents. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/videobuf2-vmalloc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/v4l2-core/videobuf2-vmalloc.c b/drivers/media/v4l2-core/videobuf2

[PATCH 2/3] media/videobuf2-dma-contig: Fix handling of sg_table structure

2015-02-09 Thread Ricardo Ribalda Delgado
patch fix the file to follow this paradigm. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-contig.c b/drivers/media/v4l2-core/videobuf2

[PATCH 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure

2015-02-09 Thread Ricardo Ribalda Delgado
patch fix the file to follow this paradigm. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core

Re: [PATCH 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure

2015-02-11 Thread Ricardo Ribalda Delgado
Hello Marek On Wed, Feb 11, 2015 at 9:06 AM, Marek Szyprowski wrote: >> Unfortunately nent differs in sign to the output of dma_map_sg, so an >> intermediate value must be used. > > > I don't get this part. dma_map_sg() returns the number of scatter list > entries mapped > to the hardware or zero

Re: [PATCH 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure

2015-02-11 Thread Ricardo Ribalda Delgado
Hello again On Wed, Feb 11, 2015 at 10:00 AM, Marek Szyprowski wrote: > Well, this int return value seems to be misleading, but according to > Documentation/DMA-API.txt, the only error value is zero: > > "As with the other mapping interfaces, dma_map_sg() can fail. When it > does, 0 is returned

[PATCH v2 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure

2015-02-11 Thread Ricardo Ribalda Delgado
output of dma_map, should be used to transverse the scatter list. dma_unmap_sg needs the value passed to dma_map_sg (nents_orig). sg_free_tables uses also orig_nent. This patch fix the file to follow this paradigm. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/videobuf2

[PATCH v2 3/3] media/videobuf2-dma-vmalloc: Save output from dma_map_sg

2015-02-11 Thread Ricardo Ribalda Delgado
dma_map_sg returns the number of areas mapped by the hardware, which could be different than the areas given as an input. The output must be saved to nent. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/videobuf2-vmalloc.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v2 2/3] media/videobuf2-dma-contig: Save output from dma_map_sg

2015-02-11 Thread Ricardo Ribalda Delgado
dma_map_sg returns the number of areas mapped by the hardware, which could be different than the areas given as an input. The output must be saved to nent. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [PATCH v2 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure

2015-02-13 Thread Ricardo Ribalda Delgado
Hello Hans On Fri, Feb 13, 2015 at 4:02 PM, Hans Verkuil wrote: > Hi Ricardo, Marek, > > I have a few questions, mostly to improve my own understanding. > > First of all, is this solving an actual bug for you, or did you just find > it while reviewing code? And if it solves a bug, then which arch

Re: [PATCH v2 1/3] media/videobuf2-dma-sg: Fix handling of sg_table structure

2015-02-13 Thread Ricardo Ribalda Delgado
Hello all On Fri, Feb 13, 2015 at 4:32 PM, Hans Verkuil wrote: > Yes please. And if Ricardo is correct, then someone (janitor job?) should do > a review of dma_unmap_sg in particular. Perhaps a code snippet inside scatterlist.h will clarify even more. Would any of the maintainers accept a patc

Hardware for testing Dead Pixel API

2014-10-28 Thread Ricardo Ribalda Delgado
Hello As we discussed in the mini-summit I am interested in upstreaming an API for Dead Pixels. Since it is not viable to push my camera code, I would like to add it to an already supported camera. On the summit somebody mention a board that also has hardware support for Dead Pixels, but the dri

[PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile controls can change their value outside the v4l-ctrl framework. We should ignore the cached written value of the ctrl when evaluating if we should run s_ctrl. Signed-off-by: Ricardo Ribalda Delgado --- I have a control that tells the user when there has been a external trigger overrun

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Hello Hans I need to figure out how can you reply that fast. Thanks a lot! On Tue, Feb 17, 2015 at 12:17 PM, Hans Verkuil wrote: >> I have a control that tells the user when there has been a external trigger >> overrun. (Trigger while processing old image). This is a volatile control. > > Does

[PATCH v2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile controls can change their value outside the v4l-ctrl framework. We should ignore the cached written value of the ctrl when evaluating if we should run s_ctrl. Signed-off-by: Ricardo Ribalda Delgado --- v2: Do volatile test, once you know ctrl is not NULL drivers/media/v4l2-core/v4l2

Re: [PATCH] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Hello Hans On Tue, Feb 17, 2015 at 1:03 PM, Hans Verkuil wrote: > Should be done after the 'ctrl == NULL' check. Good catch. Fixed on v2 > >> >> if (ctrl == NULL) >> continue; >> > > There is one more change that has to be made: setting a volatile control > s

[PATCH 2/2] media/Documentation: Volatile writable

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile variables are also writable now. Update the documentation accordingly. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 7 --- Documentation/DocBook/media/v4l/vidioc-queryctrl.xml | 6 -- Documentation/video4linux/v4l2

[PATCH 1/2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile controls can change their value outside the v4l-ctrl framework. We should ignore the cached written value of the ctrl when evaluating if we should run s_ctrl. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 6 ++ 1 file changed, 6 insertions

Re: [PATCH v2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Hello Sakari On Tue, Feb 17, 2015 at 1:47 PM, Sakari Ailus wrote: > Hi Ricardo, > > Thanks for the patch! Thank you > > > Acked-by: Sakari Ailus Could you take a look to v3 of the patch Thanks! > > -- > Sakari Ailus > sakari.ai...@linux.intel.com -- Ricardo Ribalda -- To unsubscribe from

Re: [PATCH 1/2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
This is v3 of the patch. I forgot to add it to the subject. I have marked v1 and v2 as Superseded on patchwork Thanks On Tue, Feb 17, 2015 at 3:41 PM, Ricardo Ribalda Delgado wrote: > Volatile controls can change their value outside the v4l-ctrl framework. > We should ignore the cached w

[PATCH v4 1/2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile controls can change their value outside the v4l-ctrl framework. We should ignore the cached written value of the ctrl when evaluating if we should run s_ctrl. Signed-off-by: Ricardo Ribalda Delgado --- v4: Hans Verkuil: explicity set has_changed to false. and add comment drivers

[PATCH v4 2/2] media/Documentation: Volatile writable

2015-02-17 Thread Ricardo Ribalda Delgado
Volatile variables are also writable now. Update the documentation accordingly. Acked-by: Hans Verkuil Signed-off-by: Ricardo Ribalda Delgado --- v4: Hans Verkuil: Fix typos and add ack-by Hans Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 7 --- Documentation/DocBook/media/v4l

Re: [PATCH v4 1/2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-02-23 Thread Ricardo Ribalda Delgado
2015 06:07:49 GMT+07:00, Laurent Pinchart wrote: >Hi Hans, > >On Monday 23 February 2015 10:06:10 Hans Verkuil wrote: >> On 02/17/2015 04:08 PM, Ricardo Ribalda Delgado wrote: >> > Volatile controls can change their value outside the v4l-ctrl >framework. >> >

Re: [PATCH v4 1/2] media/v4l2-ctrls: Always run s_ctrl on volatile ctrls

2015-03-09 Thread Ricardo Ribalda Delgado
Hello Back from holidays and back to this issue. Sorry for the delay. > I'm not sure about Ricardo's use case, is it the one we've discussed on #v4l ? > If so, and if I recall correctly, the idea was to perform an action with a > parameter, and didn't require volatility. In my case, there is a t

[PATCH 0/5] V4L2_CTRL_FLAG_EXECUTE_ON_WRITE

2015-03-19 Thread Ricardo Ribalda Delgado
This new set of patches overrides the old patchset media/v4l2-ctrls: Always run s_ctrl on volatile ctrls with the comments from Hans and Laurent. Ricardo Ribalda Delgado (5): media/v4l2-ctrls: volatiles should not generate CH_VALUE media: New flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE media

[PATCH 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls

2015-03-19 Thread Ricardo Ribalda Delgado
Any control with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE set should return changed == true in cluster_changed. This forces the value to be passed to the driver even if it has not changed. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 4 1 file changed, 4

[PATCH 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE

2015-03-19 Thread Ricardo Ribalda Delgado
Volatile controls should not generate CH_VALUE events. Set has_changed to false to prevent this happening. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b

[PATCH 2/5] media: New flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE

2015-03-19 Thread Ricardo Ribalda Delgado
Create a new flag that represent controls that represent controls that its value needs to be passed to the driver even if it has not changed. They typically represent actions, like triggering a flash or clearing an error flag. Signed-off-by: Ricardo Ribalda Delgado --- include/uapi/linux

[PATCH 3/5] media/v4l2-ctrls: Add execute flags to write_only controls

2015-03-19 Thread Ricardo Ribalda Delgado
Any control that sets FLAG_WRITE_ONLY should OR it with FLAG_ACTION. So we can keep the current meaning of WRITE_ONLY. Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media

[PATCH 5/5] media/Documentation: New flag EXECUTE_ON_WRITE

2015-03-19 Thread Ricardo Ribalda Delgado
Document new flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, and the new behavior of CH_VALUE event on VOLATILE controls. Signed-off-by: Ricardo Ribalda Delgado --- Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 7 --- Documentation/DocBook/media/v4l/vidioc-queryctrl.xml | 15

[PATCH v2 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE

2015-03-20 Thread Ricardo Ribalda Delgado
Volatile controls should not generate CH_VALUE events. Set has_changed to false to prevent this happening. Signed-off-by: Ricardo Ribalda Delgado --- v2: By Sakari Ailus Fix CodeStyle (sorry :S) drivers/media/v4l2-core/v4l2-ctrls.c | 9 + 1 file changed, 9 insertions(+) diff --git a

[PATCH v2 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls

2015-03-20 Thread Ricardo Ribalda Delgado
Any control with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE set should return changed == true in cluster_changed. This forces the value to be passed to the driver even if it has not changed. Signed-off-by: Ricardo Ribalda Delgado --- v2: By Sakari Ailus Fix CodeStyle (sorry :S) drivers/media/v4l2-core

[PATCH v2 2/5] media: New flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE

2015-03-20 Thread Ricardo Ribalda Delgado
Create a new flag that represent controls which its value needs to be passed to the driver even if it has not changed. They typically represent actions, like triggering a flash or clearing an error flag. So writing to such a control means some action is executed. Signed-off-by: Ricardo Ribalda

[PATCH v3 4/5] media/v4l2-ctrls: Always execute EXECUTE_ON_WRITE ctrls

2015-03-20 Thread Ricardo Ribalda Delgado
Any control with V4L2_CTRL_FLAG_EXECUTE_ON_WRITE set should return changed == true in cluster_changed. This forces the value to be passed to the driver even if it has not changed. Signed-off-by: Ricardo Ribalda Delgado --- v3: Hans Verkuil Also set ctrl_changed to true when

[PATCH v2 5/5] media/Documentation: New flag EXECUTE_ON_WRITE

2015-03-20 Thread Ricardo Ribalda Delgado
Document new flag V4L2_CTRL_FLAG_EXECUTE_ON_WRITE, and the new behavior of CH_VALUE event on VOLATILE controls. Signed-off-by: Ricardo Ribalda Delgado --- v2: Hans Verkuil Fix documentation (Thanks Hans!) Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 6 +++--- Documentation/DocBook

[PATCH v2 3/5] media/v4l2-ctrls: Add execute flags to write_only controls

2015-03-20 Thread Ricardo Ribalda Delgado
Any control that sets FLAG_WRITE_ONLY should OR it with FLAG_EXECUTE_ON_WRITE. So we can keep the current meaning of WRITE_ONLY. Signed-off-by: Ricardo Ribalda Delgado --- v2: Laurent Pinchart Fix commit message drivers/media/v4l2-core/v4l2-ctrls.c | 9 ++--- 1 file changed, 6 insertions

[PATCH] libv4lconvert: Fix support for Y16 pixel format

2015-03-26 Thread Ricardo Ribalda Delgado
Y16 is a little-endian format. The original implementation assumed that it was big-endian. Signed-off-by: Ricardo Ribalda Delgado --- lib/libv4lconvert/rgbyuv.c | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/libv4lconvert/rgbyuv.c b/lib/libv4lconvert/rgbyuv.c index 0f30192

RFC: New format V4L2_PIX_FMT_Y16_BE ?

2015-03-26 Thread Ricardo Ribalda Delgado
Hello While debugging a v4l2<->gstreamer interaction problem, I have realized that we were implementing Y16 wrong in our cameras :S. What we were implementing was a big endian version of the format. If I want to add support for our Y16_BE format to the kernel, would it be enough to change videode

Re: RFC: New format V4L2_PIX_FMT_Y16_BE ?

2015-03-27 Thread Ricardo Ribalda Delgado
Hi Hans On Thu, Mar 26, 2015 at 5:46 PM, Hans Verkuil wrote: > Yes, but you might want to wait 1-2 weeks: I'm going to make a patch > that moves the ENUMFMT description into the v4l2 core. So you want to be on > top of that patch. I posted an RFC patch for that earlier (last week I > think). Ab

Re: [PATCHv2] v4l2-ioctl: fill in the description for VIDIOC_ENUM_FMT

2015-04-02 Thread Ricardo Ribalda Delgado
Hello Hans On Thu, Apr 2, 2015 at 2:40 PM, Hans Verkuil wrote: > + case V4L2_PIX_FMT_Y16: descr = "16-bit Greyscale"; break; What about "16-bit Greyscale LE" ? Regards! -- Ricardo Ribalda -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body

Re: [PATCH v2 1/5] media/v4l2-ctrls: volatiles should not generate CH_VALUE

2015-04-21 Thread Ricardo Ribalda Delgado
Hello Laurent On Tue, Apr 21, 2015 at 7:44 PM, Laurent Pinchart wrote: > Hi Ricardo, > > Thank you for the patch, and sorry for the late review (so late that the patch > has already been merged). No worries. > > On Friday 20 March 2015 14:30:46 Ricardo Ribalda Delgado

Re: [ATTN] Please review/check the REVIEWv4 compound control patch series

2014-07-17 Thread Ricardo Ribalda Delgado
Hello Hans I am planning to test this patchset for dead pixels by the end of this week and the beggining of the next. I am thinking about comparing the performance a list of deadpixels against a list of all pixels with their property (ok pixel, dead pixel, white pixel, slow pixel...) Will write b

Re: vb2_reqbufs() is not allowing more than VIDEO_MAX_FRAME

2014-07-21 Thread Ricardo Ribalda Delgado
Why dont you use git send-email ? On Mon, Jul 21, 2014 at 8:03 AM, Divneil Wadhawan wrote: > > Hi Hans, > >> This patch is all messed up and doesn't apply. >> >> Check your mailer settings: it clearly replaced hard tabs by a space. >> >> Can you repost? > > I tried to find out if I can change the

[PATCH] media/v4l2-ctrl: Support for pixel type

2014-07-25 Thread Ricardo Ribalda Delgado
control whould be useful for anybody else. If there is a need for this kind of control I will resend this patch with changes in the Documentation and the required changes on v4l-utils. Thanks! Signed-off-by: Ricardo Ribalda Delgado --- drivers/media/v4l2-core/v4l2-ctrls.c | 8 include

Re: [ATTN] Please review/check the REVIEWv4 compound control patch series

2014-07-25 Thread Ricardo Ribalda Delgado
Hello Hans Guess it is too late, but just so you know. I have successfully uses this patches to implement a dead pixel array list. Tested-by: Ricardo Ribalda Thanked-by: Ricardo Ribalda :) Thanks! On Thu, Jul 17, 2014 at 3:56 PM, Ricardo Ribalda Delgado wrote: > Hello Hans >

Re: [ATTN] Please review/check the REVIEWv4 compound control patch series

2014-07-25 Thread Ricardo Ribalda Delgado
000 lines of code, plus 200 MB in firmware files. Once we are ready to launch the product to a wider market we will upstream it, now it will just annoy a lot of people. Thanks On Fri, Jul 25, 2014 at 1:56 PM, Hans Verkuil wrote: > Hi Ricardo, > > On 07/25/14 13:52, Ricardo Ribalda D

Re: [ATTN] Please review/check the REVIEWv4 compound control patch series

2014-07-25 Thread Ricardo Ribalda Delgado
Hi Hans! > I was thinking of just the sensor driver, not the other components. > That would provide a proper use-case for both the dead pixel array > and multi-selection. > > I assume that the sensor driver is a lot smaller? Does it need fw as well? > We support multiple sensors. The one that req

Re: [media-workshop] [ANNOUNCE] Linux Kernel Media mini-summit on Oct, 16-17 in Düsseldorf, Germany

2014-08-19 Thread Ricardo Ribalda Delgado
Hello I will also be in Düsseldorf the whole week for ELCE and LPC. I would love to attend the media mini-summit. I am interested in multiselection, deadpixels API and multiple timestamps per buffer. Thank you very much! On Thu, Aug 14, 2014 at 1:43 PM, Laurent Pinchart wrote: > Hi Mauro, > >

Re: [media-workshop] [ANNOUNCE] Linux Kernel Media mini-summit on Oct, 16-17 in Düsseldorf, Germany

2014-08-19 Thread Ricardo Ribalda Delgado
Hello Laurent > Could you elaborate a bit on that last point ? What kind of timestamps would > you need, and what are the use cases ? Right now we only have one timestamp field on the buffer structure, it might be a good idea to leave space for some more. My user case is a camera that is recordi

Status of g_webcam uvc-gadget

2014-08-27 Thread Ricardo Ribalda Delgado
Hello Is somebody using/supporting g_webcam? The only reference userland server is uvc-gadget from http://git.ideasonboard.org/?p=uvc-gadget.git;a=summary ? I have an industrial fpga camera that speaks v4l2, my plan is to export it as an uvc camera via usb3380 as a debug interface. Thanks! --

<    1   2   3   4   5