Camera captured abnormal image

Hello
I captured camera using custom board and custom camera on serdes.
first image was captured.
with pix_clk_hz = “62208000”

second image was captured
with pix_clk_hz = “31104000”

I attached dts file
tegra234-p3737-camera-imx390-overlay.dts.txt (22.7 KB)

I think this issue related pix_clk_hz.
But sensor vendor does not provide any information.
Could you please help me to fix this issue.
Thank you and best regard!

hello suengpyo.shin,

it looks there’re two issues,
(1) part of frame (especially the bottom one-fourth) has mislocation, this might due to incorrect surface settings.
(2) some garbage (or, noise) for the 1st line and also 1st frame. do you have embedded metadata line configured?

please see-also SerDes Pixel Clock section to review your serdes_pix_clk_hz settings.
you may have another try with below commands to boost all the VI/CSI/ISP clocks.

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

BTW,
may I also know who’s your sensor vendor?

Hello Jerry Chang
The sensor vendor is HINIX Hi-556W AAA0556NXX, but the camera module manufacturer does not provide any information. The only information provided is 1920x1080 30fps YUV422. Jerry Chang, I’m glad to have your help again.

hello suengpyo.shin,

you may try to examine the sensor streaming by disable preview and shows frame-rate only.
for instance,
$ gst-launch-1.0 -v nvv4l2camerasrc device=/dev/video0 ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=UYVY' ! videorate ! nvvidconv ! 'video/x-raw(memory:NVMM), format=I420' ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0

or…
here’s a sample pipeline for launching camera for stream rendering.
$ gst-launch-1.0 nvv4l2camerasrc device=/dev/video0 ! 'video/x-raw(memory:NVMM), format=(string)UYVY, width=(int)1920, height=(int)1080, framerate=(fraction)30/1, interlace-mode=progressive' ! nvvidconv ! nv3dsink -e

Hello Jerry Chang

I tested with the following settings:
1.pix_clk_hz = “75000000”;
2/pix_clk_hz = “20000000”;
Both case t
he screen flickering appeared as shown in the attached video, and I have attached the error log for when pix_clk_hz = “75000000”;.

It seems we almost succeeded in capturing the screen. I sincerely appreciate all the help you have provided so far. Now, we only need to correct the screen flickering issue.
I tested with the following command:
gst-launch-1.0 v4l2src ! ‘video/x-raw,format=UYVY,width=1920,height=1080’ ! videoconvert ! autovideosink
What attempts should I make?
The log and move are attached
flicker_issue_log.txt (878.5 KB)

hello suengpyo.shin,

I’ve went though the logs,
there’re lots of discarding frame messages.
for example,
[ 194.671275] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072 ignored
discarding frames it means an error report by VI, it’s dropping current capture buffer, and wait for next capture buffer.
however, it looks strange you’ve always dropping frame 0, is it due to frame-index is not increasing?

besides,
there’re also CORRECTABLE_ERRs.
for example,
kworker/1:2-450 [001] ....... 217.017768: rtcpu_nvcsi_intr: tstamp:7823631652 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/1:2-450 [001] ....... 217.017768: rtcpu_nvcsi_intr: tstamp:7823632701 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
the failure reported due to there’re more than one bit error has detected on the data-lane,
this usually due to your sensor side configuration.

moreover,
may I also know what’s resolution of your output display? it sometime due to the display rendering issue.
please try using video convert to force output as 640x480 frames for another trial.
for instance,
$ gst-launch-1.0 v4l2src ! ‘video/x-raw,format=UYVY,width=1920,height=1080’ ! nvvidconv ! 'video/x-raw, format=(string)I420, width=640, height=480' ! queue ! xvimagesink -e