Re: [PATCH] input/touchscreen/sur40: use COLORSPACE_RAW

2019-06-28 Thread Florian Echtler
On 27.06.19 10:20, Hans Verkuil wrote: > On 6/27/19 10:12 AM, Florian Echtler wrote: >> On 26.06.19 11:52, Hans Verkuil wrote: >>> This driver set the colorspace to SRGB, but that makes no sense for >>> a touchscreen. Use RAW instead. This also ensures consistency with t

Re: [PATCH] input/touchscreen/sur40: use COLORSPACE_RAW

2019-06-27 Thread Florian Echtler
On 26.06.19 11:52, Hans Verkuil wrote: > This driver set the colorspace to SRGB, but that makes no sense for > a touchscreen. Use RAW instead. This also ensures consistency with the > v4l_pix_format_touch() call that's used in v4l2-ioctl.c. One question for clarification: this will only affect use

Re: [PATCH 5/7 RESEND] touchscreen/sur40: set device_caps in struct video_device

2019-06-12 Thread Florian Echtler
Sorry, didn't realize you'd also need my feedback. No complaints. Acked-by: Florian Echtler Best, Florian On 04.06.19 18:06, Dmitry Torokhov wrote: > Hi Hans, > > On Tue, Jun 04, 2019 at 02:36:27PM +0200, Hans Verkuil wrote: >> Instead of filling in the struct v4

Re: exposing a large-ish calibration table through V4L2?

2018-02-14 Thread Florian Echtler
Hello Hans, On 14.02.2018 13:13, Hans Verkuil wrote: > > On 14/02/18 13:09, Florian Echtler wrote: >> >> The internal device memory contains a table with two bytes for each sensor >> pixel >> (i.e. 960x540x2 = 1036800 bytes) that basically provide individual black

exposing a large-ish calibration table through V4L2?

2018-02-14 Thread Florian Echtler
Hello Hans, I've picked up work on the sur40 driver again recently. There is one major feature left that is currently unsupported by the Linux driver, which is the hardware-based calibration. The internal device memory contains a table with two bytes for each sensor pixel (i.e. 960x540x2 = 103680

[PATCH 4/4] add video control handlers using V4L2 control framework

2018-02-08 Thread Florian Echtler
This patch registers four standard control handlers using the corresponding V4L2 framework. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 64 +++ 1 file changed, 64 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b

[PATCH 2/4] add default settings and module parameters for video controls

2018-02-08 Thread Florian Echtler
This patch adds parameter definitions and module parameters for the four userspace controls that the SUR40 can currently provide. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/input

[PATCH v4] add video controls for SUR40 driver

2018-02-08 Thread Florian Echtler
Iteration 4, now with min/max values for module parameters. Best regards, Florian

[PATCH 1/4] add missing blob structure field for tag id

2018-02-08 Thread Florian Echtler
The SUR40 can recognize specific printed patterns directly in hardware; this information (i.e. the pattern id) is present but currently unused in the blob structure. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH 3/4] add panel register access functions

2018-02-08 Thread Florian Echtler
ned-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 75 +++ 1 file changed, 75 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8a5b031..d6fa25e 100644 --- a/drivers/input/touchscreen/sur

[PATCH v3] add video controls for SUR40 driver

2018-02-07 Thread Florian Echtler
As discussed previously, here's the third iteration of my patch to add control functions for the SUR40 driver, with (hopefully) correct handling of default values/module parameters, using the V4L2 control framework. Best regards, Florian

[PATCH 3/4] add panel register access functions

2018-02-07 Thread Florian Echtler
ned-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 75 +++ 1 file changed, 75 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8a5b031..d6fa25e 100644 --- a/drivers/input/touchscreen/sur

[PATCH 1/4] add missing blob structure field for tag id

2018-02-07 Thread Florian Echtler
The SUR40 can recognize specific printed patterns directly in hardware; this information (i.e. the pattern id) is present but currently unused in the blob structure. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

[PATCH 2/4] add default settings and module parameters for video controls

2018-02-07 Thread Florian Echtler
This patch adds parameter definitions and module parameters for the four userspace controls that the SUR40 can currently provide. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 28 1 file changed, 28 insertions(+) diff --git a/drivers/input

