How to calculate esc clock? I am suspecting clock configured by imx8 also. What maximum escape clock supported by imx8?
Currently I assigned 333MHz clock for esc clock.
When I stream data with 30fps, I am getting framerates in the range of 15 to 20.
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RGB3 --set-parm=30 --stream-mmap
Frame rate set to 30.000 fps
[ 201.417005] bypass csc
[ 201.419426] input fmt RGB4
[ 201.422509] output fmt RGB3
<<<<<<<<<<<<<<<<<<<<<<< 21.37 fps
<<<<<<<<<<<<<<<<<<<<< 21.29 fps
<<<<<<<<<<<<<<<<< 19.50 fps
<<<<<<<<<<<<<<<<<< 19.60 fps
<<<<<<<<<<<<<<<<<<<<<<<< 20.03 fps
<<<<<<<<<<<<<<<<<< 19.76 fps
<<<<<<<<<<<<<<<<<<<<< 19.72 fps
<<<<<<<<<<<<<<<<< 19.00 fps
The data will not be streamed if I set fps to 15fps. It will hang while streaming the data.
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RGB3 --set-parm=15 --stream-mmap
Frame rate set to 15.000 fps
[ 292.933426] bypass csc
[ 292.935842] input fmt RGB4
[ 292.938783] output fmt RGB3
By setting it to 60fps, I will achieve a framerate of 50.
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RGB3 --set-parm=60 --stream-mmap
Frame rate set to 60.000 fps
[ 341.047806] bypass csc
[ 341.050182] input fmt RGB4
[ 341.052936] output fmt RGB3
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.51 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.51 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.51 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.51 fps
The data on the TX side is set to 1920x1080 at 15 frames per second.
What caused the FPS to change every time? Does the hs_settle value cause the problem? The following values were given as hs_settle values in the driver.
drivers/staging/media/imx/imx8-mipi-csi2.c
static u8 rxhs_settle[3] = {0xD, 0xA, 0x7};
static struct mxc_hs_info hs_setting[] = {
{2592, 1944, 30, 0x0B},
{2592, 1944, 15, 0x10},
{1920, 1080, 30, 0x0B},
{1920, 1080, 15, 0x10},
{1280, 720, 30, 0x11},
{1280, 720, 15, 0x16},
{1024, 768, 30, 0x11},
{1024, 768, 15, 0x23},
{720, 576, 30, 0x1E},
{720, 576, 15, 0x23},
{720, 480, 30, 0x1E},
{720, 480, 15, 0x23},
{640, 480, 30, 0x1E},
{640, 480, 15, 0x23},
{320, 240, 30, 0x1E},
{320, 240, 15, 0x23},
{176, 144, 30, 0x1E},
{176, 144, 15, 0x23},
};
Can you please provide the more information?