On Tue, Dec 17, 2024 at 10:39 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Add vblank control to allow changing the framerate /
> higher exposure values.
>
> The vblank and hblank controls are needed for libcamera support.
>
> While at it, fix the minimal exposure time accor
off().
>
> Signed-off-by: André Apitzsch
Acked-by: Ricardo Ribalda
> ---
> drivers/media/i2c/imx214.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
> i
Hi Andre
On Mon, Dec 16, 2024 at 10:01 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Port the imx214 sensor driver to use the subdev active state.
>
> Move all the format configuration to the subdevice state and simplify
> the format handling, locking and initialization.
>
>
> > Is the handler->lock held when we call this function?
>
> I'm not sure how to test this.
>
> > Can you try
> > running the code with lockdep?
>
> /proc/lockdep contains
>
> > f9299231 FD: 89 BD:6 +.+.: imx214:901:(&imx214->ctrls)->_lock
>
> (no idea how to interpret this line)
>
>
On Sun, Dec 8, 2024 at 10:35 PM André Apitzsch wrote:
>
> Hi Ricardo,
>
> Am Sonntag, dem 08.12.2024 um 21:59 +0100 schrieb Ricardo Ribalda
> Delgado:
> > In general it looks good to me (besides the comments, ignore the nits
> > if you want to).
> >
> > I
On Sun, Dec 8, 2024 at 9:59 PM Ricardo Ribalda Delgado
wrote:
>
> In general it looks good to me (besides the comments, ignore the nits
> if you want to).
>
> I'd recommend that you test with lockdep to make sure that we are not
> missing anything, and I'd like to hea
Acked-by: Ricardo Ribalda
On Sat, Dec 7, 2024 at 9:48 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The imx214 camera is capable of either two-lane or four-lane operation.
>
> Currently only the four-lane mode is supported, as proper pixel rates
> an
Acked-by: Ricardo Ribalda
nit: media: i2c: imx214: Fix link frequency validation
On Sat, Dec 7, 2024 at 9:49 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then
> IMX214_DEF
In general it looks good to me (besides the comments, ignore the nits
if you want to).
I'd recommend that you test with lockdep to make sure that we are not
missing anything, and I'd like to hear back from Sakari regarding the
get_locked_active
Thanks!
On Sat, Dec 7, 2024 at 9:48 PM André Apitzs
Hi André
On Wed, Nov 20, 2024 at 9:07 PM André Apitzsch wrote:
>
> Hi Ricardo,
>
> Am Mittwoch, dem 30.10.2024 um 13:10 +0100 schrieb Ricardo Ribalda
> Delgado:
> > Hi
> >
> > Aren't you changing the binning mode for 1920x1080 with this patch?
> > I
Hi
It looks good to me, but I would like Sakari to review it. I am not
sure if it is ok to keep the cur_mode variable.
On Mon, Oct 21, 2024 at 12:14 AM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Port the imx214 sensor driver to use the subdev active state.
>
> Move all the
On Mon, Oct 21, 2024 at 12:14 AM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The imx214 sensor supports horizontal and vertical flipping. Add
> appropriate controls to the driver.
>
> Signed-off-by: André Apitzsch
Acked-by: Ricardo Ribalda
> ---
>
Hi
Aren't you changing the binning mode for 1920x1080 with this patch? I
think that could be considered an ABI change.
Also, if we are not letting the user change the value, I do not see
much value in setting the cropping programmatically, I'd rather not
take this change.
On Mon, Oct 21, 2024 a
On Mon, Oct 21, 2024 at 12:14 AM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Add vblank control to allow changing the framerate /
> higher exposure values.
>
> The vblank and hblank controls are needed for libcamera support.
>
> While at it, fix the minimal exposure time accor
On Mon, Oct 21, 2024 at 12:14 AM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The imx214 camera is capable of either two-lane or four-lane operation.
>
> Currently only the four-lane mode is supported, as proper pixel rates
> and link frequences for the two-lane mode are unknow
Hi Andre
On Mon, Oct 21, 2024 at 12:14 AM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The driver defines IMX214_DEFAULT_LINK_FREQ 48000, and then
> IMX214_DEFAULT_PIXEL_RATE ((IMX214_DEFAULT_LINK_FREQ * 8LL) / 10),
> which works out as 384MPix/s. (The 8 is 4 lanes and DDR
Hi Andre
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Simplify the imx214_start_streaming() by removing unneeded goto
> statements, and the corresponding error label.
Could you squash this patch with the previous one?
Thanks!
>
> Signed-off
Hi Andre
I don't have access to the hardware anymore, so I cannot test this...
but looking at the code I am not sure how it is working...
I would assume that after moving to the subdev active state, you need to remove
struct v4l2_mbus_framefmt fmt;
struct v4l2_rect crop;
for struct imx214.
Aft
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Error handling in probe() can be a bit simpler with dev_err_probe().
>
Acked-by: Ricardo Ribalda
> Signed-off-by: André Apitzsch
> ---
> drivers
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Use the new common CCI register access helpers to replace the private
> register access helpers in the imx214 driver. This simplifies the driver
> by reducing the amount of code.
&
the documentation?
>
> Signed-off-by: André Apitzsch
Acked-by: Ricardo Ribalda
> ---
> drivers/media/i2c/imx214.c | 407
> ++---
> 1 file changed, 236 insertions(+), 171 deletions(-)
>
> diff --git a/drivers/media/i2c/imx214.c b/drive
gt; Signed-off-by: André Apitzsch
Acked-by: Ricardo Ribalda
> ---
> drivers/media/i2c/imx214.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/media/i2c/imx214.c b/drivers/media/i2c/imx214.c
> index 91664e188fd0..4507e12dd4cd 100644
> --- a/drivers/media/i2
Hi
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The imx214 camera is capable of either two-lane or four-lane operation.
>
> Currently only the four-lane mode is supported, as proper pixel rates
> and link frequences for the two-lane mode are unk
On Mon, Sep 2, 2024 at 11:54 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Remove format and crop settings from register sequences and set them
> programmatically.
>
> Signed-off-by: André Apitzsch
> ---
> drivers/media/i2c/imx214.c | 137
>
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> The imx214 sensor supports horizontal and vertical flipping. Add
> appropriate controls to the driver.
>
> Signed-off-by: André Apitzsch
> ---
> drivers/media/i2c/imx214.c | 73
> +++
Hi
Arent you missing some chage in enum_frame_interval?
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Add vblank control to allow changing the framerate /
> higher exposure values.
>
> The vblank and hblank controls are needed for libcamera supp
patch.
>
Acked-by: Ricardo Ribalda
> Signed-off-by: André Apitzsch
>
> ---
>
> With the analogue gain control added by this patch, the kernel log shows
> the following message when closing megapixels and a similar one when
> closing qcam (from libcamera):
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> Check the chip ID and stop probing if it is no imx214 sensor.
>
> Signed-off-by: André Apitzsch
Acked-by: Ricardo Ribalda
> ---
> drivers/media/i2c/imx214.c | 29 ++
On Mon, Sep 2, 2024 at 11:53 PM André Apitzsch via B4 Relay
wrote:
>
> From: André Apitzsch
>
> This adds V4L2_CID_TEST_PATTERN control support.
>
> Signed-off-by: André Apitzsch
Acked-by: Ricardo Ribalda
> ---
> drivers
your patch?
We went separate paths :), I tried to make everything const (and
therefore the remoteproc changes) and he removed the const.
His patch looks good to me. Shall I resend the series without this
patch or you can ignore 3/3 and take 1 and 2?
Thanks!
>
> Regards,
>
>
ast from 'void
(*)(struct pvr2_dvb_adapter *)' to 'pvr2_stream_callback' (aka 'void (*)(void
*)') converts to incompatible function type [-Wcast-function-type-strict]
Reviewed-by: Nathan Chancellor
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/pvrusb2/pvrusb2-context.c |
Hi
On Mon, 26 Feb 2024 at 18:32, Ricardo Ribalda wrote:
>
> Building with LLVM=1 throws the following warning:
> drivers/media/platform/mediatek/vcodec/common/mtk_vcodec_fw_vpu.c:38:32:
> warning: cast from 'mtk_vcodec_ipi_handler' (aka 'void (*)(void *, un
urn (*)(int, void *)')
converts to incompatible function type [-Wcast-function-type-strict]
Reviewed-by: Nathan Chancellor
Signed-off-by: Ricardo Ribalda
---
drivers/media/pci/sta2x11/sta2x11_vip.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/media/pci/st
, unsigned int,
void *)') converts to incompatible function type [-Wcast-function-type-strict]
Constify the types to avoid the warning.
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/mediatek/mdp3/mtk-mdp3-vpu.c | 12 ++--
.../media/platform/mediat
LLVM does check -Wcast-function-type-sctrict, which is triggered in a
couple of places in the media subsystem.
Signed-off-by: Ricardo Ribalda
---
Changes in v2:
- Refactor media: mediatek patchset
- sta2x11: Fix Christmas tree order
- Link to v1:
https://lore.kernel.org/r/20240128-fix-clang
s.
Cc: sta...@vger.kernel.org
Fixes: ad91849996f9 ("media: staging/intel-ipu3: Fix set_fmt error handling")
Reviewed-by: Tomasz Figa
Signed-off-by: Ricardo Ribalda
Signed-off-by: Sakari Ailus
---
drivers/staging/media/ipu3/ipu3-v4l2.c | 30 --
1 file change
681021] sg_alloc_table_from_pages+0x11/0x30
[7.681511] vb2_dma_sg_alloc+0x162/0x280 [videobuf2_dma_sg]
Cc: sta...@vger.kernel.org
Fixes: efc42bc98058 ("scatterlist: add sg_alloc_table_from_pages function")
Signed-off-by: Ricardo Ribalda
---
lib/scatterlist.c | 3 +++
1 file chang
Hi
Friendly ping?
On Tue, Mar 9, 2021 at 9:51 PM Ricardo Ribalda wrote:
>
> When sg_alloc_table_from_pages is called with n_pages = 0, we write in a
> non-allocated page. Fix it by checking early the error condition.
>
> [7.666801] BUG: kernel NULL pointer deref
Hi Bingbu
Maybe you want to add your Reviewed-by ? ;)
Thanks!
On Wed, Mar 17, 2021 at 7:48 AM Bingbu Cao wrote:
>
>
> On 3/17/21 1:50 AM, Ricardo Ribalda wrote:
> > Hi Bingbu
> >
> > Thanks for your review
> >
> > On Tue, Mar 16, 2021 at 12:29 PM Bingbu
ima_file_mprotect does not return EACCES but EPERM.
Signed-off-by: Ricardo Ribalda
---
security/integrity/ima/ima_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/integrity/ima/ima_main.c
b/security/integrity/ima/ima_main.c
index 9ef748ea829f..716ea29cf897
Hello Hans
On Fri, Mar 26, 2021 at 11:01 AM Ricardo Ribalda wrote:
>
> From: Hans Verkuil
>
> Check for inactive controls in uvc_ctrl_is_accessible().
> Use the new value for the master_id controls if present,
> otherwise use the existing value to determine if it is OK
&g
Hi Hans
Thanks for your review!
On Sat, Mar 27, 2021 at 12:19 PM Hans Verkuil wrote:
>
> On 26/03/2021 10:58, Ricardo Ribalda wrote:
> > The uvc driver relies on the camera firmware to keep the control states
> > and therefore is not capable of changing an inactive cont
From: Hans Verkuil
When uvc was written the vb2 ioctl and file operation helpers didn't exist.
This patch switches uvc over to those helpers, which removes a lot of
boilerplate
code and simplifies VIDIOC_G/S_PRIORITY handling and allows us to drop the
'privileges' scheme, since that's now handl
From: Hans Verkuil
Don't report the restored controls with dev_info, use dev_dbg instead.
This prevents a lot of noise in the kernel log.
Signed-off-by: Hans Verkuil
---
drivers/media/usb/uvc/uvc_ctrl.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/media/u
From: Hans Verkuil
Check for inactive controls in uvc_ctrl_is_accessible().
Use the new value for the master_id controls if present,
otherwise use the existing value to determine if it is OK
to set the control. Doing this here avoids attempting to
set an inactive control, which will return an err
From: Hans Verkuil
- If __uvc_query_ctrl() failed with a non-EPIPE error, then
report that with dev_err. If an error code is obtained, then
report that with dev_dbg.
- For error 2 (Wrong state) return -EACCES instead of -EILSEQ.
EACCES is a much more appropriate error code. EILSEQ will ret
If we have an error setting a control, return the affected control in
the error_idx field.
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 42 ++--
drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
drivers/media/usb/uvc
The uvc driver relies on the camera firmware to keep the control states
and therefore is not capable of changing an inactive control.
Allow returning -EACESS in those cases.
Signed-off-by: Ricardo Ribalda
---
Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst | 5 +
Documentation
Convert the error into a debug message, so they are still valid for
debugging but do not fill dmesg.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c
b/drivers/media/usb
: Hans Verkuil
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 8 +---
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c
b/drivers/media/usb/uvc/uvc_video.c
C_G/S/TRY_EXT_CTRLS: FAIL
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 22 ++
drivers/media/usb/uvc/uvc_v4l2.c | 39
drivers/media/usb/uvc/uvcvideo.h | 2 ++
3 files changed, 58 insertions(+)
If a control is inactive return -EACCES to let the userspace know that
the value will not be applied automatically when the control is active
again.
Suggested-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 71 +---
1 file
The framework already contains a map of IDs to names, lets use it when
possible.
Signed-off-by: Ricardo Ribalda
Reviewed-by: Hans Verkuil
Suggested-by: Hans Verkuil
---
drivers/media/usb/uvc/uvc_ctrl.c | 57
drivers/media/usb/uvc/uvc_v4l2.c | 8 -
drivers
ind(key)
!= v2_entity_names_set.end()
test MEDIA_IOC_G_TOPOLOGY: FAIL
fail: v4l2-test-media.cpp(394): num_data_links != num_links
test MEDIA_IOC_ENUM_ENTITIES/LINKS: FAIL
Signed-off-by: Ricardo Ribalda
Reviewed-by: Hans Verkuil
---
drivers/media/usb/uvc/uvc_drive
Use the device name for the card name instead of vdev->name.
Signed-off-by: Hans Verkuil
Suggested-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_metadata.c | 2 +-
drivers/media/usb/uvc/uvc_v4l2.c | 3 +--
2 files changed, 2 insertions(+), 3 deleti
Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 41 --
drivers/media/usb/uvc/uvc_driver.c | 8 +++---
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
Pinchart
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_v4l2.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index ac98869d5a05..1eeeb00280e4 100644
--- a/dr
009a
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 94
drivers/media/usb/uvc/uvcvideo.h | 5 ++
2 files changed, 99 insertions(+)
diff --git a/drivers/media/usb
/S_CTRL: FAIL
fail: v4l2-test-controls.cpp(698): s_ext_ctrls returned an
error (22)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
Reviewed-by: Laurent Pinchart
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 5 +
1 file changed
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.
Cc: Mike Isely
Signed-off-by: Ricardo Ribalda
Reviewed-by: Hans Verkuil
---
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
b
If we do not implement these callbacks the framework will call the
ext_ctrl callbaks instead, which are a superset of this functions.
Suggested-by: Hans Verkuil
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_v4l2.c | 56
value out
of range
fail: v4l2-test-controls.cpp(507): invalid control 00980900
test VIDIOC_G/S_CTRL: FAIL
Fixes: 35ea11ff8471 ("V4L/DVB (8430): videodev: move some functions from
v4l2-dev.h to v4l2-common.h or v4l2-ioctl.h")
Reviewed-by: Hans Verkuil
Signed-off-b
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_v4l2.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
sta...@vger.kernel.org
Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support")
Suggested-by: Hans Verkuil
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/v4l2-core/v4l2-ioctl.c | 60 ++--
1 file changed, 39 insertions(+), 21 deletio
og in uvc_ctrl_restore_values()
uvc: use vb2 ioctl and fop helpers
Ricardo Ribalda (18):
media: v4l2-ioctl: Fix check_ext_ctrls
media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: v4l2-ioctl: S_CTRL output the right value
HI Sergey
On Wed, Mar 24, 2021 at 3:22 AM Sergey Senozhatsky
wrote:
>
> On (21/03/23 17:04), Ricardo Ribalda wrote:
> > On Fri, Mar 19, 2021 at 6:53 AM Sergey Senozhatsky
> > wrote:
> > >
> > > UVC 1.5 defines the following Region Of Interest auto con
> @@ -1533,6 +1673,7 @@ const struct v4l2_ioctl_ops uvc_ioctl_ops = {
> .vidioc_try_ext_ctrls = uvc_ioctl_try_ext_ctrls,
> .vidioc_querymenu = uvc_ioctl_querymenu,
> .vidioc_g_selection = uvc_ioctl_g_selection,
> + .vidioc_s_selection = uvc_ioctl_s_selection,
> .vidioc_g_parm = uvc_ioctl_g_parm,
> .vidioc_s_parm = uvc_ioctl_s_parm,
> .vidioc_enum_framesizes = uvc_ioctl_enum_framesizes,
> diff --git a/include/uapi/linux/usb/video.h b/include/uapi/linux/usb/video.h
> index d854cb19c42c..c87624962896 100644
> --- a/include/uapi/linux/usb/video.h
> +++ b/include/uapi/linux/usb/video.h
> @@ -104,6 +104,7 @@
> #define UVC_CT_ROLL_ABSOLUTE_CONTROL 0x0f
> #define UVC_CT_ROLL_RELATIVE_CONTROL 0x10
> #define UVC_CT_PRIVACY_CONTROL 0x11
> +#define UVC_CT_REGION_OF_INTEREST_CONTROL 0x14
>
> /* A.9.5. Processing Unit Control Selectors */
> #define UVC_PU_CONTROL_UNDEFINED 0x00
> --
> 2.31.0.rc2.261.g7f71774620-goog
>
--
Ricardo Ribalda
nterest rectangle and minimum
> + auto-controls value. All valid ROI rectangles and auto-controls
> + should be within minimum-maximum range.
> + - Yes
> + - No
> +* - ``V4L2_SEL_TGT_ROI_BOUNDS_MAX``
> + - 0x0203
> + - Maximum bounds of the Region of Interest rectangle and maximum
> + auto-controls value. All valid ROI rectangles and auto-controls
> + should be within minimum-maximum range.
> + - Yes
> + - No
>
> .. raw:: latex
>
> --
> 2.31.0.rc2.261.g7f71774620-goog
>
--
Ricardo Ribalda
K(1 << 5)
> +#define V4L2_SEL_FLAG_ROI_AUTO_IMAGE_STABILIXATION (1 << 6)
> +#define V4L2_SEL_FLAG_ROI_AUTO_HIGHER_QUALITY (1 << 7)
> +
> struct v4l2_edid {
> __u32 pad;
> __u32 start_block;
> --
> 2.31.0.rc2.261.g7f71774620-goog
>
--
Ricardo Ribalda
From: Hans Verkuil
When uvc was written the vb2 ioctl and file operation helpers didn't exist.
This patch switches uvc over to those helpers, which removes a lot of
boilerplate
code and simplifies VIDIOC_G/S_PRIORITY handling and allows us to drop the
'privileges' scheme, since that's now handl
If a control is inactive return -EACCES to let the userspace know that
the value will not be applied automatically when the control is active
again.
Suggested-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 71 +---
1 file
Convert the error into a debug message, so they are still valid for
debugging but do not fill dmesg.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c
b/drivers/media/usb
ind(key)
!= v2_entity_names_set.end()
test MEDIA_IOC_G_TOPOLOGY: FAIL
fail: v4l2-test-media.cpp(394): num_data_links != num_links
test MEDIA_IOC_ENUM_ENTITIES/LINKS: FAIL
Signed-off-by: Ricardo Ribalda
Reviewed-by: Hans Verkuil
---
drivers/media/usb/uvc/uvc_drive
C_G/S/TRY_EXT_CTRLS: FAIL
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 22 ++
drivers/media/usb/uvc/uvc_v4l2.c | 39
drivers/media/usb/uvc/uvcvideo.h | 2 ++
3 files changed, 58 insertions(+)
The uvc driver relies on the camera firmware to keep the control states
and therefore is not capable of changing an inactive control.
Allow returning -EACESS in those cases.
Signed-off-by: Ricardo Ribalda
---
Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst | 5 +
Documentation
If we have an error setting a control, return the affected control in
the error_idx field.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 42 ++--
drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
drivers/media/usb/uvc/uvcvideo.h | 10 +++-
3 files
The framework already contains a map of IDs to names, lets use it when
possible.
Signed-off-by: Ricardo Ribalda
Reviewed-by: Hans Verkuil
Suggested-by: Hans Verkuil
---
drivers/media/usb/uvc/uvc_ctrl.c | 57
drivers/media/usb/uvc/uvc_v4l2.c | 8 -
drivers
: Hans Verkuil
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 8 +---
drivers/media/usb/uvc/uvcvideo.h | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_video.c
b/drivers/media/usb/uvc/uvc_video.c
/S_CTRL: FAIL
fail: v4l2-test-controls.cpp(698): s_ext_ctrls returned an
error (22)
test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
Reviewed-by: Laurent Pinchart
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_video.c | 5 +
1 file changed
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_v4l2.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 41 --
drivers/media/usb/uvc/uvc_driver.c | 8 +++---
2 files changed, 32 insertions(+), 17 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b/drivers/media/usb/uvc/uvc_ctrl.c
009a
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 94
drivers/media/usb/uvc/uvcvideo.h | 5 ++
2 files changed, 99 insertions(+)
diff --git a/drivers/media/usb
Use the device name for the card name instead of vdev->name.
Signed-off-by: Hans Verkuil
Suggested-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_metadata.c | 2 +-
drivers/media/usb/uvc/uvc_v4l2.c | 3 +--
2 files changed, 2 insertions(+), 3 deleti
If we do not implement these callback the framework will call the ext_ctrl
callbaks instead, which are a superset of this functions.
Suggested-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_v4l2.c | 56
1 file changed, 56
Pinchart
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_v4l2.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index ac98869d5a05..1eeeb00280e4 100644
--- a/dr
value out
of range
fail: v4l2-test-controls.cpp(507): invalid control 00980900
test VIDIOC_G/S_CTRL: FAIL
Fixes: 35ea11ff8471 ("V4L/DVB (8430): videodev: move some functions from
v4l2-dev.h to v4l2-common.h or v4l2-ioctl.h")
Signed-off-by: Ricardo Ribalda
---
dri
sta...@vger.kernel.org
Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support")
Suggested-by: Hans Verkuil
Reviewed-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/v4l2-core/v4l2-ioctl.c | 60 ++--
1 file changed, 39 insertions(+), 21 deletio
The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is
written.
Cc: Mike Isely
Signed-off-by: Ricardo Ribalda
Reviewed-by: Hans Verkuil
---
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 4
1 file changed, 4 deletions(-)
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
b
Verkuil (1):
uvc: use vb2 ioctl and fop helpers
Ricardo Ribalda (18):
media: v4l2-ioctl: Fix check_ext_ctrls
media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL
media: v4l2-ioctl: S_CTRL output the right value
media
Hi Sergey
On Fri, Mar 19, 2021 at 6:35 AM Sergey Senozhatsky
wrote:
>
> On (21/03/18 22:19), Ricardo Ribalda wrote:
> > >
> > > May I please ask for more opinions on this?
> >
> > Could you try setting the roi in a loop in your device and verify that
&
Hello Hans
On Fri, Mar 19, 2021 at 9:35 AM Hans Verkuil wrote:
>
> On 18/03/2021 21:29, Ricardo Ribalda wrote:
> > Take a v4l2_ext_controls instead of an array of controls, this way we
> > can access the error_idx in future changes.
> >
> > Signed-off-by: Ricardo
Hi Christoph
On Fri, Mar 19, 2021 at 2:10 PM Christoph Hellwig wrote:
>
> On Fri, Mar 19, 2021 at 02:05:21PM +0100, Ricardo Ribalda wrote:
> > > + uvc_urb->sgt,
> > > + uvc_stream_dir(uvc_urb->
Hi Christoph
While backporting the patch I realised of a bug.
On Sat, Mar 13, 2021 at 12:55 AM Ricardo Ribalda wrote:
>
> On architectures where there is no coherent caching such as ARM use the
> dma_alloc_noncontiguous API and handle manually the cache flushing using
> dma_
Hi Hans
Thanks for testing this.
On Fri, Mar 19, 2021 at 10:10 AM Hans Verkuil wrote:
>
> On 18/03/2021 21:29, Ricardo Ribalda wrote:
> > If a control is inactive return -EACCES to let the userspace know that
> > the value will not be applied automatically when the
On Thu, Mar 18, 2021 at 10:19 PM Ricardo Ribalda wrote:
>
> Hi Sergey
>
> On Thu, Mar 18, 2021 at 5:47 AM Sergey Senozhatsky
> wrote:
> >
> > On (21/03/17 08:58), Ricardo Ribalda Delgado wrote:
> > [..]
> > > >
> > > > GET_CUR?
> >
Hi Sergey
On Thu, Mar 18, 2021 at 5:47 AM Sergey Senozhatsky
wrote:
>
> On (21/03/17 08:58), Ricardo Ribalda Delgado wrote:
> [..]
> > >
> > > GET_CUR?
> > yep
> >
> > >
> > > > https://www.kernel.org/doc/html/v4.13/media/uapi/v4l/vid
If a control is inactive return -EACCES to let the userspace know that
the value will not be applied automatically when the control is active
again.
Reviewed-by: Hans Verkuil
Suggested-by: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 68
From: Hans Verkuil
When uvc was written the vb2 ioctl and file operation helpers didn't exist.
This patch switches uvc over to those helpers, which removes a lot of
boilerplate
code and simplifies VIDIOC_G/S_PRIORITY handling and allows us to drop the
'privileges' scheme, since that's now handl
If we have an error setting a control, return the affected control in
the error_idx field.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 37
1 file changed, 33 insertions(+), 4 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_ctrl.c b
The uvc driver relies on the camera firmware to keep the control states
and therefore is not capable of changing an inactive control.
Allow returning -EACESS in those cases.
Signed-off-by: Ricardo Ribalda
---
Documentation/userspace-api/media/v4l/vidioc-g-ctrl.rst | 5 +
Documentation
1 - 100 of 1017 matches
Mail list logo