[PATCH 4/4] add video control handlers using V4L2 control framework

2018-02-07 Thread Florian Echtler
This patch registers four standard control handlers using the corresponding V4L2 framework. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 64 +++ 1 file changed, 64 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b

Re: [PATCH 5/5] add module parameters for default values

2018-02-07 Thread Florian Echtler
On 06.02.2018 22:31, Hans Verkuil wrote: > On 02/06/2018 10:01 PM, Florian Echtler wrote: >> To allow setting custom parameters for the sensor directly at startup, the >> three primary controls are exposed as module parameters in this patch. >> >> +/* module pa

Re: [PATCH 1/5] add missing blob structure field for tag id

2018-02-07 Thread Florian Echtler
On 06.02.2018 22:22, Hans Verkuil wrote: > On 02/06/2018 10:01 PM, Florian Echtler wrote: >> The SUR40 can recognize specific printed patterns directly in hardware; >> this information (i.e. the pattern id) is present but currently unused >> in the blob structure. >&g

[PATCH 2/5] add control definitions

2018-02-06 Thread Florian Echtler
This patch adds parameter definitions for the four userspace controls that the SUR40 can currently provide. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers

[PATCH 4/5] register control handlers using V4L2 control framework

2018-02-06 Thread Florian Echtler
This patch registers four standard control handlers using the corresponding V4L2 framework. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 51 +++ 1 file changed, 51 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b

[PATCH 3/5] add panel register access functions

2018-02-06 Thread Florian Echtler
ned-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 71 +++ 1 file changed, 71 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 3af63415..7f6461d 100644 --- a/drivers/input/touchscreen/sur

[PATCH 5/5] add module parameters for default values

2018-02-06 Thread Florian Echtler
To allow setting custom parameters for the sensor directly at startup, the three primary controls are exposed as module parameters in this patch. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 16 1 file changed, 16 insertions(+) diff --git a/drivers

[PATCH v2] [RFC] add video controls for SUR40 driver

2018-02-06 Thread Florian Echtler
As discussed previously, here's a second iteration of my patch to add control functions for the SUR40 driver, now using the V4L2 control framework.

[PATCH 1/5] add missing blob structure field for tag id

2018-02-06 Thread Florian Echtler
The SUR40 can recognize specific printed patterns directly in hardware; this information (i.e. the pattern id) is present but currently unused in the blob structure. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 - 1 file changed, 4 insertions(+), 1 deletion

Re: [PATCH 5/5] add default control values as module parameters

2018-02-06 Thread Florian Echtler
On 05.02.2018 15:56, Hans Verkuil wrote: > Please add a change log when you make a patch. > I for one would like to know why this has to be supplied as a module option. The idea here was that each individual SUR40 device will likely have slightly different "ideal" settings for the parameters, and

Re: [PATCH 4/5] add V4L2 control functions

2018-02-05 Thread Florian Echtler
Hello Hans, On Mon, 5 Feb 2018, Hans Verkuil wrote: On 02/05/2018 03:29 PM, Florian Echtler wrote: + +static int sur40_vidioc_queryctrl(struct file *file, void *fh, + struct v4l2_queryctrl *qc) Sorry, but this is very wrong. Use the control framework instead. See

[PATCH 4/5] add V4L2 control functions

2018-02-05 Thread Florian Echtler
Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 114 ++ 1 file changed, 114 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 63c7264b..c4b7cf1 100644 --- a/drivers/input/touchscreen

[PATCH 3/5] add video control register handlers

2018-02-05 Thread Florian Echtler
Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 70 +++ 1 file changed, 70 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 0dbb004..63c7264b 100644 --- a/drivers/input/touchscreen

[PATCH 5/5] add default control values as module parameters

2018-02-05 Thread Florian Echtler
Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index c4b7cf1..d612f3f 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input

[PATCH 0/5] [RFC] add video controls to SUR40 driver

2018-02-05 Thread Florian Echtler
The SUR40 (aka Pixelsense) has internal registers that expose sensor parameters such as brightness, gain etc. This patch creates V4L2 control items and maps them to the appropriate parameters. This is an initial submission for review, comments welcome! Best regards, Florian

[PATCH 1/5] add missing blob structure tag field

2018-02-05 Thread Florian Echtler
Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index f16f835..8375b06 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers

[PATCH 2/5] add video control register definitions

2018-02-05 Thread Florian Echtler
Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 24 1 file changed, 24 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8375b06..0dbb004 100644 --- a/drivers/input/touchscreen/sur40.c +++ b

Re: Regression on 4.10 with Logitech Quickcam Sphere

2017-10-04 Thread Florian Echtler
Hello again, solved it myself, posting here for the record. Solution is to install uvcdynctrl and running uvcdynctrl -i /usr/share/uvcdynctrl/data/046d/logitech.xml And voila, custom controls back again. Not well documented, but hey. Best regards, Florian On Sun, 1 Oct 2017, Florian Echtler

Regression on 4.10 with Logitech Quickcam Sphere

2017-10-01 Thread Florian Echtler
Hello everyone, I recently upgraded from a 4.4 kernel to 4.10, and found that my Logitech Quickcam Sphere now behaves differently. More specifically, the pan/tilt controls do not work anymore - in fact, they are completely gone from "v4l2-ctl -L". In dmesg, I'm getting these messages: [

[RFC] [sur40] mapping of sensor parameters to V4L2?

2017-01-03 Thread Florian Echtler
Hi everyone, next chapter in the neverending story of reverse-engineering the SUR40: I've identified a couple of internal LCD panel registers which control some aspects of the built-in image sensor. In particular, these are called "Video Voltage", "Video Bias", and "IR Illumination Level". N

Re: [PATCH v2 1/3] sur40: properly report a single frame rate of 60 FPS

2016-07-06 Thread Florian Echtler
On 06.07.2016 10:40, Hans Verkuil wrote: > On 07/05/16 09:06, Hans Verkuil wrote: >> On 07/05/2016 08:56 AM, Florian Echtler wrote: >>> On 05.07.2016 08:41, Hans Verkuil wrote: >>>> >>>> Why is s_parm added when you can't change the framerate? >

Re: [PATCH v2 1/3] sur40: properly report a single frame rate of 60 FPS

2016-07-04 Thread Florian Echtler
Hello Hans, On 05.07.2016 08:41, Hans Verkuil wrote: > On 05/31/2016 10:15 PM, Florian Echtler wrote: >> The device hardware is always running at 60 FPS, so report this both via >> PARM_IOCTL and ENUM_FRAMEINTERVALS. >> >> Signed-off-by: Martin Kaltenbrunner >&g

Re: [GIT PULL FOR v4.8] Various fixes/improvements

2016-07-04 Thread Florian Echtler
Hello Hans, On 01.07.2016 16:45, Hans Verkuil wrote: > Florian Echtler (3): > sur40: properly report a single frame rate of 60 FPS > sur40: lower poll interval to fix occasional FPS drops to ~56 FPS > sur40: fix occasional oopses on device close Thanks for merging

Re: [PATCH v6 11/11] Input: sur40 - use new V4L2 touch input type

2016-07-03 Thread Florian Echtler
On 30.06.2016 19:38, Nick Dyer wrote: > Support both V4L2_TCH_FMT_TU08 and V4L2_PIX_FMT_GREY for backwards > compatibility. > > Note: I have not tested these changes (I have no access to the hardware) > so not signing off. I will try to test this ASAP. However, I'm currently ill, so it might take

Re: [PATCH v5 9/9] Input: sur40 - use new V4L2 touch input type

2016-06-22 Thread Florian Echtler
On 23.06.2016 00:08, Nick Dyer wrote: > diff --git a/drivers/input/touchscreen/sur40.c > b/drivers/input/touchscreen/sur40.c > index 880c40b..841e045 100644 > --- a/drivers/input/touchscreen/sur40.c > +++ b/drivers/input/touchscreen/sur40.c > @@ -599,7 +599,7 @@ static int sur40_probe(struct usb_i

Re: [PATCH v4 2/9] [media] v4l2-core: Add VFL_TYPE_TOUCH_SENSOR

2016-06-22 Thread Florian Echtler
On Wed, 22 Jun 2016, Nick Dyer wrote: On 22/06/2016 12:48, Florian Echtler wrote: On 20.06.2016 14:00, Hans Verkuil wrote: On 06/17/2016 04:16 PM, Nick Dyer wrote: Use a new device prefix v4l-touch for these devices, to stop generic capture software from treating them as webcams. Come to

Re: [PATCH v4 2/9] [media] v4l2-core: Add VFL_TYPE_TOUCH_SENSOR

2016-06-22 Thread Florian Echtler
On 20.06.2016 14:00, Hans Verkuil wrote: > On 06/17/2016 04:16 PM, Nick Dyer wrote: >> Some touch controllers send out raw touch data in a similar way to a >> greyscale frame grabber. Add a new device type for these devices. >> >> Use a new device prefix v4l-touch for these devices, to stop generic

sur40: DMA-SG and performance question

2016-06-19 Thread Florian Echtler
Hello everyone, I've been doing some latency testing on my sur40 driver, and I've measured over 160 ms of round-trip delay (with an external high-speed camera, delay between lighting up an LED and seeing the on-screen response in the video stream). I'm aware that this value has to factor in scree

[PATCH v2 3/3] sur40: fix occasional oopses on device close

2016-05-31 Thread Florian Echtler
Closing the V4L2 device sometimes triggers a kernel oops. Present patch fixes this. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c

[PATCH v2 1/3] sur40: properly report a single frame rate of 60 FPS

2016-05-31 Thread Florian Echtler
The device hardware is always running at 60 FPS, so report this both via PARM_IOCTL and ENUM_FRAMEINTERVALS. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions

[PATCH v2 2/3] sur40: lower poll interval to fix occasional FPS drops to ~56 FPS

2016-05-31 Thread Florian Echtler
The framerate sometimes drops below 60 Hz if the poll interval is too high. Lowering it to the minimum of 1 ms fixes this. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH 1/3] properly report a single frame rate of 60 FPS

2016-05-30 Thread Florian Echtler
Hello Hans, On 23.05.2016 12:45, Hans Verkuil wrote: >> +static int sur40_ioctl_parm(struct file *file, void *priv, >> +struct v4l2_streamparm *p) >> +{ >> +if (p->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) { >> +p->parm.capture.timeperframe.numerator = 1; >> +

[PATCH 1/3] properly report a single frame rate of 60 FPS

2016-05-13 Thread Florian Echtler
The device hardware is always running at 60 FPS, so report this both via PARM_IOCTL and ENUM_FRAMEINTERVALS. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff

[PATCH 3/3] fix occasional oopses on device close

2016-05-13 Thread Florian Echtler
Closing the V4L2 device sometimes triggers a kernel oops. Present patch fixes this. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c

[PATCH 2/3] lower poll interval to fix occasional FPS drops to ~56 FPS

2016-05-13 Thread Florian Echtler
The framerate sometimes drops below 60 Hz if the poll interval is too high. Lowering it to the minimum of 1 ms fixes this. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: sur40.c:undefined reference to `video_unregister_device'

2015-07-05 Thread Florian Echtler
I do still plan to fix this, but I have no idea right now how this can actually happen: if TOUCHSCREEN_SUR40 is enabled, then this will enable VIDEOBUF2_DMA_SG, and that will select most of the other V4L2 modules in turn - or am I missing something here? Best, Florian1 On 04.07.2015 19:56, kbuild

[PATCHv2 4/4] return BUF_STATE_ERROR if streaming stopped during acquisition

2015-05-25 Thread Florian Echtler
Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8add986..8be7b9b 100644 --- a/drivers/input/touchscreen/sur40.c +++ b/drivers/input

[PATCHv2 2/4] add frame size/frame rate query functions

2015-05-25 Thread Florian Echtler
. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index e707b8d..d860d05 100644 --- a

[PATCHv2 3/4] add extra debug output, remove noisy warning

2015-05-25 Thread Florian Echtler
Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index d860d05..8add986 100644 --- a/drivers/input/touchscreen/sur40.c +++ b

[PATCHv2 1/4] reduce poll interval to allow full 60 FPS framerate

2015-05-25 Thread Florian Echtler
without blocking all the time and still allowing for a bit of timing jitter, we reduce the poll interval to 4 ms. Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCHv2 0/4] [sur40] minor fixes & performance improvements

2015-05-25 Thread Florian Echtler
This patch series adds several small fixes, features & performance improvements. Many thanks to Martin Kaltenbrunner for testing the original driver & submitting the patches. Martin Kaltenbrunner (4): reduce poll interval to allow full 60 FPS framerate add frame size/frame rate query function

Re: [PATCH 0/4] [sur40] minor fixes & performance improvements

2015-05-25 Thread Florian Echtler
On 25.05.2015 13:22, Hans Verkuil wrote: > On 05/21/2015 02:29 PM, Florian Echtler wrote: >> This patch series adds several small fixes, features & performance >> improvements. Many thanks to Martin Kaltenbrunner for testing the >> original driver & submitting the pa

[PATCH 0/4] [sur40] minor fixes & performance improvements

2015-05-21 Thread Florian Echtler
This patch series adds several small fixes, features & performance improvements. Many thanks to Martin Kaltenbrunner for testing the original driver & submitting the patches. Martin Kaltenbrunner (4): reduce poll interval to allow full 60 FPS framerate add frame size/frame rate query function

[PATCH 3/4] add extra debug output, remove noisy warning

2015-05-21 Thread Florian Echtler
Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index d860d05..8add986 100644 --- a/drivers

[PATCH 1/4] reduce poll interval to allow full 60 FPS framerate

2015-05-21 Thread Florian Echtler
Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index a24eba5..e707b8d 100644 --- a/drivers/input

[PATCH 2/4] add frame size/frame rate query functions

2015-05-21 Thread Florian Echtler
Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index e707b8d..d860d05 100644 --- a

[PATCH 4/4] return BUF_STATE_ERROR if streaming stopped during acquisition

2015-05-21 Thread Florian Echtler
Signed-off-by: Martin Kaltenbrunner Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8add986..8be7b9b 100644 --- a/drivers/input/touchscreen

[PATCH] sur40: fix occasional hard freeze due to buffer queue underrun

2015-03-31 Thread Florian Echtler
n the spinlock is taken and sur40_poll attempts to fetch the next buffer from buf_list, the list is in fact empty. This patch needs to be applied on top of the queued one adding V4L2 support to the sur40 driver. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 + 1

Re: input_polldev interval (was Re: [sur40] Debugging a race condition)?

2015-03-27 Thread Florian Echtler
Hello Antonio, On 26.03.2015 22:10, Antonio Ospite wrote: > On Wed, 25 Mar 2015 15:10:44 +0100 > Florian Echtler wrote: >> >> Thanks - any other suggestions how to debug such a complete freeze? I >> have the following options enabled in my kernel config: >> &g

Re: input_polldev interval (was Re: [sur40] Debugging a race condition)?

2015-03-25 Thread Florian Echtler
Hello Dmitry, On 25.03.2015 14:23, Dmitry Torokhov wrote: > On March 24, 2015 11:52:54 PM PDT, Florian Echtler > wrote: >> Currently, I'm setting the interval for input_polldev to 10 ms. >> However, with video data being retrieved at the same time, it's quite >&

input_polldev interval (was Re: [sur40] Debugging a race condition)?

2015-03-24 Thread Florian Echtler
than that. Could this ultimately be the reason? What happens if a new poll() call is scheduled before the previous one completes? Best, Florian On March 23, 2015 4:47:19 PM CET, Florian Echtler wrote: >Additional note: this happens almost never with the original code using >dma-contig, which

Re: [sur40] Debugging a race condition?

2015-03-23 Thread Florian Echtler
e that can help somebody in narrowing down the reason of the problem? Best, Florian On 23.03.2015 12:57, Florian Echtler wrote: > Hello everyone, > > now that I'm using the newly merged sur40 video driver in a development > environment, I've noticed that a custom V4L2 appl

[sur40] Debugging a race condition?

2015-03-23 Thread Florian Echtler
Hello everyone, now that I'm using the newly merged sur40 video driver in a development environment, I've noticed that a custom V4L2 application we've been using in our lab will sometimes trigger a hard lockup of the machine (_nothing_ works anymore, no VT switching, no network, not even Magic Sys

Re: [GIT PULL FOR v4.1] sur40 driver and two small DocBook fixes

2015-03-16 Thread Florian Echtler
gt; > git://linuxtv.org/hverkuil/media_tree.git for-v4.1m > > for you to fetch changes up to 69dc25b1cd764181a6b8c5b16b753ab645b3d55b: > > add raw video stream support for Samsung SUR40 (2015-03-16 12:43:10 +0100) > >

[PATCH v5] add raw video stream support for Samsung SUR40

2015-03-16 Thread Florian Echtler
This patch adds raw video support for the Samsung SUR40 using vbuf2-dma-sg. All tests from v4l2-compliance pass. Support for VB2_USERPTR is currently disabled due to unexpected interference with dma-sg buffer sizes. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/Kconfig | 2

Re: [PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-03-16 Thread Florian Echtler
Hello Hans, On 15.03.2015 17:26, Hans Verkuil wrote: > On 03/12/2015 08:37 PM, Florian Echtler wrote: >> On 09.03.2015 15:02, Hans Verkuil wrote: >>> On 03/09/2015 02:45 PM, Florian Echtler wrote: >>>> On 09.03.2015 11:09, Hans Verkuil wrote: >>>&

[PATCH v4] add raw video stream support for Samsung SUR40

2015-03-16 Thread Florian Echtler
This patch adds raw video support for the Samsung SUR40 using vbuf2-dma-sg. All tests from v4l2-compliance pass. Support for VB2_USERPTR is currently disabled due to unexpected interference with dma-sg buffer sizes. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/Kconfig | 2

Re: [PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-03-12 Thread Florian Echtler
Hello Hans, On 09.03.2015 15:02, Hans Verkuil wrote: > On 03/09/2015 02:45 PM, Florian Echtler wrote: >> On 09.03.2015 11:09, Hans Verkuil wrote: >>> The error almost certainly comes from usb_submit_urb(). That function does >>> some >>> checks on the sgl: >

Re: [PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-03-09 Thread Florian Echtler
On 09.03.2015 11:09, Hans Verkuil wrote: > Hi Florian, > > OK, the cause of this failure is this message: > > Mar 9 10:39:08 sur40 kernel: [ 1093.200960] sur40 2-1:1.0: error in > usb_sg_wait > > So you need to print the error message here (sgr.status) so that I can see > what > it is. I've a

Re: [PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-03-06 Thread Florian Echtler
On 21.02.2015 11:22, Hans Verkuil wrote: > On 02/20/2015 10:46 PM, Florian Echtler wrote: >> On 16.02.2015 12:40, Hans Verkuil wrote: >>> On 02/11/2015 12:52 PM, Florian Echtler wrote: >>> I prefer to dig into this a little bit more, as I don't really understan

Re: [PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-02-20 Thread Florian Echtler
On 16.02.2015 12:40, Hans Verkuil wrote: > On 02/11/2015 12:52 PM, Florian Echtler wrote: >> does anyone have any suggestions why USERPTR still fails with dma-sg? >> >> Could I just disable the corresponding capability for the moment so that >> the patch could perhaps

Re: [PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-02-11 Thread Florian Echtler
Hello again, does anyone have any suggestions why USERPTR still fails with dma-sg? Could I just disable the corresponding capability for the moment so that the patch could perhaps be merged, and investigate this separately? Best, Florian On 04.02.2015 16:30, Florian Echtler wrote: > This pa

[PATCH v3][RFC] add raw video stream support for Samsung SUR40

2015-02-04 Thread Florian Echtler
This patch adds raw video support for the Samsung SUR40, now finally using videobuf2-dma-sg and the usb_sg_init/_wait helper functions. Further comments regarding buffer handling are invited, as v4l2-compliance -s still fails the USERPTR test. Signed-off-by: Florian Echtler --- drivers/input

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-02-04 Thread Florian Echtler
Hello everyone, On 04.02.2015 12:39, Hans Verkuil wrote: > On 02/04/15 12:34, Laurent Pinchart wrote: >> On Wednesday 04 February 2015 11:56:58 Florian Echtler wrote: >>> That's what I assumed, however, I'm running into the same problem as >>> with dma-sg

[PATCH v2][RFC] add raw video support for Samsung SUR40 touchscreen

2015-02-04 Thread Florian Echtler
t, specify --expbuf-device Total: 45, Succeeded: 44, Failed: 1, Warnings: 0 Signed-off-by: Florian Echtler --- drivers/input/touchscreen/Kconfig | 2 + drivers/input/touchscreen/sur40.c | 422 -- 2 files changed, 412 insertions(+), 12 deletions(-) diff --git a/dri

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-02-04 Thread Florian Echtler
On 04.02.2015 11:22, Hans Verkuil wrote: > On 02/04/15 11:08, Florian Echtler wrote: >> On 04.02.2015 09:08, Hans Verkuil wrote: >>> You can also make a version with vmalloc and I'll merge that, and then >>> you can look more into the DMA issues. That way the dri

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-02-04 Thread Florian Echtler
Hello Hans, On 04.02.2015 09:08, Hans Verkuil wrote: > I remain very skeptical about the use of dma-contig (or dma-sg for that > matter). Have you tried using vmalloc and check if the USB core isn't > automatically using DMA transfers for that? > > Basically I would like to see proof that vmalloc

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-02-03 Thread Florian Echtler
Sorry to bring this up again, but would it be acceptable to simply use dma-contig after all? Since the GFP_DMA flag is gone, this shouldn't be too big of an issue IMHO, and I was kind of hoping the patch could still be part of 3.20. Best, Florian On 29.01.2015 22:35, Florian Echtler wrote:

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-01-29 Thread Florian Echtler
Hello again, On 21.01.2015 14:29, Hans Verkuil wrote: > On 01/21/15 14:28, Florian Echtler wrote: >> On 20.01.2015 14:06, Laurent Pinchart wrote: >>> That depends on the platform and whether it can DMA to vmalloc'ed memory >>> :-) >>> To be totally saf

Re: [RFC PATCH 0/3] Introduce IIO interface for fingerprint sensors

2015-01-23 Thread Florian Echtler
Hello Teodora, On 23.01.2015 14:05, Baluta, Teodora wrote: > The fingerprint sensor acts more like a scanner device, so the > closest type is the V4L2_CAP_VIDEO_CAPTURE. However, this is not a > perfect match because the driver only sends an image, once, when > triggered. Would it be a better alte

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-01-21 Thread Florian Echtler
Hello everyone, On 20.01.2015 14:06, Laurent Pinchart wrote: > On Tuesday 20 January 2015 14:03:00 Hans Verkuil wrote: >> On 01/20/15 13:59, Laurent Pinchart wrote: >>> On Tuesday 20 January 2015 10:30:07 Hans Verkuil wrote: I've CC-ed Laurent, I think he knows a lot more about this than I do

Re: [PATCH] add raw video support for Samsung SUR40 touchscreen

2015-01-20 Thread Florian Echtler
Hello Hans, On 19.01.2015 11:38, Hans Verkuil wrote: > Sorry for the delay. No problem, thanks for your feedback. >> Note: I'm intentionally using dma-contig instead of vmalloc, as the USB >> core apparently _will_ try to use DMA for larger bulk transfers. > As far as I can tell from looking thr

[PATCH] add raw video support for Samsung SUR40 touchscreen

2015-01-07 Thread Florian Echtler
://floe.butterbrot.org/external/results.txt for details). Note: I'm intentionally using dma-contig instead of vmalloc, as the USB core apparently _will_ try to use DMA for larger bulk transfers. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c

Re: [RFC] [Patch] implement video driver for sur40

2015-01-06 Thread Florian Echtler
On 06.01.2015 11:23, Hans Verkuil wrote: > On 01/06/2015 11:17 AM, Florian Echtler wrote: >>> You're not filling in the 'field' field of struct v4l2_buffer when >>> returning a >>> frame. It should most likely be FIELD_NONE in your case. >>>&g

Re: [RFC] [Patch] implement video driver for sur40

2015-01-06 Thread Florian Echtler
On 06.01.2015 10:36, Hans Verkuil wrote: > On 01/06/2015 10:29 AM, Florian Echtler wrote: >> There's only one failing test left, which is this one: >> >> Streaming ioctls: >> test read/write: OK >> fail: v4l2-test-buffers.cpp(284): g_fie

Re: [RFC] [Patch] implement video driver for sur40

2015-01-06 Thread Florian Echtler
On Fri, 19 Dec 2014, Hans Verkuil wrote: drivers/media remains under heavy development, so for video capture drivers like yours you should always patch against either the mainline linux tree or (preferred) the media_tree.git repo (git://linuxtv.org/media_tree.git, master branch). As per your sugg

Re: [RFC] [Patch] implement video driver for sur40

2014-12-19 Thread Florian Echtler
On 19.12.2014 15:36, Hans Verkuil wrote: > On 12/19/2014 03:30 PM, Florian Echtler wrote: >> Ran the most recent version from git master, got a total of 6 fails, 4 >> of which are probably easy fixes: >> >>> fail: v4l2-compliance.cpp(306): missing bus_info prefix (&#x

Re: [RFC] [Patch] implement video driver for sur40

2014-12-19 Thread Florian Echtler
On 18.12.2014 15:11, Hans Verkuil wrote: > Run as 'v4l2-compliance -s' (-s starts streaming tests as well and it > assumes you have a valid input signal). > Mail if you have any questions about the v4l2-compliance output. The failure > messages expect you to look at the v4l2-compliance source code

[RFC] [Patch] implement video driver for sur40

2014-12-18 Thread Florian Echtler
Hello everyone, as promised, I've finally implemented the missing raw video feature for the SUR40 touchscreen. Since this is a bit of a weird hybrid device (multitouch input as well as video), I'm hoping for comments from both communities (linux-input and linux-media). I'm also attaching the full

Re: [RFC] video support for Samsung SUR40

2014-12-16 Thread Florian Echtler
On 15.12.2014 23:34, Hans Verkuil wrote: > On 12/15/2014 11:15 PM, Florian Echtler wrote: >> On 15.12.2014 17:01, Hans Verkuil wrote: >>> On 12/15/2014 04:47 PM, Florian Echtler wrote: >>> Why on earth is sur40_poll doing anything with video buffers? That's >>

Re: [RFC] video support for Samsung SUR40

2014-12-15 Thread Florian Echtler
Hello Hans, On 15.12.2014 17:01, Hans Verkuil wrote: > On 12/15/2014 04:47 PM, Florian Echtler wrote: >> However, I'm running into an issue I have a hard time understanding. In >> particular, as soon as I load the kernel module, I'm getting a kernel >> oops (NULL p

[RFC] video support for Samsung SUR40

2014-12-15 Thread Florian Echtler
Hi everyone, I'm currently working on adding raw sensor video support for the Samsung SUR40 touchscreen. I've finally found some useful documentation about videobuf2, and added the required functions to the driver (without actually delivering data so far, I just wanted to try and stream empty fram

[sur40] videobuf2 and/or DMA?

2014-12-08 Thread Florian Echtler
Hello everyone, I'm preparing to finally add support for the raw sensor video stream to my driver for the SUR40 touchscreen. However, after an extensive amount of Googling, I'm still not clear on the relationship between DMA transfers, the USB core and the videobuf2 framework. Specifically, I'd l

gspca_vc032x: Sensor MI1320 in Samsung Q1 Ultra not working

2009-09-02 Thread Florian Echtler
Hello everyone, I've installed the latest & greatest v4l drivers from http://linuxtv.org/hg/~jfrancois/gspca/ and tried to use the camera on a Samsung Q1 Ultra with them. The camera reports as Bus 001 Device 005: ID 0ac8:c301 Z-Star Microelectronics Corp. and the gspca_vc032x driver recognizes