linux/drivers/media
Laurent Pinchart d17d21bb0e media: renesas: vsp1: histo: Fix format setting
The histogram .set_fmt() handler suffers from two problems:

- When operating on the source pad, it returns correct information to
  userspace, but does not store the format in the subdev state.
  Subsequent calls to .get_fmt(), handled by the
  vsp1_subdev_get_pad_format() helper, will not return the correct
  information.

- When operating on the sink pad, it uses the
  vsp1_subdev_set_pad_format(), which propagates the sink format to the
  source, incorrectly overwriting the fixed source format.

The first issue could be fixed by implementing the set format operation
with vsp1_subdev_get_pad_format() on the source pad, if it wasn't that
.set_fmt() is also used to initialize the subdev state in
vsp1_entity_init_state(). The histogram would need a custom
.init_state() handler.

As the second issue would anyway overwrite the format, and therefore
requires a custom .set_fmt() implementation, fix both issues without
using the helpers.

Tested-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> # HiHope RZ/G2M
Link: https://patch.msgid.link/20260318235907.831556-12-laurent.pinchart+renesas@ideasonboard.com
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
History 2026-03-25 10:25:49 +01:00
..
cec media: rc: fix race between unregister and urb/irq callbacks 2026-03-17 14:43:56 +01:00
common media: uvcvideo: Add support for P010 pixel format 2026-03-25 09:40:28 +01:00
dvb-core media: dvb-core: fix wrong reinitialization of ringbuffer on reopen 2026-02-24 12:39:00 -08:00
dvb-frontends media: au0828: Add new Hauppauge HVR1265 and ImpactVCB-e 2026-03-17 10:50:19 +01:00
firewire Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
i2c media: ov02a10, dw9768: Remove Dongchung's e-mail 2026-03-24 11:58:02 +01:00
mc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mmc Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pci media: rc: fix race between unregister and urb/irq callbacks 2026-03-17 14:43:56 +01:00
platform media: renesas: vsp1: histo: Fix format setting 2026-03-25 10:25:49 +01:00
radio Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
rc media: lirc: increase IR_MAX_DURATION to send extended code sequences 2026-03-17 14:43:57 +01:00
spi Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
test-drivers media: vimc: streamer: Apply sensor frame rate in streamer thread 2026-03-17 10:50:19 +01:00
tuners media: xc5000: Add rf strength function 2026-03-17 10:50:19 +01:00
usb media: uvcvideo: Add support for P010 pixel format 2026-03-25 09:40:28 +01:00
v4l2-core media: subdev: Split v4l2_subdev_get_frame_desc_passthrough() into locked and unlocked 2026-03-24 11:58:02 +01:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile media: Makefiles: remove extra spaces 2022-03-12 16:59:52 +01:00