Re: [PATCH v2 2/3] media: usb: pvrusb2: Fix Wcast-function-type-strict warnings

2024-02-28 Thread Hans Verkuil
On 26/02/2024 18:32, Ricardo Ribalda wrote: > Building with LLVM=1 throws the following warning: > drivers/media/usb/pvrusb2/pvrusb2-context.c:110:6: warning: cast from 'void > (*)(struct pvr2_context *)' to 'void (*)(void *)' converts to incompatible > function type

Re: [PATCH v2 1/3] media: pci: sta2x11: Fix Wcast-function-type-strict warnings

2024-02-27 Thread Hans Verkuil
On 26/02/2024 18:32, Ricardo Ribalda wrote: > Building with LLVM=1 throws the following warning: > drivers/media/pci/sta2x11/sta2x11_vip.c:1057:6: warning: cast from > 'irqreturn_t (*)(int, struct sta2x11_vip *)' (aka 'enum irqreturn (*)(int, > struct sta2x11_vip *)') to 'irq_handler_t' (aka

Re: [PATCH v2 3/3] media: mediatek: vcodedc: Fix Wcast-function-type-strict warnings

2024-02-27 Thread Hans Verkuil
Ricardo, First of all, note the typo in theo subject line: vcodedc -> vcodec. There is also a similar (but not identical!) patch from Arnd: https://patchwork.linuxtv.org/project/linux-media/patch/20240224121059.1806691-1-a...@kernel.org/ That patch and yours share the change to

Re: [PATCH] visl: use canonical ftrace path

2023-10-04 Thread Hans Verkuil
On 10/4/23 15:57, Steven Rostedt wrote: > On Wed, 4 Oct 2023 08:33:12 +0200 > Hans Verkuil wrote: > >> On 03/10/2023 23:41, Steven Rostedt wrote: >>> >>> Could this go through the linux-media tree, or if you give it an Ack, I'll >>> take it through

Re: [PATCH] visl: use canonical ftrace path

2023-10-04 Thread Hans Verkuil
On 03/10/2023 23:41, Steven Rostedt wrote: > > Could this go through the linux-media tree, or if you give it an Ack, I'll > take it through the tracing tree. I prefer to take this through the media subsystem. Ross, can you post this patch again, this time including linux-me...@vger.kernel.org?

Re: [PATCH 1/6] staging: media: atomisp: improve function argument alignment

2021-04-20 Thread Hans Verkuil
On 20/04/2021 19:19, Deepak R Varma wrote: > On Tue, Apr 20, 2021 at 03:24:32PM +0200, Hans Verkuil wrote: >> On 19/04/2021 21:12, Deepak R Varma wrote: >>> Improve multi-line function argument alignment according to the code style >>> guidelines. Resolves checkpatch

Re: [PATCH 0/2] drm/bridge: dw-hdmi: disable loading of DW-HDMI CEC sub-driver

2021-04-20 Thread Hans Verkuil
at the hardware level decision, it is not something that software can detect. If the designer of the board didn't connect it, then the only place you can define that is in the device tree. Anyway, for meson I am fine with this solution. At least it prevents creating a non-functioning cec device. So

Re: [PATCH 5/6] staging: media: atomisp: fix CamelCase variable naming

2021-04-20 Thread Hans Verkuil
On 20/04/2021 10:39, Fabio Aiuto wrote: > Hi, > > On Tue, Apr 20, 2021 at 12:45:57AM +0530, Deepak R Varma wrote: >> Mixed case variable names are discouraged and they result in checkpatch >> script "Avoid CamelCase" warnings. Replace such CamelCase variable names >> by lower case strings

Re: [PATCH 1/6] staging: media: atomisp: improve function argument alignment

2021-04-20 Thread Hans Verkuil
On 19/04/2021 21:12, Deepak R Varma wrote: > Improve multi-line function argument alignment according to the code style > guidelines. Resolves checkpatch feedback: "Alignment should match > open parenthesis". > > Signed-off-by: Deepak R Varma WARNING: From:/Signed-off-by: email address

Re: [PATCH v2] staging: media: atomisp: pci: Change line break to avoid an open parenthesis at the end of the line

2021-04-20 Thread Hans Verkuil
On 15/04/2021 19:08, Aline Santana Cordeiro wrote: > Change line break to avoid an open parenthesis at the end of the line. > It consequently removed spaces at the start of the subsequent line. > Both issues detected by checkpatch.pl. > > Signed-off-by: Aline Santana Cordeiro > --- > > Changes

Re: [PATCH] media: atomisp: silence "dubious: !x | !y" warning

2021-04-20 Thread Hans Verkuil
Hi Ashish, On 18/04/2021 03:26, Ashish Kalra wrote: > On Sat, Apr 17, 2021 at 08:56:13PM +0200, Mauro Carvalho Chehab wrote: >> Em Sat, 17 Apr 2021 21:06:27 +0530 >> Ashish Kalra escreveu: >> >>> Upon running sparse, "warning: dubious: !x | !y" is brought to notice >>> for this file. Logical

Re: [PATCH v9 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-20 Thread Hans Verkuil
On 20/04/2021 11:31, Benjamin Gaignard wrote: > > Le 20/04/2021 à 11:16, Hans Verkuil a écrit : >> On 20/04/2021 11:10, Benjamin Gaignard wrote: >>> Le 16/04/2021 à 17:14, Lucas Stach a écrit : >>>> Am Freitag, dem 16.04.2021 um 15:08 +0200 schrieb Benjamin Gaig

Re: [PATCH v9 03/13] media: hantro: Use syscon instead of 'ctrl' register

2021-04-20 Thread Hans Verkuil
On 20/04/2021 11:10, Benjamin Gaignard wrote: > > Le 16/04/2021 à 17:14, Lucas Stach a écrit : >> Am Freitag, dem 16.04.2021 um 15:08 +0200 schrieb Benjamin Gaignard: >>> Le 16/04/2021 à 12:54, Lucas Stach a écrit : Am Mittwoch, dem 07.04.2021 um 09:35 +0200 schrieb Benjamin Gaignard: >

Re: [PATCH] staging: media: atomisp: pci: Change line break to avoid an open parenthesis at the end of the line

2021-04-15 Thread Hans Verkuil
On 14/04/2021 22:56, Aline Santana Cordeiro wrote: > Change line break to avoid an open parenthesis at the end of the line. > It consequently removed spaces at the start of the subsequent line. > Both issues detected by checkpatch.pl. > > Signed-off-by: Aline Santana Cordeiro > --- >

Re: [PATCH] staging: media: tegra-video: Align line break to match with the open parenthesis in file vi.c

2021-04-15 Thread Hans Verkuil
On 14/04/2021 15:09, Aline Santana Cordeiro wrote: > Align line break to match with the open parenthesis. > Issue detected by checkpatch.pl. > > Signed-off-by: Aline Santana Cordeiro > --- > drivers/staging/media/tegra-video/vi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >

Re: [PATCH v3] staging: media: zoran: reduce length of a line

2021-04-15 Thread Hans Verkuil
On 13/04/2021 18:35, Mitali Borkar wrote: > Reduced length of a line which exceed the 100 columns limit by splitting > the line into two statements and commenting it with '*' to meet linux > kernel coding style for long(multi-line) comments. > Reported by checkpatch. > > Signed-off-by: Mitali

Re: Subject: [PATCH v4] staging: media: zoran: add '*' in long(multi-line) comments

2021-04-15 Thread Hans Verkuil
Hi Mitali, You have 'Subject' in the Subject line. That looks weird... On 13/04/2021 19:26, Mitali Borkar wrote: > Added '*' before every line inside long(multi-line) comments. Removed > '*/' from end of the comment line and added to next line as per linux > kernel coding style. Aligned '*'

Re: [PATCH] staging: media: omap4iss: Remove unused macro functions

2021-04-14 Thread Hans Verkuil
On 13/04/2021 20:21, ascordeiro wrote: > Em ter, 2021-04-13 às 17:06 +0200, Hans Verkuil escreveu: >> On 12/04/2021 15:42, Aline Santana Cordeiro wrote: >>> Remove unused macro functions "to_iss_device()", "to_device()", >>> and "v4l2_dev_to_iss

Re: [PATCH v3 0/2] Intra-refresh period control

2021-04-13 Thread Hans Verkuil
On 13/04/2021 17:49, Stanimir Varbanov wrote: > Hi Hans, > > Any comments? Thanks for the reminder, I replied to the patch. Regards, Hans > > On 3/2/21 11:53 AM, Stanimir Varbanov wrote: >> Hi, >> >> This series add a new intra-refresh period control for encoders. The >> series is a

Re: [PATCH v3 1/2] media: v4l2-ctrls: Add intra-refresh period control

2021-04-13 Thread Hans Verkuil
On 02/03/2021 10:53, Stanimir Varbanov wrote: > Add a control to set intra-refresh period. > > Signed-off-by: Stanimir Varbanov > --- > .../userspace-api/media/v4l/ext-ctrls-codec.rst | 12 > drivers/media/v4l2-core/v4l2-ctrls.c | 2 ++ >

Re: [PATCH] staging: media: tegra-vde: Align line break to match with the open parenthesis in file trace.h

2021-04-13 Thread Hans Verkuil
Hi Aline, On 13/04/2021 00:20, Aline Santana Cordeiro wrote: > Align line break to match with the open parenthesis. > Issue detected by checkpatch.pl. > It consequently solved a few end lines with a '(', > issue also detected by checkpatch.pl These trace headers are almost a language by

Re: [PATCH v3] staging: media: meson: vdec: declare u32 as static const

2021-04-13 Thread Hans Verkuil
On 13/04/2021 16:11, Mitali Borkar wrote: > Declared 32 bit unsigned int as static constant inside a function and > replaced u32[] {x,y} as canvas3, canvas4 in codec_h264.c > This indicates the value of canvas indexes will remain constant throughout > execution. checkpatch.pl output: WARNING:

Re: [PATCH] staging: media: omap4iss: Remove unused macro functions

2021-04-13 Thread Hans Verkuil
On 12/04/2021 15:42, Aline Santana Cordeiro wrote: > Remove unused macro functions "to_iss_device()", "to_device()", > and "v4l2_dev_to_iss_device(dev)". 'git grep to_iss_device drivers/staging/omap4iss' gives me lots of hits! Same for to_device. Only v4l2_dev_to_iss_device appears to be unused.

Re: [PATCH v3 1/2] media: zoran: add spaces around '<<'

2021-04-13 Thread Hans Verkuil
Missing commit message. You used to have one in v1 of this patch! Regards, Hans On 10/04/2021 17:33, Mitali Borkar wrote: > Signed-off-by: Mitali Borkar > --- > Changes from v2:- No changes. > Changes from v1:- NO changes. > > drivers/staging/media/zoran/zr36057.h | 14

Re: [PATCH v3 2/2] staging: media: zoran: align code appropriately

2021-04-13 Thread Hans Verkuil
On 10/04/2021 17:34, Mitali Borkar wrote: > Aligned the code properly by using tabs to make code neater and improve > readability. > > Signed-off-by: Mitali Borkar > --- > drivers/staging/media/zoran/zr36057.h | 108 +- > 1 file changed, 54 insertions(+), 54 deletions(-)

Re: [Outreachy kernel][PATCH 1/2] staging: media: omap4iss: Align line break to the open parenthesis in file iss.c

2021-04-13 Thread Hans Verkuil
On 09/04/2021 21:01, Aline Santana Cordeiro wrote: > Aligns line break with the remaining function arguments > to the open parenthesis. Issue found by checkpatch. > > Signed-off-by: Aline Santana Cordeiro Obsolete, a similar patch from Beatriz Martins de Carvalho has already been applied in

Re: [PATCH v3] staging: media: zoran: remove and move statement in next line with '*'

2021-04-13 Thread Hans Verkuil
On 09/04/2021 13:40, Mitali Borkar wrote: > Removed and moved statement in line in long(multi-line) comments and > added '*' before it to meet linux kernel coding style for long (multi-line) > comments > > Signed-off-by: Mitali Borkar > --- > > Changes from v2:- made style changes in code

Re: [PATCH v2] staging: media: zoran: moved statement to next line with '*'

2021-04-13 Thread Hans Verkuil
On 09/04/2021 13:40, Mitali Borkar wrote: > Moved the statement to next line and added '*' before it to meet > linux kernel coding style for long(multi-line) comments. > > Signed-off-by: Mitali Borkar > --- > > Changes from v1:- made style changes according to linux kernel coding style > for

Re: Subject: [PATCH v2] staging: media: meson: vdec: declare u32 as static const appropriately

2021-04-13 Thread Hans Verkuil
On 13/04/2021 13:09, Mitali Borkar wrote: > On Tue, Apr 13, 2021 at 09:26:01AM +0200, Hans Verkuil wrote: >> On 13/04/2021 08:27, Mitali Borkar wrote: >>> Declared 32 bit unsigned int as static constant inside a function >>> appropriately. >>> >>> R

Re: Subject: [PATCH v2] staging: media: meson: vdec: declare u32 as static const appropriately

2021-04-13 Thread Hans Verkuil
On 13/04/2021 08:27, Mitali Borkar wrote: > Declared 32 bit unsigned int as static constant inside a function > appropriately. > > Reported-by: kernel test robot > Signed-off-by: Mitali Borkar > --- > > Changes from v1:- Rectified the mistake by declaring u32 as static const > properly. > >

Re: [PATCH v2] staging: media: zoran: remove and add '*' in long(multi-line) comments

2021-04-12 Thread Hans Verkuil
On 11/04/2021 13:47, Mitali Borkar wrote: > On Fri, Apr 09, 2021 at 12:53:35PM +0200, Hans Verkuil wrote: >> On 09/04/2021 12:49, Mitali Borkar wrote: >>> Added '*' before every line inside long(multi-line) comments. Removed >>> '*/' from end of the comment line and adde

Re: [PATCH v2] staging: media: meson: vdec: declare u32 as const and static const

2021-04-12 Thread Hans Verkuil
On 10/04/2021 21:59, Mitali Borkar wrote: > Declared 32 bit unsigned int as static constant inside a function and > replaced u32[] {x,y} as canvas1, canvas2 in codec_mpeg12.c > This indicates the value of canvas indexes will remain constant throughout > execution. > Replaced u32 reg_base and u32

Re: [PATCH 1/2] media: zoran: add spaces around '<<'

2021-04-09 Thread Hans Verkuil
On 09/04/2021 17:11, Mitali Borkar wrote: > On Fri, Apr 09, 2021 at 09:23:22AM +0200, Hans Verkuil wrote: >> Hi Mitali, >> >> On 08/04/2021 22:38, Mitali Borkar wrote: >>> Added spaces around '<<' operator to improve readability and meet linux >>> ke

Re: [PATCH v2] staging: media: zoran: remove and add '*' in long(multi-line) comments

2021-04-09 Thread Hans Verkuil
On 09/04/2021 12:49, Mitali Borkar wrote: > Added '*' before every line inside long(multi-line) comments. Removed > '*/' from end of the comment line and added to next line as per linux > kernel coding style. Aligned '*' accordingly to make code neater. > > Signed-off-by: Mitali Borkar > --- >

Re: [PATCH] staging: media: zoran: add '*' in subsequent line

2021-04-09 Thread Hans Verkuil
Hi Mitali, On 09/04/2021 01:05, Mitali Borkar wrote: > Added '*' in susbsequent lines for block comments to meet linux kernel > coding style. > > Signed-off-by: Mitali Borkar > --- > drivers/staging/media/zoran/zr36050.c | 34 +-- > 1 file changed, 17 insertions(+), 17

Re: [PATCH] staging: media: meson: vdec: matched alignment with parenthesis

2021-04-09 Thread Hans Verkuil
On 09/04/2021 00:19, Mitali Borkar wrote: > Matched alignment with open parenthesis to meet linux kernel coding > style. > Reported by checkpatch > > Signed-off-by: Mitali Borkar > --- > drivers/staging/media/meson/vdec/codec_mpeg12.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >

Re: [PATCH] staging: media: zoran: reduce length of a line

2021-04-09 Thread Hans Verkuil
Hi Mitali, Something to improve: On 08/04/2021 23:21, Mitali Borkar wrote: > Reduced length of a line which exceed the 100 columns limit by splitting > the line into two statements and commenting it with '*' > Reported by checkpatch. > > Signed-off-by: Mitali Borkar > --- >

Re: [PATCH 1/2] media: zoran: add spaces around '<<'

2021-04-09 Thread Hans Verkuil
Hi Mitali, On 08/04/2021 22:38, Mitali Borkar wrote: > Added spaces around '<<' operator to improve readability and meet linux > kernel coding style. > Reported by checkpatch > > Signed-off-by: Mitali Borkar > --- > drivers/staging/media/zoran/zr36057.h | 14 +++--- > 1 file changed, 7

Re: [PATCH 0/7] staging: media: zoran: Eliminate camelcase

2021-04-07 Thread Hans Verkuil
Hi Zhansaya, On 03/04/2021 20:08, Zhansaya Bagdauletkyzy wrote: > This patchset fixes 'avoid camelcase' warning by converting local variables > to lowercase and separating words using '_'. > Renaming of each variable is implemented in separate patches. > > Zhansaya Bagdauletkyzy (7): > Rename

Re: [PATCH 2/2] staging: media: omap4iss: align arguments with open parenthesis

2021-04-07 Thread Hans Verkuil
Hi Beatriz, On 01/04/2021 17:07, Beatriz Martins de Carvalho wrote: > Cleans up checks of "Alignment should match open parenthesis" > in iss.c:96. Looks good. I'll take this patch. You can use this reference to record your contribution:

Re: [PATCH] staging: axis-fifo: media/meson: remove redundant dev_err call

2021-04-07 Thread Hans Verkuil
Hi Muhammad, On 07/04/2021 12:10, Muhammad Usama Anjum wrote: > devm_ioremap_resource() prints error message in itself. Remove the > dev_err call to avoid redundant error message. Please split this up into two separate patches! They are independent changes and these two drivers are maintained by

Re: [PATCH] media: platform: sti: Fix rumtime PM imbalance in regs_show

2021-04-07 Thread Hans Verkuil
On 07/04/2021 07:43, Dinghao Liu wrote: > pm_runtime_get_sync() will increase the rumtime PM counter > even it returns an error. Thus a pairing decrement is needed > to prevent refcount leak. Fix this by replacing this API with > pm_runtime_resume_and_get(), which will not change the runtime > PM

Re: [PATCH 1/2] staging: media: omap4iss: Ending line with argument

2021-04-07 Thread Hans Verkuil
Hi Beatriz, I'm now reviewing staging/media patches instead of Greg KH. See Vaishali's email from today: "Sending patches for the drivers/staging/media". On 01/04/2021 17:07, Beatriz Martins de Carvalho wrote: > Remove checkpatch check "CHECK: Lines should not end with a '('" with > argument

Re: [PATCH] media: Fix compilation error

2021-04-07 Thread Hans Verkuil
On 02/04/2021 09:40, Bixuan Cui wrote: > Fix the error: > > drivers/staging/media/tegra-video/vi.c:1180:4: > error: implicit declaration of function 'host1x_syncpt_free' > [-Werror,-Wimplicit-function-declaration] Against what tree is this being built? The mainline kernel doesn't have

Re: [PATCH v2 00/30] media: atmel: atmel-isc: add support for xisc

2021-04-07 Thread Hans Verkuil
Hi Eugen, On 05/04/2021 17:50, Eugen Hristev wrote: > Hello, > > This series adds support for a variant of the ISC named XISC. > This block is present in the product named sama7g5. > > I started by moving code around, the code which was specialized for sama5d2 > type of ISC, to have it inside

Re: [PATCH v5 3/3] media: i2c: Introduce a driver for the Techwell TW9900 decoder

2021-04-06 Thread Hans Verkuil
Hi Maxime, Some comments below: On 01/04/2021 09:08, Maxime Chevallier wrote: > The Techwell video decoder supports PAL, NTSC and SECAM input formats, > and outputs a BT.656 signal. > > This commit adds support for this device, with basic support for NTSC > and PAL, along with brightness and

Re: [PATCH v8 02/13] dt-bindings: media: nxp,imx8mq-vpu: Update the bindings for G2 support

2021-04-06 Thread Hans Verkuil
On 01/04/2021 17:59, Benjamin Gaignard wrote: > Introducing G2 hevc video decoder lead to modify the bindings to allow > to get one node per VPUs. Introducing the G2 hevc video decoder requires modifications of the bindings to allow one node per VPU. > VPUs share one hardware control block

Re: [PATCH v8 01/13] dt-bindings: mfd: Add 'nxp,imx8mq-vpu-ctrl' to syscon list

2021-04-06 Thread Hans Verkuil
Hi Benjamin, The commit logs in this series have a few too many grammatical mistakes. And since I want some other changes as well, I'll just review the text so it can be fixed in v9. On 01/04/2021 17:59, Benjamin Gaignard wrote: > Add 'nxp,imx8mq-vpu-ctrl' in the list of possible syscon. in ->

Re: [PATCH v4,2/3] arm64: dts: mt8173: Separating mtk-vcodec-enc device node

2021-04-06 Thread Hans Verkuil
Hi Irui, On 25/03/2021 13:26, Irui Wang wrote: > There are two separate hardware encoder blocks inside MT8173. > Split the current mtk-vcodec-enc node to match the hardware architecture. I've accepted patches 1 & 3, so this patch can be merged by whoever maintains these dts files. Regards,

Re: [PATCH v5 04/10] media: uapi: mpeg2: Split sequence and picture parameters

2021-04-06 Thread Hans Verkuil
On 03/04/2021 20:07, Ezequiel Garcia wrote: > Typically, bitstreams are composed of a sequence header, > followed by a number of picture header and picture coding extension > headers. Each picture can be composed by a number of slices. by -> of > > Let's split the MPEG-2 uAPI to follow these

Re: [PATCH v5 03/10] media: uapi: mpeg2: Cleanup flags

2021-04-06 Thread Hans Verkuil
On 03/04/2021 20:07, Ezequiel Garcia wrote: > Our current MPEG-2 uAPI uses 1-byte fields for MPEG-2 > boolean syntax elements. Clean these by adding a 'flags' > field and flag macro for each boolean syntax element. > > A follow-up change will refactor this uAPI so we don't need > to add padding

Re: [PATCH v5 02/10] media: uapi: mpeg2: rework quantisation matrices semantics

2021-04-06 Thread Hans Verkuil
On 03/04/2021 20:07, Ezequiel Garcia wrote: > As stated in the MPEG-2 specification, section 6.3.7 "Quant matrix > extension": > > Each quantisation matrix has a default set of values. When a > sequence_header_code is decoded all matrices shall be reset to > their default values. User

Re: [PATCH] media: em28xx: fix memory leak

2021-04-06 Thread Hans Verkuil
On 06/04/2021 11:44, Muhammad Usama Anjum wrote: > On Wed, 2021-03-31 at 13:22 +0500, Muhammad Usama Anjum wrote: >> On Wed, 2021-03-24 at 23:07 +0500, Muhammad Usama Anjum wrote: >>> If some error occurs, URB buffers should also be freed. If they aren't >>> freed with the dvb here, the

Re: [PATCH] media: pvrusb2: fix warning in pvr2_i2c_core_done

2021-04-06 Thread Hans Verkuil
On 01/04/2021 14:33, Anirudh Rayabharam wrote: > syzbot has reported the following warning in pvr2_i2c_done: > > sysfs group 'power' not found for kobject '1-0043' > > When the device is disconnected (pvr_hdw_disconnect), the i2c adapter is > not unregistered along with the USB and vl42

Re: [PATCH] media: VIDEO_IMX8_JPEG should depend on ARCH_MXC and not default to m

2021-04-06 Thread Hans Verkuil
Hi Geert, On 31/03/2021 10:17, Geert Uytterhoeven wrote: > The i.MX8 QXP/QM integrated JPEG encoder/decoder is only present on > Freescale/NXP i.MX8 QXP and QM SoCs. Hence add a dependency on > ARCH_MXC, to prevent asking the user about this driver when configuring > a kernel without i.MX8

Re: [PATCH] media: usb: Remove duplicate declares

2021-04-06 Thread Hans Verkuil
Please specify in the subject line which driver this patch changes. I also would prefer that this is split into two patches, one for each driver. Just saying 'media: usb:' makes it look like you have a media/usb subsystem patch, but that's not the case. Very confusing for code reviewers.

Re: [PATCH v9 17/22] media: docs: Document the behaviour of uvcdriver

2021-03-27 Thread Hans Verkuil
On 27/03/2021 13:01, Ricardo Ribalda wrote: > 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 ke

Re: [PATCH v9 16/22] media: uvcvideo: Return -EACCES to inactive controls

2021-03-27 Thread Hans Verkuil
On 26/03/2021 10:58, 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 control is active > again. > > Suggested-by: Hans Verkuil > Signed-off-by: Ricardo Ribalda Reviewe

Re: [PATCH v9 18/22] media: uvcvideo: Downgrade control error messages

2021-03-27 Thread Hans Verkuil
On 26/03/2021 10:58, Ricardo Ribalda wrote: > Convert the error into a debug message, so they are still valid for > debugging but do not fill dmesg. > > Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil > --- > drivers/media/usb/uvc/uvc_video.c | 2 +- > 1 file

Re: [PATCH v9 17/22] media: docs: Document the behaviour of uvcdriver

2021-03-27 Thread Hans Verkuil
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 control. > > Allow returning -EACESS in those cases. -EACCES > > Signed-off-by: Ricardo Ribalda > --- >

Re: [PATCH v5 0/5] Add r8a77965 DRIF support

2021-03-27 Thread Hans Verkuil
Hi Laurent, On 21/10/2020 23:43, Laurent Pinchart wrote: > Hi Fabrizio, > > On Wed, Oct 21, 2020 at 02:53:27PM +0100, Fabrizio Castro wrote: >> Dear All, >> >> this series is to add DRIF support for the r8a77965 >> (a.k.a. R-Car M3-N). Version 5 fixes a warning reported >> by 'make

Re: [PATCH v2] media: sq905.c: fix uninitialized variable

2021-03-27 Thread Hans Verkuil
Hi Alaa, FYI: this patch has already been applied to the media_tree master git repo: https://patchwork.linuxtv.org/project/linux-media/patch/2c46832a-99a8-73bf-ec85-085052f8b...@xs4all.nl/ That's good enough for this issue so I am marking this patch as Obsolete in our patchwork. On 26/03/2021

Re: [PATCH 1/2] media: v4l2-core: ignore native time32 ioctls on 64-bit

2021-03-25 Thread Hans Verkuil
On 21/03/2021 09:50, Hans Verkuil wrote: > Hi Arnd, >> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c >> b/drivers/media/v4l2-core/v4l2-subdev.c >> index 336133dbc759..9f5573d3b857 100644 >> --- a/drivers/media/v4l2-core/v4l2-subdev.c >> +++ b/driv

Re: [PATCH v5 3/5] v4l: Add HDR10 static metadata controls

2021-03-22 Thread Hans Verkuil
On 22/03/2021 13:56, Stanimir Varbanov wrote: > Hi Hans, > > On 3/16/21 2:16 PM, Hans Verkuil wrote: >> On 09/02/2021 17:24, Stanimir Varbanov wrote: >>> Introduce Content light level and Mastering display colour >>> volume Colorimetry compound controls wit

Re: [PATCH 8/8] videobuf2: handle non-contiguous DMA allocations

2021-03-22 Thread Hans Verkuil
On 02/03/2021 01:46, Sergey Senozhatsky wrote: > This adds support for new noncontiguous DMA API, which > requires allocators to have two execution branches: one > for the current API, and one for the new one. > > Signed-off-by: Sergey Senozhatsky > [hch: untested conversion to the ne API] >

Re: [PATCH 7/8] videobuf2: handle V4L2_FLAG_MEMORY_NON_COHERENT flag

2021-03-22 Thread Hans Verkuil
On 02/03/2021 01:46, Sergey Senozhatsky wrote: > This patch lets user-space to request a non-coherent memory > allocation during CREATE_BUFS and REQBUFS ioctl calls. > > = CREATE_BUFS > > struct v4l2_create_buffers has seven 4-byte reserved areas, > so reserved[0] is renamed to ->flags. The

Re: [PATCH 7/8] videobuf2: handle V4L2_FLAG_MEMORY_NON_COHERENT flag

2021-03-22 Thread Hans Verkuil
On 02/03/2021 01:46, Sergey Senozhatsky wrote: > This patch lets user-space to request a non-coherent memory > allocation during CREATE_BUFS and REQBUFS ioctl calls. > > = CREATE_BUFS > > struct v4l2_create_buffers has seven 4-byte reserved areas, > so reserved[0] is renamed to ->flags. The

Re: [PATCH 5/8] videobuf2: add V4L2_FLAG_MEMORY_NON_COHERENT flag

2021-03-22 Thread Hans Verkuil
On 02/03/2021 01:46, Sergey Senozhatsky wrote: > By setting or clearing V4L2_FLAG_MEMORY_NON_COHERENT flag > user-space should be able to hint vb2 that either a non-coherent > (if supported) or coherent memory should be used for the buffer > allocation. > > The patch set also adds a corresponding

Re: [PATCH] media/pci: Assign value when defining variables

2021-03-21 Thread Hans Verkuil
Hi zuoqilin, On 17/03/2021 04:08, zuoqil...@163.com wrote: > From: zuoqilin > > When defining variables and assigning values can be done at the same time. For future reference: add the name of the driver to the prefix. Saying 'media/pci:' suggests that you patch multiple PCI drivers in that

Re: [PATCH 1/2] media: v4l2-core: ignore native time32 ioctls on 64-bit

2021-03-21 Thread Hans Verkuil
ng > on a 32-bit kernel where these are defined in a meaningful way. > > Fixes: 577c89b0ce72 ("media: v4l2-core: fix v4l2_buffer handling for time64 > ABI") > Reported-by: syzbot+142888ffec98ab194...@syzkaller.appspotmail.com > Tested-by: Hans Verkuil > Signed-off-by: Arnd

Re: [PATCH 2/2] media: radio: RDA5807: Added driver

2021-03-21 Thread Hans Verkuil
Hi Maarten, Thank you for this patch. Before I can accept this driver I have to see the output of v4l2-compliance -r /dev/radioX. That utility is part of the v4l-utils git repo: git://linuxtv.org/v4l-utils.git Compile it from the master branch of that repo, don't rely on the version

Re: [PATCH] v4l2-ctrls: Fix h264 hierarchical coding type menu ctrl

2021-03-20 Thread Hans Verkuil
On 20/03/2021 12:53, Stanimir Varbanov wrote: > Kindly ping for review. Weird, it was marked as 'Under Review' in patchwork, but it wasn't delegated to anyone. I've changed it to 'New' and delegated it to myself. It looks good and I'll pick it up next time I collect 'various fixes' in a PR.

Re: [PATCH v8 15/19] media: uvcvideo: Set error_idx during ctrl_commit errors

2021-03-20 Thread Hans Verkuil
On 19/03/2021 18:09, Ricardo Ribalda wrote: > If we have an error setting a control, return the affected control in > the error_idx field. > > Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil Regards, Hans > --- > drivers/media/usb/u

Re: [PATCH v8 05/19] media: uvcvideo: Remove s_ctrl and g_ctrl

2021-03-20 Thread Hans Verkuil
On 19/03/2021 18:08, Ricardo Ribalda wrote: > If we do not implement these callback the framework will call the ext_ctrl > callbaks instead, which are a superset of this functions. callbaks -> callbacks With that changed you can add my: Reviewed-by: Hans Verkuil Regards,

Re: [PATCH v8 04/19] media: v4l2-ioctl: S_CTRL output the right value

2021-03-20 Thread Hans Verkuil
e functions from > v4l2-dev.h to v4l2-common.h or v4l2-ioctl.h") > Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil Regards, Hans > --- > drivers/media/v4l2-core/v4l2-ioctl.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff

Re: [PATCH v7 13/17] media: uvcvideo: Return -EACCES to inactive controls

2021-03-19 Thread Hans Verkuil
On 19/03/2021 10:49, Ricardo Ribalda wrote: > 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 -EAC

Re: [PATCH v7 13/17] media: uvcvideo: Return -EACCES to inactive controls

2021-03-19 Thread Hans Verkuil
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 control is active > again. > > Reviewed-by: Hans Verkuil > Suggested-by: Hans Verkuil > Signed-of

Re: [PATCH v7 01/17] media: v4l2-ioctl: Fix check_ext_ctrls

2021-03-19 Thread Hans Verkuil
fail: v4l2-test-buffers.cpp(1994): ret != EINVAL && ret != > EBADR && ret != ENOTTY > test Requests: FAIL > > Cc: sta...@vger.kernel.org > Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support") > Suggested-by: Hans Ver

Re: [PATCH v7 15/17] media: uvcvideo: Refactor __uvc_ctrl_commit

2021-03-19 Thread Hans Verkuil
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 Ribalda > --- > drivers/media/usb/uvc/uvc_ctrl.c | 5 ++--- > drivers/media/usb/uvc/uvc_v4l2.c | 8

Re: [PATCH v7 07/17] media: uvcvideo: Add support for V4L2_CTRL_TYPE_CTRL_CLASS

2021-03-19 Thread Hans Verkuil
fail: v4l2-test-controls.cpp(216): missing control tclass for > class 009a > test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: FAIL > > Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil Regards, Hans > --- > drivers/media/usb/uvc/uvc_ctrl.c | 94 ++

Re: [PATCH v6 00/17] uvcvideo: Fix v4l2-compliance errors

2021-03-18 Thread Hans Verkuil
the commit to fail and then I can verify error_idx. Regards, Hans > > Changelog from v5 (Thanks to Hans) > - Move more checks to framework > - Rewrite the framework check_ext_ctrls > - Rewrite ctrl_is_inactive > - Add function ctrl_is_accessible > - Use ioctl name inst

Re: [PATCH v6 16/17] media: uvcvideo: Return -EACCES to inactive controls

2021-03-18 Thread Hans Verkuil
On 18/03/2021 08:39, Hans Verkuil wrote: > Hi Ricardo, > > On 17/03/2021 17:45, 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 control is active >> a

Re: [PATCH v6 11/17] media: uvcvideo: Use dev->name for querycap()

2021-03-18 Thread Hans Verkuil
ev->name, sizeof(cap->card)); > usb_make_path(stream->dev->udev, cap->bus_info, sizeof(cap->bus_info)); > cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING > | chain->caps; > You forgot to update querycap

Re: [PATCH v6 01/17] media: v4l2-ioctl: check_ext_ctrls: Fix multiclass V4L2_CTRL_WHICH_DEF_VAL

2021-03-18 Thread Hans Verkuil
pted without checking for S/TRY_EXT_CTRLS. Basically patch 1 is a broken fix w.r.t. DEF_VAL until patch 4, which really fixes it. Just do it all in a single patch, splitting it up doesn't work in this particular case. Regards, Hans > > Thanks > > On Thu, Mar 18, 2021 at 8:1

Re: [PATCH v6 16/17] media: uvcvideo: Return -EACCES to inactive controls

2021-03-18 Thread Hans Verkuil
Hi Ricardo, On 17/03/2021 17:45, 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 control is active > again. > > Signed-off-by: Ricardo Ribalda > Suggested-by: Hans Ve

Re: [PATCH v6 15/17] media: uvcvideo: Check controls flags before accessing them

2021-03-18 Thread Hans Verkuil
/drivers/media/usb/uvc/uvc_ctrl.c > +++ b/drivers/media/usb/uvc/uvc_ctrl.c > @@ -1046,6 +1046,27 @@ static int uvc_query_v4l2_class(struct uvc_video_chain > *chain, u32 req_id, > return 0; > } > > +int uvc_ctrl_is_accesible(struct uvc_video_chain *chain, u32 v4l2_id, bool

Re: [PATCH v6 09/17] media: uvcvideo: refactor __uvc_ctrl_add_mapping

2021-03-18 Thread Hans Verkuil
On 17/03/2021 17:45, Ricardo Ribalda wrote: > Pass the chain instead of the device. We want to keed the reference to keed -> keep With that typo fixed you can add my: Reviewed-by: Hans Verkuil Thanks! Hans > the chain that controls belong to. > > We need to delay the

Re: [PATCH v6 05/17] media: pvrusb2: Do not check for V4L2_CTRL_WHICH_DEF_VAL

2021-03-18 Thread Hans Verkuil
On 17/03/2021 17:44, Ricardo Ribalda wrote: > 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 Thanks! Hans > --- > drivers/media/usb/pvrusb2/pvrusb2-v4l2

Re: [PATCH v6 06/17] media: uvcvideo: Do not check for V4L2_CTRL_WHICH_DEF_VAL

2021-03-18 Thread Hans Verkuil
On 17/03/2021 17:45, Ricardo Ribalda wrote: > The framework already checks for us if V4L2_CTRL_WHICH_DEF_VAL is > written. > > Signed-off-by: Ricardo Ribalda Reviewed-by: Hans Verkuil Thanks! Hans > --- > drivers/media/usb/uvc/uvc_v4l2.c | 4 > 1 file

Re: [PATCH v6 01/17] media: v4l2-ioctl: check_ext_ctrls: Fix multiclass V4L2_CTRL_WHICH_DEF_VAL

2021-03-18 Thread Hans Verkuil
lly preferred. You can add my: Reviewed-by: Hans Verkuil after these 4 patches are merged. It looks much nicer now. Regards, Hans > > Cc: sta...@vger.kernel.org > Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support") > Suggested-by: Hans Verk

Re: [PATCH v5 12/13] media: v4l2-ioctl: Set error_idx to the right value

2021-03-17 Thread Hans Verkuil
On 16/03/2021 19:00, Ricardo Ribalda wrote: > If an error is found when validating the list of controls passed with > VIDIOC_G_EXT_CTRLS, then error_idx shall be set to ctrls->count to > indicate to userspace that no actual hardware was touched. > > It would have been much nicer of course if

Re: [PATCH v5 11/13] media: uvcvideo: Use control names from framework

2021-03-17 Thread Hans Verkuil
On 16/03/2021 19:00, Ricardo Ribalda wrote: > The framework already contains a map of IDs to names, lets use it when > possible. > > Signed-off-by: Ricardo Ribalda > Suggested-by: Hans Verkuil Reviewed-by: Hans Verkuil Regards, Hans > --- > drivers/media/us

Re: [PATCH v5 10/13] media: uvcvideo: Return -EACCES to inactive controls

2021-03-17 Thread Hans Verkuil
On 16/03/2021 19:00, 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 control is active > again. > > Signed-off-by: Ricardo Ribalda > Suggested-by: Hans Verkuil > --- >

Re: [PATCH v5 09/13] media: uvcvideo: Increase the size of UVC_METADATA_BUF_SIZE

2021-03-17 Thread Hans Verkuil
TA_FMT_UVC docs, drop headers when > the buffer is full. > > Credit-to: 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(-)

Re: [PATCH v5 07/13] media: uvcvideo: Use dev->name for querycap()

2021-03-17 Thread Hans Verkuil
On 16/03/2021 18:59, Ricardo Ribalda wrote: > Use the device name for the card name instead of cap->card. You mean: 'instead of vdev->name.' ? > > Suggested-by: Laurent Pinchart > Signed-off-by: Ricardo Ribalda > --- > drivers/media/usb/uvc/uvc_v4l2.c | 3 +-- > 1 file changed, 1

Re: [PATCH v5 04/13] media: uvcvideo: Check controls flags before accessing them

2021-03-17 Thread Hans Verkuil
On 16/03/2021 18:59, Ricardo Ribalda wrote: > We can figure out if reading/writing a set of controls can fail without > accessing them by checking their flags. > > This way we can honor the API closer: > > If an error is found when validating the list of controls passed with >

Re: [PATCH v5 01/13] media: v4l2-ioctl: Fix check_ext_ctrls

2021-03-17 Thread Hans Verkuil
ntrol ioctls (Input 0): > fail: v4l2-test-controls.cpp(813): doioctl(node, > VIDIOC_G_EXT_CTRLS, ) > test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL > > Cc: sta...@vger.kernel.org > Fixes: 6fa6f831f095 ("media: v4l2-ctrls: add core request support") > Suggested-by: Hans V

Re: [syzbot] KMSAN: uninit-value in video_usercopy (2)

2021-03-16 Thread Hans Verkuil
UF32_TIME32 here, >>> if it's built against glibc, though with a musl based user space, you >>> would get called with VIDIOC_QUERYBUF32. >> >> Or somebody fetching somebody else's credit card number will be >> calling VIDIOC_QUERYBUF_TIME32 directly ;) > >

Re: [PATCH v8 1/2] media: v4l2-ctrl: add controls for long term reference.

2021-03-16 Thread Hans Verkuil
DEO_FORCE_KEY_FRAME > (V4L2_CID_CODEC_BASE+229) > #define V4L2_CID_MPEG_VIDEO_BASELAYER_PRIORITY_ID > (V4L2_CID_CODEC_BASE+230) > +#define V4L2_CID_MPEG_VIDEO_LTR_COUNT > (V4L2_CID_CODEC_BASE+231) > +#define V4L2_CID_MPEG_VIDEO_FRAME_LTR_INDEX > (V4L2_CID_CODEC_B

Re: [PATCH v5 4/5] docs: Document CLL and Mastering display colorimetry controls

2021-03-16 Thread Hans Verkuil
lace symbol V4L2_CTRL_TYPE_FWHT_PARAMS :c:type:`v4l2_ctrl_type` > +replace symbol V4L2_CTRL_TYPE_HDR10_CLL_INFO :c:type:`v4l2_ctrl_type` > +replace symbol V4L2_CTRL_TYPE_HDR10_MASTERING_DISPLAY > :c:type:`v4l2_ctrl_type` > > # V4L2 capability defines > replace define V4L2_CAP_VIDEO_CAPTURE device-capabilities > After making the change suggested above, you can add my: Reviewed-by: Hans Verkuil Regards, Hans

  1   2   3   4   5   6   7   8   9   10   >