linux/drivers/media/test-drivers/vimc
Arash Golgol ad4c65fa30 media: vimc: fix pixel format lookup in enum_framesizes
vimc_capture_enum_framesizes() looks up the requested format using
vimc_pix_map_by_code(), which searches the pix map table by media
bus code (MEDIA_BUS_FMT_*).

However, v4l2_frmsizeenum::pixel_format holds a V4L2 pixel format
(V4L2_PIX_FMT_*), not a media bus code, so valid pixel formats end
up being rejected with -EINVAL.

Fix this by using vimc_pix_map_by_pixelformat() instead, which
performs the lookup by pixel format as the ioctl expects.

Fixes: 09c41a23a2 ("media: Revert "media: vimc: propagate pixel format in the stream"")
Cc: stable@vger.kernel.org
Signed-off-by: Arash Golgol <arash.golgol@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2026-07-28 15:17:54 +02:00
..
Kconfig media: Kconfig: cleanup VIDEO_DEV dependencies 2022-03-18 05:58:35 +01:00
Makefile media: vimc: add ancillary lens 2022-07-15 14:40:09 +01:00
vimc-capture.c media: vimc: fix pixel format lookup in enum_framesizes 2026-07-28 15:17:54 +02:00
vimc-common.c media: vimc: Initialize subdev active state 2024-06-26 16:39:34 +02:00
vimc-common.h media: vimc: sensor: Add pixel_rate,vblank and hblank configuration 2026-03-17 10:50:19 +01:00
vimc-core.c media: vimc: fix reference leak on failed device registration 2026-05-05 16:57:02 +02:00
vimc-debayer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vimc-lens.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vimc-scaler.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vimc-sensor.c media: vimc: Ensure that pixel_rate fits in 32 bits 2026-07-10 14:17:56 +02:00
vimc-streamer.c media: vimc: streamer: Apply sensor frame rate in streamer thread 2026-03-17 10:50:19 +01:00
vimc-streamer.h