Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH v1 0/2] media: rockchip: rkcif: Fix a system hang and validate the pixel format
@ 2026-11-12 18:32 Mehdi Djait
  2026-11-12 18:32 ` [PATCH v1 1/2] media: rockchip: rkcif: Don't reset the hardware in runtime suspend Mehdi Djait
  2026-11-12 18:32 ` [PATCH v1 2/2] media: rockchip: rkcif: Validate the pixel format against the media bus code Mehdi Djait
  0 siblings, 2 replies; 7+ messages in thread
From: Mehdi Djait @ 2026-11-12 18:32 UTC (permalink / raw)
  To: michael.riesch
  Cc: linux-media, paul.elder, daniel, linux-rockchip, Mehdi Djait

Hello Michael :)

Sorry for the additional work with this flood of patches...

This series fixes two issues in the rkcif driver that stayed long enough on
my TODO list.

I am using an RK3588 ROCK 5B with an IMX415 sensor.

Patch 1 drops the reset from the runtime suspend. The reset also resets
the VICAP IOMMU and hangs the system when the IOMMU driver accesses the
IOMMU registers at the same time. This was reproduced by repeatedly
starting and stopping the stream with runtime PM enabled.

Steps to reproduce the issue:
* configure the media pipeline
* You can use this script here:
--------------------------------------------------------------------------------
$ cat stream-loop.sh
#!/bin/bash
# Start and stop yavta in a loop: stream for a random 0.1-1 s
# Usage: ./stream-loop.sh [device]

DEV=${1:-/dev/video0}

trap 'echo; echo "stopped after $i iterations"; exit 0' INT

i=0
while true; do
	i=$((i + 1))
	stream=$(printf "0.%03d" $((100 + RANDOM % 900)))

	echo "=== iteration $i: stream ${stream}s"
	timeout -s INT "$stream" yavta -c -f SGBRG10 -s 3864x2192 "$DEV"
done
--------------------------------------------------------------------------------

Patch 2 rejects pipelines where the pixel format does not match the
media bus code on the source pad.

Steps to reproduce the issue:
* configure the media pipeline to use SGBRG10
* try to capture with yavta using the format SGBRG12

Fyi:
Another patch is also needed to not get the timeout everytime the
streaming is stopped but some of the work on that patch is already done
in Daniel's 4th patch:
https://lore.kernel.org/linux-media/cover.1793702189.git.daniel@makrotopia.org/


Mehdi Djait (2):
  media: rockchip: rkcif: Don't reset the hardware in runtime suspend
  media: rockchip: rkcif: Validate the pixel format against the media
    bus code

 .../media/platform/rockchip/rkcif/rkcif-common.h  |  1 -
 drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 15 ---------------
 .../media/platform/rockchip/rkcif/rkcif-stream.c  | 12 ++++++++++++
 3 files changed, 12 insertions(+), 16 deletions(-)

-- 
2.56.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-11-17  9:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-12 18:32 [PATCH v1 0/2] media: rockchip: rkcif: Fix a system hang and validate the pixel format Mehdi Djait
2026-11-12 18:32 ` [PATCH v1 1/2] media: rockchip: rkcif: Don't reset the hardware in runtime suspend Mehdi Djait
2026-11-16 10:58   ` Michael Riesch
2026-11-16 14:30     ` Mehdi Djait
2026-11-17  9:09       ` Mehdi Djait
2026-11-12 18:32 ` [PATCH v1 2/2] media: rockchip: rkcif: Validate the pixel format against the media bus code Mehdi Djait
2026-11-16 10:55   ` Michael Riesch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox