Trying to see dev_dbg() messages from csi5_fops.c

Hello,

I’m trying to debug some issue w/my tc358743 driver and need to see what is happening in csi5_fops

I’ve add the line
define DEBUG

to the csi5_fops.c file and recompiled the Image file but nothing shows up in dmesg. I believe everything is set up correct. Can you see if there is anything I missed ?

cat /proc/config.gz | gunzip | grep CONFIG_DYNAMIC_DEBUG
CONFIG_DYNAMIC_DEBUG=y
CONFIG_DYNAMIC_DEBUG_CORE=y

mount | grep debugfs
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)

grep csi5_fops.c /sys/kernel/debug/dynamic_debug/control
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:564 [csi5_fops]csi5_hw_init =_ "%s\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:458 [csi5_fops]csi5_tpg_set_gain =_ "VI channel is not setup yet\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:402 [csi5_fops]csi5_stream_tpg_stop =_ "%s: stream_id=%u, virtual_channel_id=%d\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:530 [csi5_fops]csi5_stop_streaming =_ "%s: csi_pt=%u, st_id=%u, vc_id=%u, pg_mode=0x%x\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:357 [csi5_fops]csi5_stream_tpg_start =_ "%s: stream_id=%u, virtual_channel_id=%d\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:232 [csi5_fops]csi5_stream_set_config =_ "%s: stream_id=%u, csi_port=%u\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:239 [csi5_fops]csi5_stream_set_config =_ "cil_settingtime is pulled from device"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:245 [csi5_fops]csi5_stream_set_config =_ "mode not listed in DT, use default"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:253 [csi5_fops]csi5_stream_set_config =_ "cil_settletime is pulled from device of_node"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:260 [csi5_fops]csi5_stream_set_config =_ "no cil_settletime in of_node"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:273 [csi5_fops]csi5_stream_set_config =_ "no cil_settletime in of_node"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:279 [csi5_fops]csi5_stream_set_config =_ "cil_setttime is %d"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:498 [csi5_fops]csi5_start_streaming =_ "%s: csi_pt=%u, st_id=%u, vc_id=%u, pg_mode=0x%x\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:56 [csi5_fops]csi5_power_off =_ "%s\012"
/home/parallels/nvidia/nvidia_sdk(...full path...)nvcsi/csi5_fops.c:45 [csi5_fops]csi5_power_on =_ "%s\012"

I trimmed the full path for readability.

When I try a video capture, no dev_dbg() messages are in dmesg :

root@sthd2:~# dmesg | grep csi5_fops
root@sthd2:~#

In fact, I don't think I see any messages from any files listed in the 'control' file.

Thank you.

What’s the version? Does dev_info() shows?

Hello ShaneCCC,

What is the version of what? The OS was built from SDK Manager using JetPack 5.1.2 on Jetson Orin Dev board, L4T 35.4.1

I added a dev_info() statement and it didn’t show up in dmesg either.

I am able to use printk statements in dmesg.

Could you confirm the dev_err() again. If this still didn’t print that could be something wrong for your kernel.

dev_err() does print to the console.

@ShaneCCC - any thoughts ?

I have also been unsuccessful in getting messages to print from edits to v4l2-fwnode.c (specifically trying to find where the tc358743 dtsi is being read in) - neither printk or pr_debug messages are printed. As mentioned earlier, printk messages do show up from csi5 - but not pr_debug.

The changes are being compiled into the Image but never appear in dmesg output

Example of printk statement added to v4l2-fwnode.c :

v4l2_fwnode_endpoint_parse_parallel_bus(struct fwnode_handle *fwnode,
                                        struct v4l2_fwnode_endpoint *vep,
                                        enum v4l2_mbus_type bus_type)
{
        struct v4l2_fwnode_bus_parallel *bus = &vep->bus.parallel;
        unsigned int flags = 0;
        u32 v;

        printk(" jc- v4l2-fwnode  v4l2_fwnode_endpoint_parse_parallel_bus  \n");

        if (bus_type == V4L2_MBUS_PARALLEL || bus_type == V4L2_MBUS_BT656)
                flags = bus->flags;

Then looking for the statement in Image :

root@sthd2:~# strings /boot/Image | grep 'jc- v4l2'
 jc- v4l2-fwnode  v4l2_fwnode_endpoint_parse_parallel_bus
 jc- v4l2-fwnode bus-width %u
 jc- v4l2-fwnode data-shift %u

root@sthd2:~# cat /proc/sys/kernel/printk
8	4	1	7

Thank you