@khang_letruongThanks for the support, I appreciate it. So far I've been able to execute start_isp.sh without errors, the log is as follows.
/opt/imx8-isp/bin# ./start_isp.sh
Starting isp_media_server with OV5640
RUN_SCRIPT=/opt/imx8-isp/bin/run.sh
RUN_SCRIPT_PATH=/opt/imx8-isp/bin
Trying configuration "ov5640"...
Removing vvcam-isp...
[ 142.597453] enter viv_isp_exit_module
[ 142.601271] enter isp_hw_remove
[ 142.604439] vvcam isp driver removed
Removing vvcam-dwe...
[ 142.641720] enter viv_dwe_exit_module
[ 142.645517] enter dwe_hw_remove
[ 142.648798] enter fake_pdev_release
[ 142.652319] vvcam dewarp driver removed
Removing vvcam-video...
Removing imx8-media-dev...
[ 142.706337] : Unregistered all entities
Removing ov5640...
[ 142.752475] enter ov5640_remove
[ 142.755626] ov5640 power off
[ 142.758829] enter ov5640_regulator_disable
[ 142.763409] enter ov5640_remove
[ 142.766595] ov5640 power off
[ 142.769964] enter ov5640_regulator_disable
Removing ov2775...
Removing os08a20...
Removing basler-camera-driver-vvcam...
Loading module ov5640 ...
ov5640
[ 142.923721] enter ov5640_probe
[ 142.927950] enter ov5640_retrieve_capture_properties
[ 142.932955] ov5640 1-003c: supply DOVDD not found, using dummy regulator
[ 142.939948] ov5640 1-003c: supply DVDD not found, using dummy regulator
[ 142.946767] ov5640 1-003c: supply AVDD not found, using dummy regulator
[ 142.953459] enter ov5640_set_clk_rate
[ 142.957161] ov5640 power on
[ 142.960239] ov5640 resetting
[ 143.048885] Chip ID = 0x5640
[ 143.051781] ov5640_probe camera mipi ov5640, is found
[ 143.057043] enter ov5640_probe
[ 143.061194] enter ov5640_retrieve_capture_properties
[ 143.066198] ov5640 3-003c: supply DOVDD not found, using dummy regulator
[ 143.073060] ov5640 3-003c: supply DVDD not found, using dummy regulator
[ 143.079780] ov5640 3-003c: supply AVDD not found, using dummy regulator
[ 143.086499] enter ov5640_set_clk_rate
[ 143.090197] ov5640 power on
[ 143.093276] ov5640 resetting
[ 143.184881] Chip ID = 0x5640
[ 143.187777] ov5640_probe camera mipi ov5640, is found
Loaded /lib/modules/5.10.52+gf455d15ccde8/extra/sensor/ov5640/ov5640.ko
Loading module imx8-media-dev ...
imx8_media_dev
[ 143.224037] imx8_media_dev: module is from the staging directory, the quality is unknown, you have been warned.
[ 143.234847] mx8-img-md: Registered sensor subdevice: ov5640 3-003c (1)
[ 143.241455] mx8-img-md: Registered sensor subdevice: ov5640 1-003c (2)
[ 143.248057] enter ov5640_link_setup
[ 143.251558] mx8-img-md: created link [ov5640 1-003c] => [mxc-mipi-csi2.0]
[ 143.258371] enter ov5640_link_setup
[ 143.261885] mx8-img-md: created link [ov5640 3-003c] => [mxc-mipi-csi2.1]
[ 143.268694] mxc-md 32c00000.bus:camera: mxc_md_create_links
[ 143.277847] ov5640_priv_ioctl: CMD = 0x80685600
[ 143.280641] ov5640_priv_ioctl: CMD = 0x80685600
[ 143.285231] enter ov5640_query_capability
Loaded /lib/modules/5.10.52+gf455[ 143.286962] enter ov5640_query_capability
d15ccde8/kernel/drivers/staging/media/imx/imx8-media-dev.ko
Loading module vvcam-video ...
vvcam_video
[ 143.329094] enter viv_video_init_module
Loaded /lib/modules/5.10.52+gf455d15ccde8/extra/video/vvcam-video.ko
Loading module vvcam-dwe ...
vvcam_dwe
[ 143.366613] enter viv_dwe_init_module
[ 143.370573] enter dwe_hw_probe
[ 143.373957] vvcam dewarp driver probed
Loaded /lib/modules/5.10.52+gf455d15ccde8/extra/vvcam-dwe.ko
Loading module vvcam-isp ...
vvcam_isp
[ 143.409671] enter viv_isp_init_module
[ 143.413712] enter isp_hw_probe
[ 143.417172] vvcam isp driver registered
Loaded /lib/modules/5.10.52+gf455d15ccde8/extra/vvcam-isp.ko
Starting isp_media_server with c[ 143.428030] enter isp_mi_stop
onfiguration file CAMERA0
When I try to play the video stream using gstreamer there are no errors. The log is:
/opt/imx8-isp/bin# gst-launch-1.0 -v v4l2src device=/dev/video0 ! "video/x-raw,format=YUY2,width=3840,height=2160" ! queue ! imxvideoconvert_g2d ! waylandsink
[ 363.172878] ov5640_priv_ioctl: CMD = 0x80685600
[ 363.177423] enter ov5640_query_capability
[ 363.181688] ov5640_priv_ioctl: CMD = 0x80685600
[ 363.186257] enter ov5640_query_capability
[ 363.200339] enter isp_mi_stop
Setting pipeline to PAUSED ...
[ 363.269814] ov5640_priv_ioctl: CMD = 0x80685600
Pipeline is live and does not nee[ 363.274821] enter ov5640_query_capability
d PREROLL ...
Pipeline is PREROL[ 363.281727] ov5640_priv_ioctl: CMD = 0x80685600
LED ...
Setting pipeline to PLAY[ 363.289094] enter ov5640_query_capability
ING ...
New clock: GstSystemClock
[ 363.340146] ov5640_priv_ioctl: CMD = 0x80685600
[ 363.344703] enter ov5640_query_capability
[ 363.348798] ov5640_priv_ioctl: CMD = 0x80685600
[ 363.353375] enter ov5640_query_capability
loading [ov5640.drv]...
OV5640_IsiHalQuerySensorIss (en[ 363.369883] ov5640_priv_ioctl: CMD = 0x105
ter)
[ 363.376855] enter ov5640_query_supports
OV5640_IsiHalQuerySensorIss (exit[ 363.381900] ov5640_priv_ioctl: CMD = 0x80685600
)
WARN : [DEWARP_HW][ 363.388755] enter ov5640_query_capability
dwe type /dev/v4l-subdev0 0 [ 363.395665] ov5640_priv_ioctl: CMD = 0x80685600
WARN : [DEWARP_HW] [ 363.403047] enter ov5640_query_capability
dwe type /dev/v4l-subdev1 1
WARN : [DEWARP_HW] dwe type /dev/v4l-subdev2 2
WARN : [DEWARP_HW] dwe type /dev/v4l-subdev3 3
WARN : [DEWARP_HW] dwe type /dev/v4l-subdev4 4
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mo1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interl1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=1
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=[ 363.527092] ov5640_priv_ioctl: CMD = 0x105
(int)3840, height=(int)2160, fram[ 363.532622] enter ov5640_query_supports
erate=(fraction)30/1, pixel-aspec[ 363.539386] ov5640_priv_ioctl: CMD = 0x101
t-ratio=(fraction)1/1, interlace-[ 363.546333] ov5640_priv_ioctl: CMD = 0x104
mode=(string)progressive, colorim[ 363.553299] ov5640_priv_ioctl: CMD = 0x103
etry=(string)2:6:11:1
/GstPipeli[ 363.560261] ov5640_priv_ioctl: CMD = 0x100
ne:pipeline0/imxvideoconvert_g2d:[ 363.567218] ov5640_priv_ioctl: CMD = 0x106
imxvideoconvert_g2d0.GstPad:src: [ 363.574205] enter ov5640_set_sensor_mode
caps = video/x-raw, width=(int)38[ 363.580987] ov5640_priv_ioctl: CMD = 0x107
40, height=(int)2160, framerate=([ 363.587950] enter ov5640_get_sensor_mode
fraction)30/1, pixel-aspect-ratio[ 363.594785] ov5640_priv_ioctl: CMD = 0x105
=(fraction)1/1, interlace-mode=(s[ 363.601720] enter ov5640_query_supports
tring)progressive, colorimetry=(s[ 363.609673] enter isp_mi_stop
tring)2:6:11:1, format=(string)BG[ 363.616828] enter ov5640_set_fmt
Rx
/GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, width=(int)3840, height=(int)2160, framerate=(fraction)30/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)px
/GstPipeline:pipeline0/imxvideoconvert_g2d:imxvideoconvert_g2d0.GstPad:sink: caps = video/x-raw, format=(string)YUY2, width=(int)3840, [ 363.652933] ov5640_set_fmt: 1920x1080
height=(int)2160, framerate=(frac[ 363.659203] enter ov5640_get_format_code
tion)30/1, pixel-aspect-ratio=(fr[ 363.665988] ov5640_get_format_code: pattern = 0x3 | bit_width = 0xa
action)1/1, interlace-mode=(strin[ 363.675157] ov5640_priv_ioctl: CMD = 0x11d
g)progressive, colorimetry=(strin[ 363.682066] enter ov5640_set_test_pattern
g)2:6:11:1
isp input: 1920x1080[ 363.689249] ov5640_priv_ioctl: CMD = 0x117
RAW10
isp output: 1920x1080 YUV[ 363.695864] enter ov5640_set_fps
422I
dewarp input: 1920x1080 Y[ 363.702518] ov5640_priv_ioctl: CMD = 0x107
UV422I
dewarp output: 3840x2160[ 363.708915] enter ov5640_get_sensor_mode
YUV422I
OV5640_IsiGetSensorIss [ 363.716046] ov5640_priv_ioctl: CMD = 0x112
(enter)
OV5640_IsiGetSensorIss ([ 363.722635] enter ov5640_set_exp
exit)
OV5640_IsiHalQuerySensorIs[ 363.730392] ov5640_priv_ioctl: CMD = 0x115
s (enter)
OV5640_IsiHalQuerySen[ 363.735669] enter ov5640_set_gain
sorIss (exit)
OV5640_IsiCreateSe[ 363.743553] enter isp_s_comp
nsorIss (enter)
OV5640_IsiSensor[ 363.747610] enter isp_s_comp
SetPowerIss: (enter)
OV5640_IsiS[ 363.753350] enter isp_s_comp
ensorSetPowerIss: set power 1
OV5640_IsiSensorSetPowerIss: (exit)
OV5640_IsiSensorGetClkIss: (enter)
OV5640_IsiSensorGetClkIss: status:276050132 sensor_mc[ 363.772367] enter wdr3_hw_init
lk:24000000 csi_max_pixel_clk:500[ 363.775730] wdr3 res: 1920 1080
000000
OV5640_IsiSensorGetClkIss[ 363.782417] enter isp_mi_start
: (exit)
OV5640_IsiSensorSetClkI[ 363.788205] ov5640_priv_ioctl: CMD = 0x110
ss: (enter)
OV5640_IsiSensorSetC[ 363.794727] ov5640_s_stream: 1
lkIss: status:1 sensor_mclk:24000000 csi_max_pixel_clk:500000000
OV5640_IsiSensorSetClkIss: (exit)
OV5640_IsiResetSensorIss: (enter)
OV5640_IsiResetSensorIss: (exit)
OV5640_IsiSetSensorModeIss (enter)
OV5640_IsiSetSensorModeIss (exit)
OV5640_IsiCreateSensorIss (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiGetCapsIss (enter)
OV5640_IsiQuerySensorIss (enter)
OV5640_IsiHalQuerySensorIss (enter)
OV5640_IsiHalQuerySensorIss (exit)
OV5640_IsiQuerySensorIss (exit)
OV5640_IsiGetCapsIss (exit)
OV5640_IsiSetupSensorIss (enter)
OV5640_IsiSetupSensorIss (exit)
OV5640_IsiSetTestPatternIss (enter)
OV5640_IsiSetTestPatternIss: test pattern enable[0] mode[0]
OV5640_IsiSetTestPatternIss: (exit)
OV5640_IsiSetSensorFpsIss: (enter)
OV5640_IsiSetSensorFpsIss: (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiGetAeInfoIss (enter)
OV5640_IsiGetAeInfoIss (exit)
OV5640_IsiGetSensorFpsIss: (enter)
OV5640_IsiGetSensorFpsIss: (exit)
OV5640_IsiGetAeStartExposureIs (enter)
OV5640_IsiGetAeStartExposureIs:get start exposure 36403200
OV5640_IsiGetAeStartExposureIs: (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiGetAeInfoIss (enter)
OV5640_IsiGetAeInfoIss (exit)
OV5640_IsiSetIntegrationTimeIss (enter)
OV5640_IsiSetIntegrationTimeIss set linear exp 400
OV5640_IsiSetIntegrationTimeIss (exit)
OV5640_IsiSetGainIss (enter)
OV5640_IsiSetGainIss set linear gain 3072
OV5640_IsiSetGainIss (exit)
OV5640_IsiGetIntegrationTimeIss (enter)
OV5640_IsiGetIntegrationTimeIss (exit)
OV5640_IsiGetGainIss (enter)
OV5640_IsiGetGainIss (exit)
#### CsiSetFormat 1920 1080 808535874
OV5640_IsiGetSensorIspStatusIss: (enter)
OV5640_IsiGetSensorIspStatusIss: (exit)
OV5640_IsiGetSensorIspStatusIss: (enter)
OV5640_IsiGetSensorIspStatusIss: (exit)
OV5640_IsiGetSensorIspStatusIss: (enter)
OV5640_IsiGetSensorIspStatusIss: (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiGetSensorIspStatusIss: (enter)
OV5640_IsiGetSensorIspStatusIss: (exit)
CamEngineEnableCproc: set val 1 1 1 1.10 -15 1.00 0.00
OV5640_IsiSensorSetStreamingIss (enter)
OV5640_IsiSensorSetStreamingIss: set streaming 1
OV5640_IsiSensorSetStreamingIss (exit)
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:08.579723250
Setting pipeline to NULL ...
[ 371.891324] enter isp_mi_stop
OV5640_IsiSensorSetStreamingIss ([ 371.997447] ov5640_priv_ioctl: CMD = 0x110
enter)
[ 372.004419] ov5640_s_stream: 0
OV5640_IsiSensorSetStreamingIss: set streaming 0
OV5640_IsiSensorSetStreamingIss (exit)
OV5640_IsiGetSensorModeIss (enter)
OV5640_IsiGetSensorModeIss (exit)
OV5640_IsiReleaseSensorIss (enter[ 372.024207] ov5640_priv_ioctl: CMD = 0x110
)
OV5640_IsiSensorSetStreamingI[ 372.031192] ov5640_s_stream: 0
ss (enter)
[ 372.037709] ov5640_priv_ioctl: CMD = 0x104
OV5640_IsiSensorSetStreamingIss: [ 372.042286] ov5640_priv_ioctl: CMD = 0x103
set streaming 0
OV5640_IsiSensor[ 372.049251] ov5640_priv_ioctl: CMD = 0x101
SetStreamingIss (exit)
OV5640_IsiSensorGetClkIss: (enter)
OV5[ 372.060986] enter isp_mi_stop
640_IsiSensorGetClkIss: status:276050132 sensor_mclk:24000000 csi_max_pixel_clk:500000000
OV5640_IsiSensorGetClkIss: (exit)
OV5640_IsiSensorSetClkIss: (enter)
OV5640_IsiSensorSetClkIss: status:0 sensor_mclk:24000000 csi_max_pixel_clk:500000000
OV5640_IsiSensorSetClkIss: (exit)
OV5640_IsiSensorSetPowerIss: (enter)
OV5640_IsiSensorSetPowerIss: set power 0
OV5640_IsiSensorSetPowerIss: (exit)
OV5640_IsiReleaseSensorIss (exit)
Freeing pipeline ...
The logs contains some debug prints from my driver as you see, just to be sure the proper functions are called.
Well, so far there is no image.. and I'm thinking what can be wrong. Most probably my ov5640 driver isn't ok, at least to say. I'm using some values from ov5640_mipi.c linux kenel driver init structures, anyway - there are a lot of registers and it is easy to make mistake