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
, 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
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
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
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 |
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,
>
>
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
him?
Thanks
On Tue, Feb 9, 2021 at 6:02 PM Christoph Hellwig wrote:
>
> On Tue, Feb 09, 2021 at 03:46:13PM +0100, Ricardo Ribalda wrote:
> > Hi Christoph
> >
> > I have tested it in both arm and x86, since there are not significant
> > changes with the previous vers
HI Christoph
On Thu, Feb 11, 2021 at 2:06 PM Christoph Hellwig wrote:
>
> On Thu, Feb 11, 2021 at 10:08:18AM +0100, Ricardo Ribalda wrote:
> > Hi Christoph
> >
> > What are your merge plans for the uvc change?
> > http://git.infradead.org/us
On Thu, Jan 28, 2021 at 4:03 PM Christoph Hellwig wrote:
>
> From: Ricardo Ribalda
>
> On architectures where the is no coherent caching such as ARM use the
> dma_alloc_noncontiguos API and handle manually the cache flushing using
> dma_sync_sgtable().
>
> With th
idate_kernel_vmap_range calls for
> VIVT architectures.
We only read from the device to the cpu. Then can we run only
invalidate_kernel_vmap_range() ?
something like ?
else {
dma_sync_sgtable_for_cpu(dma_dev, uvc_urb->sgt, DMA_FROM_DEVICE);
invalidate_kernel_vmap_range(uvc_urb->buffer,
uvc_urb->stream->urb_size );
}
Thanks!
--
Ricardo Ribalda
td 1.615 min 2806.667 max (uS)
raw decode speed: 365.470 Mbits/s
raw URB handling speed: 295.986 Mbits/s
throughput: 13.136 Mbits/s
URB decode CPU usage 3.594500 %
Signed-off-by: Ricardo Ribalda
Signed-off-by: Christoph Hellwig
---
v2:
- Replace DMA_BIDIRECTIONAL with DMA_FROM_
gt; Ricardo, do the uvcvideo changes look good to you? I'd like to queue
> the series up for this merge window.
Let me test them in real hardware today.
Thanks!
--
Ricardo Ribalda
Hi Christoph
I have tested it in both arm and x86, since there are not significant
changes with the previous version I did not do a performance test.
Thanks!
On Tue, Feb 9, 2021 at 9:29 AM Ricardo Ribalda wrote:
>
> Hi Christoph
>
> On Tue, Feb 9, 2021 at 9:22 AM Christoph He
Clear the reserved fields.
Fixes:
fail: v4l2-test-formats.cpp(482): pix_mp.plane_fmt[0].reserved not zeroed
test VIDIOC_TRY_FMT: FAIL
fail: v4l2-test-formats.cpp(482): pix_mp.plane_fmt[0].reserved not zeroed
test VIDIOC_S_FMT: FAIL
Signed-off-by: Ricardo Ribalda
---
drivers/staging/media
Hi Ezequiel
On Mon, Jan 11, 2021 at 12:48 PM Ezequiel Garcia wrote:
>
> Hi Ricardo,
>
> On Mon, 2021-01-11 at 12:35 +0100, Ricardo Ribalda wrote:
> > Clear the reserved fields.
> >
> > Fixes:
> > fail: v4l2-test-formats.cpp(482): pix_mp.plane_fmt[0].reserve
Hi Ezequiel
On Mon, Jan 11, 2021 at 12:55 PM Ricardo Ribalda wrote:
>
> Hi Ezequiel
>
> On Mon, Jan 11, 2021 at 12:48 PM Ezequiel Garcia
> wrote:
> >
> > Hi Ricardo,
> >
> > On Mon, 2021-01-11 at 12:35 +0100, Ricardo Ribalda wrote:
> > &
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Sakari Ailus
Signed-off-by: Ricardo Ribalda
---
drivers/staging/media/ipu3/ipu3-v4l2.c | 3 ---
1 file changed, 3
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Matthias Brugger
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c | 3 ---
1 file
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Sakari Ailus
Signed-off-by: Ricardo Ribalda
---
drivers/media/pci/intel/ipu3/ipu3-cio2.c | 3 ---
1 file changed, 3
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Matthias Brugger
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 5 -
dri
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Maxime Ripard
Cc: Chen-Yu Tsai
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/sunxi/sun4i-csi/sun4i_
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Mikhail Ulyanov
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/rcar_jpu.c | 5 -
1 file changed, 5
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Benoit Parrot
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/ti-vpe/vpe.c | 2 --
1 file changed, 2
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Hans Verkuil
Signed-off-by: Ricardo Ribalda
---
drivers/media/test-drivers/vicodec/vicodec-core.c | 5 -
1 file
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: linux-renesas-...@vger.kernel.org
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/rcar_fdp1.c | 4
1 fi
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Sakari Ailus
Signed-off-by: Ricardo Ribalda
---
drivers/staging/media/ipu3/ipu3-v4l2.c | 3 ---
1 file changed, 3
Hi Kieran
On Tue, Jan 12, 2021 at 12:59 PM Kieran Bingham
wrote:
>
> Hi Ricardo,
>
> On 11/01/2021 14:54, Ricardo Ribalda wrote:
> > Core code already clears reserved fields of struct
> > v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
>
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Matthias Brugger
Reviewed-by: Kieran Bingham
Signed-off-by: Ricardo Ribalda
---
drivers/media/platform/
Core code already clears reserved fields of struct
v4l2_pix_format_mplane, check: 4e1e0eb0e074 ("media: v4l2-ioctl: Zero
v4l2_plane_pix_format reserved fields").
Cc: Maxime Ripard
Cc: Chen-Yu Tsai
Reviewed-by: Kieran Bingham
Signed-off-by: Ricardo Ribalda
---
drivers/media/plat
xes: 2d744ecf2b98 ("ASoC: Intel: Skylake: Automatic DMIC format configuration
according to information from NHL")
Signed-off-by: Ricardo Ribalda
---
sound/soc/intel/skylake/skl-topology.c | 15 ---
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/sound/soc/inte
Signed-off-by: Ricardo Ribalda
---
Sorry for a duplicated patch, the previous one the spacing was wrong :(
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/media/usb/uvc/uvcvideo.h | 7 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c
b
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/media/usb/uvc/uvcvideo.h | 7 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c
b/drivers/media/usb/uvc/uvc_driver.c
index bfbc5a4d4ca6..82cdd1bb28dc
ll the comments from Laurent!
- move guid to unit
- support entities with no pads
- CodeStyle
- Irq handling
- pr_cont
- new ids
Ricardo Ribalda (12):
media: uvcvideo: Fix race condition handling events
media: uvcvideo: Allow more that one asyc_ctrl
media: uvcvideo: Move gu
Allows controls to get their properties and current value
from an entity-defined function instead of via a query to the USB
device.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 22 ++
drivers/media/usb/uvc/uvcvideo.h
Instead of calling prink() inside uvc_trace, use dev_dbg(), which add
context to the output.
Now that we are at it, regroup the strings so the messages can be easily
"grepable".
Suggested-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl
The current implementation allocates memory for only one async_control.
If we get a second event before we have processed the previous one, the
old one gets lost.
Introduce a dynamic memory allocation and a list to handle the
async_controls.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb
RHUB.HS07,
Zero,
Zero,
One
}
}
}
})
}
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 7 ++
drivers/media/usb/uvc/uvc_driver.c | 156 +
drivers/media/usb/uvc/uvc_enti
Avoid an underflow while calculating the number of inputs for entities
with zero pads.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc
Instead of having multiple copies of the entity guid on the code, move
it to the entity structure.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 30 --
drivers/media/usb/uvc/uvc_driver.c | 25
Remove all the duplicated code around printk(KERN_CONT, with a new macro.
Reviewed-by: Laurent Pinchart
Suggested-by: Joe Perches
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 57 +++---
drivers/media/usb/uvc/uvcvideo.h | 6
2 files
The control and its data needs to be copied to the workqueue at the same
time to avoid half-updates of the events.
This is, events reported to userspace were the control id does not match
its value.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 2 +-
drivers/media/usb
Some devices, can only read the privacy_pin if the device is
streaming.
This patch implement a quirk for such devices, in order to avoid invalid
reads and/or spurious events.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 57 --
drivers
Perches
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 12 +++
drivers/media/usb/uvc/uvc_driver.c | 50 --
drivers/media/usb/uvc/uvc_entity.c | 10 +++---
drivers/media/usb/uvc/uvc_status.c | 13
drivers/media/usb/uvc/uvc_video.c | 48
Add a new control and mapping for Privacy controls connected to
UVC_GUID_EXT_GPIO_CONTROLLERs.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/media/usb/uvc
Hi Laurent
Thanks for your review!
On Tue, Dec 22, 2020 at 9:34 AM Laurent Pinchart
wrote:
>
> Hi Ricardo,
>
> Thank you for the patch.
>
> On Mon, Dec 21, 2020 at 05:48:14PM +0100, Ricardo Ribalda wrote:
> > Some devices can implement a physical switch to disable the in
HI Laurent
Thanks for your review!
On Tue, Dec 22, 2020 at 11:30 AM Laurent Pinchart
wrote:
>
> Hi Ricardo,
>
> Thank you for the patch.
>
> On Mon, Dec 21, 2020 at 05:48:16PM +0100, Ricardo Ribalda wrote:
> > Some devices, can only read the privacy_pin if the device i
Instead of having multiple copies of the entity guid on the code, move
it to the entity structure.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 30 --
drivers/media/usb/uvc/uvc_driver.c | 25
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/media/usb/uvc/uvcvideo.h | 7 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c
b/drivers/media/usb/uvc/uvc_driver.c
index bfbc5a4d4ca6..82cdd1bb28dc
2: Thanks to all the comments from Laurent!
- move guid to unit
- support entities with no pads
- CodeStyle
- Irq handling
- pr_cont
- new ids
Ricardo Ribalda (11):
media: uvcvideo: Move guid to entity
media: uvcvideo: Allow extra entities
media: uvcvideo: Allow entities with no pa
Avoid an underflow while calculating the number of inputs for entities
with zero pads.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc
Add a new control and mapping for Privacy controls connected to
UVC_GUID_EXT_GPIO_CONTROLLERs.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/media/usb/uvc
Some devices can only read the privacy_pin if the device is
streaming.
This patch implement a quirk for such devices, in order to avoid invalid
reads and/or spurious events.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 37 --
drivers/media
Instead of calling prink() inside uvc_trace, use dev_printk(), which adds
context to the output.
Now that we are at it, regroup the strings so the messages can be easily
"grepable".
Reviewed-by: Laurent Pinchart
Suggested-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
dri
Remove all the duplicated code around printk(KERN_CONT, with a new macro.
Reviewed-by: Laurent Pinchart
Suggested-by: Joe Perches
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 57 +++---
drivers/media/usb/uvc/uvcvideo.h | 6
2 files
Perches
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 12 +++
drivers/media/usb/uvc/uvc_driver.c | 50 --
drivers/media/usb/uvc/uvc_entity.c | 10 +++---
drivers/media/usb/uvc/uvc_status.c | 13
drivers/media/usb/uvc/uvc_video.c | 48
RHUB.HS07,
Zero,
Zero,
One
}
}
}
})
}
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 3 +
drivers/media/usb/uvc/uvc_driver.c | 133 +
drivers/media/usb/uvc/uvc_enti
Provide a code path for events that can be sent without a work-queue,
this is, that do not belong to an URB and are not handled in the top
half on an irq-handled.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 35 +++-
drivers/media/usb/uvc
Allows controls to get their properties and current value
from an entity-defined function instead of via a query to the USB
device.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 22 ++
drivers/media/usb/uvc/uvcvideo.h
Hi Laurent
On Wed, Dec 23, 2020 at 9:05 AM Laurent Pinchart
wrote:
>
> Hi Ricardo,
>
> On Tue, Dec 22, 2020 at 09:04:19PM +0100, Ricardo Ribalda wrote:
> > On Tue, Dec 22, 2020 at 11:30 AM Laurent Pinchart wrote:
> > > On Mon, Dec 21, 2020 at 05:48:16PM +0100, Ricardo
Hi again
On Wed, Dec 23, 2020 at 9:31 AM Ricardo Ribalda wrote:
>
> Hi Laurent
>
> On Wed, Dec 23, 2020 at 9:05 AM Laurent Pinchart
> wrote:
> >
> > Hi Ricardo,
> >
> > On Tue, Dec 22, 2020 at 09:04:19PM +0100, Ricardo Ribalda wrote:
> > > On Tue,
Avoid an underflow while calculating the number of inputs for entities
with zero pads.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc
nt!
- move guid to unit
- support entities with no pads
- CodeStyle
- Irq handling
- pr_cont
- new ids
Joe Perches (1):
media: uvcvideo: Rename debug functions
Ricardo Ribalda (11):
media: uvcvideo: Move guid to entity
media: uvcvideo: Allow extra entities
media: uvcvideo: Allow e
RHUB.HS07,
Zero,
Zero,
One
}
}
}
})
}
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 3 +
drivers/media/usb/uvc/uvc_driver.c | 127 +
drivers/media/usb/uvc/uvc_enti
Remove all the duplicated code around printk(KERN_CONT, with a new macro.
Reviewed-by: Laurent Pinchart
Suggested-by: Joe Perches
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 57 +++---
drivers/media/usb/uvc/uvcvideo.h | 6
2 files
Some devices can only read the privacy_pin if the device is
streaming.
This patch implement a quirk for such devices, in order to avoid invalid
reads and/or spurious events.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 55 +++---
drivers/media
Add a new control and mapping for Privacy controls connected to
UVC_GUID_EXT_GPIO_CONTROLLERs.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 18 ++
1 file changed, 18 insertions(+)
diff --git a/drivers/media/usb/uvc
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/media/usb/uvc/uvcvideo.h | 7 ++-
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c
b/drivers/media/usb/uvc/uvc_driver.c
index bfbc5a4d4ca6..82cdd1bb28dc
Perches
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 12 +++
drivers/media/usb/uvc/uvc_driver.c | 50 --
drivers/media/usb/uvc/uvc_entity.c | 10 +++---
drivers/media/usb/uvc/uvc_status.c | 13
drivers/media/usb/uvc/uvc_video.c | 48
From: Joe Perches
trace isn't a good name as it's not a trace mechanism, it is a
typical debug mechanism.
Rename uvc_trace/uvc_trace_cont macros to uvc_dbg/uvc_dbg_cont.
Rename uvc_trace_param to uvc_dbg_param
Rename UVC_TRACE_ defines to UVC_DBG_
Use ## concatenation in uvc_dbg macros to avoid
Instead of having multiple copies of the entity guid on the code, move
it to the entity structure.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 30 --
drivers/media/usb/uvc/uvc_driver.c | 25
Allows controls to get their properties and current value
from an entity-defined function instead of via a query to the USB
device.
Reviewed-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 22 ++
drivers/media/usb/uvc/uvcvideo.h
Instead of calling prink() inside uvc_trace, use dev_printk(), which adds
context to the output.
Now that we are at it, regroup the strings so the messages can be easily
"grepable".
Reviewed-by: Laurent Pinchart
Suggested-by: Laurent Pinchart
Signed-off-by: Ricardo Ribalda
---
dri
Split the functionality of void uvc_ctrl_status_event_work in two, so it
can be called by functions outside interrupt context and not part of an
URB.
Signed-off-by: Ricardo Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 25 +++--
drivers/media/usb/uvc/uvc_status.c | 3
Hi Joe
On Wed, Dec 23, 2020 at 12:30 PM Joe Perches wrote:
>
> Perhaps this on top.
>
> trace isn't a good name as it's not a trace mechanism, it is a
> typical debug mechanism.
>
> Rename uvc_trace/uvc_trace_cont macros to uvc_dbg/uvc_dbg_cont.
> Rename uvc_trace_param to uvc_dbg_param
> Rename
Hi Gustavo
On Mon, Jan 18, 2021 at 11:26 PM Gustavo A. R. Silva
wrote:
>
> Hey Ricardo,
>
> On 1/14/21 07:03, Ricardo Ribalda wrote:
> > raw_fmt->height in never initialized. But width in initialized twice.
>
> Nice catch!
Thanks :)
>
> How did you find this
t; I think between your comments and those from Ricardo I have a good idea
> for a somewhat updated API. I'll try to post something in the next days.
Did you have time to look into this?
No hurry, I just want to make sure that I didn't miss anything ;)
Best regards!
--
Ricardo Ribalda
raw_fmt->height in never initialized. But width in initialized twice.
Fixes: 88d06362d1d05 ("media: hantro: Refactor for V4L2 API spec compliancy")
Signed-off-by: Ricardo Ribalda
---
drivers/staging/media/hantro/hantro_v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
ioctl and fop helpers
Ricardo Ribalda (16):
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: uvcvideo: Set capability in s_param
media: uvcvideo: Return -EIO for control errors
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 47b0e3224205..397217171bbb 100644
--- a/dr
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 | 59 ++--
1 file changed, 38 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
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
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
/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
009a
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL
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/uvc/uvc_ctrl.c b/drivers
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(+)
: 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
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
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
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
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 Ribalda
---
drivers/media/usb/uvc/uvc_ctrl.c | 5 ++---
drivers/media/usb/uvc/uvc_v4l2.c | 8 ++--
drivers/media/usb/uvc/uvcvideo.h | 10 --
3
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
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
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
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 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
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_
1 - 100 of 1466 matches
Mail list logo