* Webcam LED control regression
@ 2023-06-05 16:39 Poncho
2023-06-06 10:40 ` Linux regression tracking (Thorsten Leemhuis)
0 siblings, 1 reply; 12+ messages in thread
From: Poncho @ 2023-06-05 16:39 UTC (permalink / raw)
To: linux-media
With kernel 6.3, the LED of my C922 Pro Stream Webcam is no longer
controllable.
With kernel 6.1 v4l2-ctl --all returns:
> led1_mode 0x0a046d05 (menu) : min=0 max=3 default=0 value=0 (Off)
> 0: Off
> 1: On
> 2: Blink
> 3: Auto
but with kernel 6.3 I get:
> led1_mode 0x0a046d05 (menu) : min=4 max=4 default=0 value=0
> 4:
Full output bellow:
> Driver Info:
> Driver name : uvcvideo
> Card type : C922 Pro Stream Webcam
> Bus info : usb-0000:00:14.0-9
> Driver version : 6.3.5
> Capabilities : 0x84a00001
> Video Capture
> Metadata Capture
> Streaming
> Extended Pix Format
> Device Capabilities
> Device Caps : 0x04200001
> Video Capture
> Streaming
> Extended Pix Format
> Media Driver Info:
> Driver name : uvcvideo
> Model : C922 Pro Stream Webcam
> Serial : 6E8DF1BF
> Bus info : usb-0000:00:14.0-9
> Media version : 6.3.5
> Hardware revision: 0x00000016 (22)
> Driver version : 6.3.5
> Interface Info:
> ID : 0x03000002
> Type : V4L Video
> Entity Info:
> ID : 0x00000001 (1)
> Name : C922 Pro Stream Webcam
> Function : V4L2 I/O
> Flags : default
> Pad 0x01000007 : 0: Sink
> Link 0x0200001f: from remote pad 0x100000a of entity 'Processing 3' (Video Pixel Formatter): Data, Enabled, Immutable
> Priority: 2
> Video input : 0 (Camera 1: ok)
> Format Video Capture:
> Width/Height : 160/90
> Pixel Format : 'YUYV' (YUYV 4:2:2)
> Field : None
> Bytes per Line : 320
> Size Image : 28800
> Colorspace : sRGB
> Transfer Function : Rec. 709
> YCbCr/HSV Encoding: ITU-R 601
> Quantization : Default (maps to Limited Range)
> Flags :
> Crop Capability Video Capture:
> Bounds : Left 0, Top 0, Width 160, Height 90
> Default : Left 0, Top 0, Width 160, Height 90
> Pixel Aspect: 1/1
> Selection Video Capture: crop_default, Left 0, Top 0, Width 160, Height 90, Flags:
> Selection Video Capture: crop_bounds, Left 0, Top 0, Width 160, Height 90, Flags:
> Streaming Parameters Video Capture:
> Capabilities : timeperframe
> Frames per second: 30.000 (30/1)
> Read buffers : 0
>
> User Controls
>
> brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128
> contrast 0x00980901 (int) : min=0 max=255 step=1 default=128 value=128
> saturation 0x00980902 (int) : min=0 max=255 step=1 default=128 value=128
> white_balance_automatic 0x0098090c (bool) : default=1 value=1
> gain 0x00980913 (int) : min=0 max=255 step=1 default=0 value=0
> power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2 (60 Hz)
> 0: Disabled
> 1: 50 Hz
> 2: 60 Hz
> white_balance_temperature 0x0098091a (int) : min=2000 max=6500 step=1 default=4000 value=4000 flags=inactive
> sharpness 0x0098091b (int) : min=0 max=255 step=1 default=128 value=128
> backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0
>
> Camera Controls
>
> auto_exposure 0x009a0901 (menu) : min=0 max=3 default=3 value=3 (Aperture Priority Mode)
> 1: Manual Mode
> 3: Aperture Priority Mode
> exposure_time_absolute 0x009a0902 (int) : min=3 max=2047 step=1 default=250 value=250 flags=inactive
> exposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=1
> pan_absolute 0x009a0908 (int) : min=-36000 max=36000 step=3600 default=0 value=0
> tilt_absolute 0x009a0909 (int) : min=-36000 max=36000 step=3600 default=0 value=0
> focus_absolute 0x009a090a (int) : min=0 max=250 step=5 default=0 value=0 flags=inactive
> focus_automatic_continuous 0x009a090c (bool) : default=1 value=1
> zoom_absolute 0x009a090d (int) : min=100 max=500 step=1 default=100 value=100
> led1_mode 0x0a046d05 (menu) : min=4 max=4 default=0 value=0
> 4:
> led1_frequency 0x0a046d06 (int) : min=0 max=255 step=1 default=0 value=255
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Webcam LED control regression
2023-06-05 16:39 Webcam LED control regression Poncho
@ 2023-06-06 10:40 ` Linux regression tracking (Thorsten Leemhuis)
2023-06-06 17:09 ` Laurent Pinchart
0 siblings, 1 reply; 12+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-06-06 10:40 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-media, Poncho, Mauro Carvalho Chehab,
Linux kernel regressions list, LKML
CCing a few people and lists that should be aware of this and might be
able to help.
On 05.06.23 18:39, Poncho wrote:
> With kernel 6.3, the LED of my C922 Pro Stream Webcam is no longer
> controllable.
>
> With kernel 6.1 v4l2-ctl --all returns:
>
>> led1_mode 0x0a046d05 (menu) : min=0 max=3 default=0 value=0 (Off)
>> 0: Off
>> 1: On
>> 2: Blink
>> 3: Auto
>
>
>
> but with kernel 6.3 I get:
>
>> led1_mode 0x0a046d05 (menu) : min=4 max=4 default=0 value=0
>> 4:
Thanks for the report.
FWIW, maybe one of those people that I CCed has an idea what's wrong. If
none of them brings one to the table withing the next two or three days,
you likely have to perform a bisection to find the change that broke
thing for you.
For the rest of this mail:
[TLDR: I'm adding this report to the list of tracked Linux kernel
regressions; the text you find below is based on a few templates
paragraphs you might have encountered already in similar form.
See link in footer if these mails annoy you.]
> Full output bellow:
>
>> Driver Info:
>> Driver name : uvcvideo
>> Card type : C922 Pro Stream Webcam
>> Bus info : usb-0000:00:14.0-9
>> Driver version : 6.3.5
>> Capabilities : 0x84a00001
>> Video Capture
>> Metadata Capture
>> Streaming
>> Extended Pix Format
>> Device Capabilities
>> Device Caps : 0x04200001
>> Video Capture
>> Streaming
>> Extended Pix Format
>> Media Driver Info:
>> Driver name : uvcvideo
>> Model : C922 Pro Stream Webcam
>> Serial : 6E8DF1BF
>> Bus info : usb-0000:00:14.0-9
>> Media version : 6.3.5
>> Hardware revision: 0x00000016 (22)
>> Driver version : 6.3.5
>> Interface Info:
>> ID : 0x03000002
>> Type : V4L Video
>> Entity Info:
>> ID : 0x00000001 (1)
>> Name : C922 Pro Stream Webcam
>> Function : V4L2 I/O
>> Flags : default
>> Pad 0x01000007 : 0: Sink
>> Link 0x0200001f: from remote pad 0x100000a of entity 'Processing
>> 3' (Video Pixel Formatter): Data, Enabled, Immutable
>> Priority: 2
>> Video input : 0 (Camera 1: ok)
>> Format Video Capture:
>> Width/Height : 160/90
>> Pixel Format : 'YUYV' (YUYV 4:2:2)
>> Field : None
>> Bytes per Line : 320
>> Size Image : 28800
>> Colorspace : sRGB
>> Transfer Function : Rec. 709
>> YCbCr/HSV Encoding: ITU-R 601
>> Quantization : Default (maps to Limited Range)
>> Flags : Crop Capability Video Capture:
>> Bounds : Left 0, Top 0, Width 160, Height 90
>> Default : Left 0, Top 0, Width 160, Height 90
>> Pixel Aspect: 1/1
>> Selection Video Capture: crop_default, Left 0, Top 0, Width 160,
>> Height 90, Flags: Selection Video Capture: crop_bounds, Left 0, Top 0,
>> Width 160, Height 90, Flags: Streaming Parameters Video Capture:
>> Capabilities : timeperframe
>> Frames per second: 30.000 (30/1)
>> Read buffers : 0
>>
>> User Controls
>>
>> brightness 0x00980900 (int) : min=0 max=255
>> step=1 default=128 value=128
>> contrast 0x00980901 (int) : min=0 max=255
>> step=1 default=128 value=128
>> saturation 0x00980902 (int) : min=0 max=255
>> step=1 default=128 value=128
>> white_balance_automatic 0x0098090c (bool) : default=1 value=1
>> gain 0x00980913 (int) : min=0 max=255
>> step=1 default=0 value=0
>> power_line_frequency 0x00980918 (menu) : min=0 max=2
>> default=2 value=2 (60 Hz)
>> 0: Disabled
>> 1: 50 Hz
>> 2: 60 Hz
>> white_balance_temperature 0x0098091a (int) : min=2000
>> max=6500 step=1 default=4000 value=4000 flags=inactive
>> sharpness 0x0098091b (int) : min=0 max=255
>> step=1 default=128 value=128
>> backlight_compensation 0x0098091c (int) : min=0 max=1
>> step=1 default=0 value=0
>>
>> Camera Controls
>>
>> auto_exposure 0x009a0901 (menu) : min=0 max=3
>> default=3 value=3 (Aperture Priority Mode)
>> 1: Manual Mode
>> 3: Aperture Priority Mode
>> exposure_time_absolute 0x009a0902 (int) : min=3 max=2047
>> step=1 default=250 value=250 flags=inactive
>> exposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=1
>> pan_absolute 0x009a0908 (int) : min=-36000
>> max=36000 step=3600 default=0 value=0
>> tilt_absolute 0x009a0909 (int) : min=-36000
>> max=36000 step=3600 default=0 value=0
>> focus_absolute 0x009a090a (int) : min=0 max=250
>> step=5 default=0 value=0 flags=inactive
>> focus_automatic_continuous 0x009a090c (bool) : default=1 value=1
>> zoom_absolute 0x009a090d (int) : min=100 max=500
>> step=1 default=100 value=100
>> led1_mode 0x0a046d05 (menu) : min=4 max=4
>> default=0 value=0
>> 4: led1_frequency 0x0a046d06 (int)
>> : min=0 max=255 step=1 default=0 value=255
To be sure the issue doesn't fall through the cracks unnoticed, I'm
adding it to regzbot, the Linux kernel regression tracking bot:
#regzbot ^introduced v6.1..v6.3
#regzbot title media: uvcvideo: Webcam LED control regression
#regzbot ignore-activity
This isn't a regression? This issue or a fix for it are already
discussed somewhere else? It was fixed already? You want to clarify when
the regression started to happen? Or point out I got the title or
something else totally wrong? Then just reply and tell me -- ideally
while also telling regzbot about it, as explained by the page listed in
the footer of this mail.
Developers: When fixing the issue, remember to add 'Link:' tags pointing
to the report (the parent of this mail). See page linked in footer for
details.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Webcam LED control regression
2023-06-06 10:40 ` Linux regression tracking (Thorsten Leemhuis)
@ 2023-06-06 17:09 ` Laurent Pinchart
2023-06-06 17:11 ` [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings Laurent Pinchart
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2023-06-06 17:09 UTC (permalink / raw)
To: Linux regressions mailing list
Cc: linux-media, Poncho, Mauro Carvalho Chehab, LKML, Ricardo Ribalda
Hello,
CC'ing Ricardo.
On Tue, Jun 06, 2023 at 12:40:25PM +0200, Linux regression tracking (Thorsten Leemhuis) wrote:
> CCing a few people and lists that should be aware of this and might be
> able to help.
>
> On 05.06.23 18:39, Poncho wrote:
> > With kernel 6.3, the LED of my C922 Pro Stream Webcam is no longer
> > controllable.
> >
> > With kernel 6.1 v4l2-ctl --all returns:
> >
> >> led1_mode 0x0a046d05 (menu) : min=0 max=3 default=0 value=0 (Off)
> >> 0: Off
> >> 1: On
> >> 2: Blink
> >> 3: Auto
> >
> >
> >
> > but with kernel 6.3 I get:
> >
> >> led1_mode 0x0a046d05 (menu) : min=4 max=4 default=0 value=0
> >> 4:
>
> Thanks for the report.
>
> FWIW, maybe one of those people that I CCed has an idea what's wrong. If
> none of them brings one to the table withing the next two or three days,
> you likely have to perform a bisection to find the change that broke
> thing for you.
I suspect commit 716c330433e3 ("media: uvcvideo: Use standard names for
menus") to be the culprit. I'll post a (untested) candidate fix in reply
to this e-mail.
> For the rest of this mail:
>
> [TLDR: I'm adding this report to the list of tracked Linux kernel
> regressions; the text you find below is based on a few templates
> paragraphs you might have encountered already in similar form.
> See link in footer if these mails annoy you.]
>
> > Full output bellow:
> >
> >> Driver Info:
> >> Driver name : uvcvideo
> >> Card type : C922 Pro Stream Webcam
> >> Bus info : usb-0000:00:14.0-9
> >> Driver version : 6.3.5
> >> Capabilities : 0x84a00001
> >> Video Capture
> >> Metadata Capture
> >> Streaming
> >> Extended Pix Format
> >> Device Capabilities
> >> Device Caps : 0x04200001
> >> Video Capture
> >> Streaming
> >> Extended Pix Format
> >> Media Driver Info:
> >> Driver name : uvcvideo
> >> Model : C922 Pro Stream Webcam
> >> Serial : 6E8DF1BF
> >> Bus info : usb-0000:00:14.0-9
> >> Media version : 6.3.5
> >> Hardware revision: 0x00000016 (22)
> >> Driver version : 6.3.5
> >> Interface Info:
> >> ID : 0x03000002
> >> Type : V4L Video
> >> Entity Info:
> >> ID : 0x00000001 (1)
> >> Name : C922 Pro Stream Webcam
> >> Function : V4L2 I/O
> >> Flags : default
> >> Pad 0x01000007 : 0: Sink
> >> Link 0x0200001f: from remote pad 0x100000a of entity 'Processing 3' (Video Pixel Formatter): Data, Enabled, Immutable
> >> Priority: 2
> >> Video input : 0 (Camera 1: ok)
> >> Format Video Capture:
> >> Width/Height : 160/90
> >> Pixel Format : 'YUYV' (YUYV 4:2:2)
> >> Field : None
> >> Bytes per Line : 320
> >> Size Image : 28800
> >> Colorspace : sRGB
> >> Transfer Function : Rec. 709
> >> YCbCr/HSV Encoding: ITU-R 601
> >> Quantization : Default (maps to Limited Range)
> >> Flags : Crop Capability Video Capture:
> >> Bounds : Left 0, Top 0, Width 160, Height 90
> >> Default : Left 0, Top 0, Width 160, Height 90
> >> Pixel Aspect: 1/1
> >> Selection Video Capture: crop_default, Left 0, Top 0, Width 160,
> >> Height 90, Flags: Selection Video Capture: crop_bounds, Left 0, Top 0,
> >> Width 160, Height 90, Flags: Streaming Parameters Video Capture:
> >> Capabilities : timeperframe
> >> Frames per second: 30.000 (30/1)
> >> Read buffers : 0
> >>
> >> User Controls
> >>
> >> brightness 0x00980900 (int) : min=0 max=255 step=1 default=128 value=128
> >> contrast 0x00980901 (int) : min=0 max=255 step=1 default=128 value=128
> >> saturation 0x00980902 (int) : min=0 max=255 step=1 default=128 value=128
> >> white_balance_automatic 0x0098090c (bool) : default=1 value=1
> >> gain 0x00980913 (int) : min=0 max=255 step=1 default=0 value=0
> >> power_line_frequency 0x00980918 (menu) : min=0 max=2 default=2 value=2 (60 Hz)
> >> 0: Disabled
> >> 1: 50 Hz
> >> 2: 60 Hz
> >> white_balance_temperature 0x0098091a (int) : min=2000 max=6500 step=1 default=4000 value=4000 flags=inactive
> >> sharpness 0x0098091b (int) : min=0 max=255 step=1 default=128 value=128
> >> backlight_compensation 0x0098091c (int) : min=0 max=1 step=1 default=0 value=0
> >>
> >> Camera Controls
> >>
> >> auto_exposure 0x009a0901 (menu) : min=0 max=3 default=3 value=3 (Aperture Priority Mode)
> >> 1: Manual Mode
> >> 3: Aperture Priority Mode
> >> exposure_time_absolute 0x009a0902 (int) : min=3 max=2047 step=1 default=250 value=250 flags=inactive
> >> exposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=1
> >> pan_absolute 0x009a0908 (int) : min=-36000 max=36000 step=3600 default=0 value=0
> >> tilt_absolute 0x009a0909 (int) : min=-36000 max=36000 step=3600 default=0 value=0
> >> focus_absolute 0x009a090a (int) : min=0 max=250 step=5 default=0 value=0 flags=inactive
> >> focus_automatic_continuous 0x009a090c (bool) : default=1 value=1
> >> zoom_absolute 0x009a090d (int) : min=100 max=500 step=1 default=100 value=100
> >> led1_mode 0x0a046d05 (menu) : min=4 max=4 default=0 value=0
> >> 4: led1_frequency 0x0a046d06 (int)
> >> : min=0 max=255 step=1 default=0 value=255
>
> To be sure the issue doesn't fall through the cracks unnoticed, I'm
> adding it to regzbot, the Linux kernel regression tracking bot:
>
> #regzbot ^introduced v6.1..v6.3
> #regzbot title media: uvcvideo: Webcam LED control regression
> #regzbot ignore-activity
>
> This isn't a regression? This issue or a fix for it are already
> discussed somewhere else? It was fixed already? You want to clarify when
> the regression started to happen? Or point out I got the title or
> something else totally wrong? Then just reply and tell me -- ideally
> while also telling regzbot about it, as explained by the page listed in
> the footer of this mail.
>
> Developers: When fixing the issue, remember to add 'Link:' tags pointing
> to the report (the parent of this mail). See page linked in footer for
> details.
>
> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
> --
> Everything you wanna know about Linux kernel regression tracking:
> https://linux-regtracking.leemhuis.info/about/#tldr
> That page also explains what to do if mails like this annoy you.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-06 17:09 ` Laurent Pinchart
@ 2023-06-06 17:11 ` Laurent Pinchart
2023-06-06 17:49 ` Poncho
` (3 more replies)
0 siblings, 4 replies; 12+ messages in thread
From: Laurent Pinchart @ 2023-06-06 17:11 UTC (permalink / raw)
To: linux-media
Cc: Ricardo Ribalda, Poncho,
Linux regression tracking (Thorsten Leemhuis),
regressions
When commit 716c330433e3 ("media: uvcvideo: Use standard names for
menus") reworked the handling of menu controls, it inadvertently
replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
equivalent to the former, which broke adding XU mappings from userspace.
Fix it.
Reported-by: Poncho <poncho@spahan.ch>
Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
This is untested. Poncho, would you be able to test this patch to see if
it fixes your issue ?
---
drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 5ac2a424b13d..f4988f03640a 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
map->menu_names = NULL;
map->menu_mapping = NULL;
- map->menu_mask = BIT_MASK(xmap->menu_count);
+ map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
size = xmap->menu_count * sizeof(*map->menu_mapping);
map->menu_mapping = kzalloc(size, GFP_KERNEL);
--
Regards,
Laurent Pinchart
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-06 17:11 ` [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings Laurent Pinchart
@ 2023-06-06 17:49 ` Poncho
2023-06-06 18:26 ` Ricardo Ribalda
` (2 subsequent siblings)
3 siblings, 0 replies; 12+ messages in thread
From: Poncho @ 2023-06-06 17:49 UTC (permalink / raw)
To: Laurent Pinchart, linux-media
Cc: Ricardo Ribalda, Linux regression tracking (Thorsten Leemhuis),
regressions
On 06.06.23 19:11, Laurent Pinchart wrote:
> This is untested. Poncho, would you be able to test this patch to see if
> it fixes your issue ?
Yes, your patch on top of 6.3.6 does fix my issue.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-06 17:11 ` [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings Laurent Pinchart
2023-06-06 17:49 ` Poncho
@ 2023-06-06 18:26 ` Ricardo Ribalda
2023-06-06 18:43 ` Linux regression tracking (Thorsten Leemhuis)
2023-06-21 15:26 ` Poncho
3 siblings, 0 replies; 12+ messages in thread
From: Ricardo Ribalda @ 2023-06-06 18:26 UTC (permalink / raw)
To: Laurent Pinchart
Cc: linux-media, Poncho,
Linux regression tracking (Thorsten Leemhuis),
regressions
Hi Laurent
On Tue, 6 Jun 2023 at 19:11, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> When commit 716c330433e3 ("media: uvcvideo: Use standard names for
> menus") reworked the handling of menu controls, it inadvertently
> replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
> equivalent to the former, which broke adding XU mappings from userspace.
> Fix it.
Ups, that was wrong :), sorry about that
Thanks for the quick fix.
>
> Reported-by: Poncho <poncho@spahan.ch>
> Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
> Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
> This is untested. Poncho, would you be able to test this patch to see if
> it fixes your issue ?
> ---
> drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> index 5ac2a424b13d..f4988f03640a 100644
> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
> map->menu_names = NULL;
> map->menu_mapping = NULL;
>
> - map->menu_mask = BIT_MASK(xmap->menu_count);
> + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
>
> size = xmap->menu_count * sizeof(*map->menu_mapping);
> map->menu_mapping = kzalloc(size, GFP_KERNEL);
> --
> Regards,
>
> Laurent Pinchart
>
--
Ricardo Ribalda
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-06 17:11 ` [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings Laurent Pinchart
2023-06-06 17:49 ` Poncho
2023-06-06 18:26 ` Ricardo Ribalda
@ 2023-06-06 18:43 ` Linux regression tracking (Thorsten Leemhuis)
2023-06-21 15:26 ` Poncho
3 siblings, 0 replies; 12+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-06-06 18:43 UTC (permalink / raw)
To: Laurent Pinchart, linux-media; +Cc: Ricardo Ribalda, Poncho, regressions
On 06.06.23 19:11, Laurent Pinchart wrote:
> When commit 716c330433e3 ("media: uvcvideo: Use standard names for
> menus") reworked the handling of menu controls, it inadvertently
> replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
> equivalent to the former, which broke adding XU mappings from userspace.
> Fix it.
>
> Reported-by: Poncho <poncho@spahan.ch>
> Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
> Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
Many thx for looking into this. Please consider adding
Cc: stable@vger.kernel.org
to get this fixed in 6.3.y, as a fixes tag alone is not enough to
guarantee a backport attempt by the stable team.
Ciao, Thorsten
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> This is untested. Poncho, would you be able to test this patch to see if
> it fixes your issue ?
> ---
> drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> index 5ac2a424b13d..f4988f03640a 100644
> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
> map->menu_names = NULL;
> map->menu_mapping = NULL;
>
> - map->menu_mask = BIT_MASK(xmap->menu_count);
> + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
>
> size = xmap->menu_count * sizeof(*map->menu_mapping);
> map->menu_mapping = kzalloc(size, GFP_KERNEL);
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-06 17:11 ` [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings Laurent Pinchart
` (2 preceding siblings ...)
2023-06-06 18:43 ` Linux regression tracking (Thorsten Leemhuis)
@ 2023-06-21 15:26 ` Poncho
2023-06-24 0:25 ` Laurent Pinchart
3 siblings, 1 reply; 12+ messages in thread
From: Poncho @ 2023-06-21 15:26 UTC (permalink / raw)
To: Laurent Pinchart, linux-media
Cc: Ricardo Ribalda, Linux regression tracking (Thorsten Leemhuis),
regressions
Hi Laurent
Friendly ping. I think this patch was forgotten.
Best regards,
Poncho
On 06.06.23 19:11, Laurent Pinchart wrote:
> When commit 716c330433e3 ("media: uvcvideo: Use standard names for
> menus") reworked the handling of menu controls, it inadvertently
> replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
> equivalent to the former, which broke adding XU mappings from userspace.
> Fix it.
>
> Reported-by: Poncho <poncho@spahan.ch>
> Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
> Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> This is untested. Poncho, would you be able to test this patch to see if
> it fixes your issue ?
> ---
> drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> index 5ac2a424b13d..f4988f03640a 100644
> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
> map->menu_names = NULL;
> map->menu_mapping = NULL;
>
> - map->menu_mask = BIT_MASK(xmap->menu_count);
> + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
>
> size = xmap->menu_count * sizeof(*map->menu_mapping);
> map->menu_mapping = kzalloc(size, GFP_KERNEL);
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-21 15:26 ` Poncho
@ 2023-06-24 0:25 ` Laurent Pinchart
2023-06-24 9:07 ` Thorsten Leemhuis
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2023-06-24 0:25 UTC (permalink / raw)
To: Poncho
Cc: linux-media, Ricardo Ribalda,
Linux regression tracking (Thorsten Leemhuis),
regressions
Hello,
On Wed, Jun 21, 2023 at 05:26:39PM +0200, Poncho wrote:
> Hi Laurent
>
> Friendly ping. I think this patch was forgotten.
Thanks for the reminder. I'll send a pull request for v6.6.
> On 06.06.23 19:11, Laurent Pinchart wrote:
> > When commit 716c330433e3 ("media: uvcvideo: Use standard names for
> > menus") reworked the handling of menu controls, it inadvertently
> > replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
> > equivalent to the former, which broke adding XU mappings from userspace.
> > Fix it.
> >
> > Reported-by: Poncho <poncho@spahan.ch>
> > Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
> > Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> > This is untested. Poncho, would you be able to test this patch to see if
> > it fixes your issue ?
> > ---
> > drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> > index 5ac2a424b13d..f4988f03640a 100644
> > --- a/drivers/media/usb/uvc/uvc_v4l2.c
> > +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> > @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
> > map->menu_names = NULL;
> > map->menu_mapping = NULL;
> >
> > - map->menu_mask = BIT_MASK(xmap->menu_count);
> > + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
> >
> > size = xmap->menu_count * sizeof(*map->menu_mapping);
> > map->menu_mapping = kzalloc(size, GFP_KERNEL);
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-24 0:25 ` Laurent Pinchart
@ 2023-06-24 9:07 ` Thorsten Leemhuis
2023-06-24 10:40 ` Laurent Pinchart
0 siblings, 1 reply; 12+ messages in thread
From: Thorsten Leemhuis @ 2023-06-24 9:07 UTC (permalink / raw)
To: Laurent Pinchart, Poncho; +Cc: linux-media, Ricardo Ribalda, regressions
On 24.06.23 02:25, Laurent Pinchart wrote:
>
> On Wed, Jun 21, 2023 at 05:26:39PM +0200, Poncho wrote:
>> Hi Laurent
>>
>> Friendly ping. I think this patch was forgotten.
> Thanks for the reminder. I'll send a pull request for v6.6.
Why 6.6? If this would be a feature I'd fully understand. But this
afaics fixes a regression and thus should be handled as one, even if
it's a regression from a earlier release. For details see this recent
mail from Linus:
https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@mail.gmail.com/
Side note: as it's a regression it would be good if this commit had a
"CC: <stable..." tag as well.
Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
--
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.
>> On 06.06.23 19:11, Laurent Pinchart wrote:
>>> When commit 716c330433e3 ("media: uvcvideo: Use standard names for
>>> menus") reworked the handling of menu controls, it inadvertently
>>> replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
>>> equivalent to the former, which broke adding XU mappings from userspace.
>>> Fix it.
>>>
>>> Reported-by: Poncho <poncho@spahan.ch>
>>> Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
>>> Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>> ---
>>> This is untested. Poncho, would you be able to test this patch to see if
>>> it fixes your issue ?
>>> ---
>>> drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
>>> index 5ac2a424b13d..f4988f03640a 100644
>>> --- a/drivers/media/usb/uvc/uvc_v4l2.c
>>> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
>>> @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
>>> map->menu_names = NULL;
>>> map->menu_mapping = NULL;
>>>
>>> - map->menu_mask = BIT_MASK(xmap->menu_count);
>>> + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
>>>
>>> size = xmap->menu_count * sizeof(*map->menu_mapping);
>>> map->menu_mapping = kzalloc(size, GFP_KERNEL);
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-24 9:07 ` Thorsten Leemhuis
@ 2023-06-24 10:40 ` Laurent Pinchart
2023-06-24 12:02 ` Linux regression tracking (Thorsten Leemhuis)
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2023-06-24 10:40 UTC (permalink / raw)
To: Thorsten Leemhuis; +Cc: Poncho, linux-media, Ricardo Ribalda, regressions
Hi Thorsten,
On Sat, Jun 24, 2023 at 11:07:14AM +0200, Thorsten Leemhuis wrote:
> On 24.06.23 02:25, Laurent Pinchart wrote:
> > On Wed, Jun 21, 2023 at 05:26:39PM +0200, Poncho wrote:
> >> Hi Laurent
> >>
> >> Friendly ping. I think this patch was forgotten.
> > Thanks for the reminder. I'll send a pull request for v6.6.
>
> Why 6.6? If this would be a feature I'd fully understand. But this
> afaics fixes a regression and thus should be handled as one, even if
> it's a regression from a earlier release. For details see this recent
> mail from Linus:
>
> https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@mail.gmail.com/
Linus has decided to not pull from the media tree for the next kernel
release due to a set of mishaps, see
https://lore.kernel.org/linux-media/CAHk-=wgzU8_dGn0Yg+DyX7ammTkDUCyEJ4C=NvnHRhxKWC7Wpw@mail.gmail.com/.
Re-reading the mail, fixes should be fine even if the issue has been
there for several releases. I'll send send a pull request for v6.5.
> Side note: as it's a regression it would be good if this commit had a
> "CC: <stable..." tag as well.
I've already added that to my tree.
> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
> --
> Everything you wanna know about Linux kernel regression tracking:
> https://linux-regtracking.leemhuis.info/about/#tldr
> If I did something stupid, please tell me, as explained on that page.
>
> >> On 06.06.23 19:11, Laurent Pinchart wrote:
> >>> When commit 716c330433e3 ("media: uvcvideo: Use standard names for
> >>> menus") reworked the handling of menu controls, it inadvertently
> >>> replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
> >>> equivalent to the former, which broke adding XU mappings from userspace.
> >>> Fix it.
> >>>
> >>> Reported-by: Poncho <poncho@spahan.ch>
> >>> Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
> >>> Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
> >>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >>> ---
> >>> This is untested. Poncho, would you be able to test this patch to see if
> >>> it fixes your issue ?
> >>> ---
> >>> drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>>
> >>> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
> >>> index 5ac2a424b13d..f4988f03640a 100644
> >>> --- a/drivers/media/usb/uvc/uvc_v4l2.c
> >>> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
> >>> @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
> >>> map->menu_names = NULL;
> >>> map->menu_mapping = NULL;
> >>>
> >>> - map->menu_mask = BIT_MASK(xmap->menu_count);
> >>> + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
> >>>
> >>> size = xmap->menu_count * sizeof(*map->menu_mapping);
> >>> map->menu_mapping = kzalloc(size, GFP_KERNEL);
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings
2023-06-24 10:40 ` Laurent Pinchart
@ 2023-06-24 12:02 ` Linux regression tracking (Thorsten Leemhuis)
0 siblings, 0 replies; 12+ messages in thread
From: Linux regression tracking (Thorsten Leemhuis) @ 2023-06-24 12:02 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Poncho, linux-media, Ricardo Ribalda, regressions
On 24.06.23 12:40, Laurent Pinchart wrote:
> On Sat, Jun 24, 2023 at 11:07:14AM +0200, Thorsten Leemhuis wrote:
>> On 24.06.23 02:25, Laurent Pinchart wrote:
>>> On Wed, Jun 21, 2023 at 05:26:39PM +0200, Poncho wrote:
>>>> Friendly ping. I think this patch was forgotten.
>>> Thanks for the reminder. I'll send a pull request for v6.6.
>>
>> Why 6.6? If this would be a feature I'd fully understand. But this
>> afaics fixes a regression and thus should be handled as one, even if
>> it's a regression from a earlier release. For details see this recent
>> mail from Linus:
>>
>> https://lore.kernel.org/all/CAHk-=wis_qQy4oDNynNKi5b7Qhosmxtoj1jxo5wmB6SRUwQUBQ@mail.gmail.com/
>
> Linus has decided to not pull from the media tree for the next kernel
> release due to a set of mishaps, see
> https://lore.kernel.org/linux-media/CAHk-=wgzU8_dGn0Yg+DyX7ammTkDUCyEJ4C=NvnHRhxKWC7Wpw@mail.gmail.com/.
Yeah, I remember.
> Re-reading the mail, fixes should be fine
Yup, he even pulled some fixes during this cycle.
> even if the issue has been
> there for several releases. I'll send send a pull request for v6.5.
Great, thx!
>> Side note: as it's a regression it would be good if this commit had a
>> "CC: <stable..." tag as well.
> I've already added that to my tree.
Thx, too!
Ciao, Thorsten
>> Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat)
>> --
>> Everything you wanna know about Linux kernel regression tracking:
>> https://linux-regtracking.leemhuis.info/about/#tldr
>> If I did something stupid, please tell me, as explained on that page.
>>
>>>> On 06.06.23 19:11, Laurent Pinchart wrote:
>>>>> When commit 716c330433e3 ("media: uvcvideo: Use standard names for
>>>>> menus") reworked the handling of menu controls, it inadvertently
>>>>> replaced a GENMASK(n - 1, 0) with a BIT_MASK(n). The latter isn't
>>>>> equivalent to the former, which broke adding XU mappings from userspace.
>>>>> Fix it.
>>>>>
>>>>> Reported-by: Poncho <poncho@spahan.ch>
>>>>> Link: https://lore.kernel.org/linux-media/468a36ec-c3ac-cb47-e12f-5906239ae3cd@spahan.ch/
>>>>> Fixes: 716c330433e3 ("media: uvcvideo: Use standard names for menus")
>>>>> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>>>>> ---
>>>>> This is untested. Poncho, would you be able to test this patch to see if
>>>>> it fixes your issue ?
>>>>> ---
>>>>> drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
>>>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>>>
>>>>> diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
>>>>> index 5ac2a424b13d..f4988f03640a 100644
>>>>> --- a/drivers/media/usb/uvc/uvc_v4l2.c
>>>>> +++ b/drivers/media/usb/uvc/uvc_v4l2.c
>>>>> @@ -45,7 +45,7 @@ static int uvc_control_add_xu_mapping(struct uvc_video_chain *chain,
>>>>> map->menu_names = NULL;
>>>>> map->menu_mapping = NULL;
>>>>>
>>>>> - map->menu_mask = BIT_MASK(xmap->menu_count);
>>>>> + map->menu_mask = GENMASK(xmap->menu_count - 1, 0);
>>>>>
>>>>> size = xmap->menu_count * sizeof(*map->menu_mapping);
>>>>> map->menu_mapping = kzalloc(size, GFP_KERNEL);
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-06-24 12:03 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 16:39 Webcam LED control regression Poncho
2023-06-06 10:40 ` Linux regression tracking (Thorsten Leemhuis)
2023-06-06 17:09 ` Laurent Pinchart
2023-06-06 17:11 ` [PATCH] media: uvcvideo: Fix menu count handling for userspace XU mappings Laurent Pinchart
2023-06-06 17:49 ` Poncho
2023-06-06 18:26 ` Ricardo Ribalda
2023-06-06 18:43 ` Linux regression tracking (Thorsten Leemhuis)
2023-06-21 15:26 ` Poncho
2023-06-24 0:25 ` Laurent Pinchart
2023-06-24 9:07 ` Thorsten Leemhuis
2023-06-24 10:40 ` Laurent Pinchart
2023-06-24 12:02 ` Linux regression tracking (Thorsten Leemhuis)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).