How to enable dynamic debug messages during boot

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to enable dynamic debug messages during boot

598 次查看
HenrikZ
Contributor III

I have a kernel module (ti-sn65dsi83) that is built into the kernel. It seems to be loaded during boot, since I can get information about the module using "modinfo ti-sn65dsi83", however nothing happens on the I2C bus to initialize the lvds bridge. Therefor I need to get the kernel messages, however the messages are implemented as "dynamic debug messages" (See Dynamic Debug by Biyong Sun).
I have enabled dynamic debug in the kernel configuration under "kernel hacking" -> "printk and dmesg options". What should be left in order to see the messages should be to write the following commands during u-boot:

setenv DYNDBG "dyndbg =\\"file drivers/gpu/drm/bridge/ti-sn65dsi83.c +pfl\\""
setenv mmcargs 'setenv bootargs ${jh_clk} console=${console} root=${mmcroot} ${DYNDBG}'
saveenv

Setting the bootargs does change the messages printed in the console during boot. In the beginning there is a line saying "** 2128 printk messages dropped **" and it seems that some other dynamic messages get printed - but not related to ti-sn65dsi83.

This leaves the questions:
The kernel modules seems to be loaded during boot, but is there something more I should do to establish communication via I2C to the LVDS bridge?

Can I expect that the kernel module automatically will initiate the communication and initialization of the LVDS bridge?

When I don't see any messages related to ti-sn65dsi83, is it because there are no messages or am I still not seeing the dynamic debug messages?

Regards Henrik




标签 (4)
标记 (4)
0 项奖励
回复
3 回复数

540 次查看
HenrikZ
Contributor III

Hi

Since I can see kernel module information when using "modinfo ti-sn65dsi83" I assume that is has been build and included in the kernel?
If the kernel module is correctly build into the kernel, shouldn't the kernel module automatically pick the LVDS bridge from the Device Tree Source? From the source code I can that it expects "sn65dsi83", which is written in the dts.

In the source code for the kernel module there is a function called "sn65dsi83_probe" which is responsible for toggling the enable pin as a part of the initialization procedure and parsing the device tree. And another function called "sn65dsi83_atomic_enable" that is setting the correct registers. I expected the probe function to be called and loaded together with module? But what about the "sn65dsi83_atomic_enable" when will that function be called and initialize the LVDS bridge?

Regards

Henrik

0 项奖励
回复

508 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Correct! then your module is build and is in the BSP, now you have to enable some modificacion in the dtb.

 

Regards

0 项奖励
回复

556 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

If you don;t see any messages, then the module is not loaded. Check that the module is build with the kernel version you are working on. since you are trying to debug the GPU as well this is not going to be possible since gpu is binary and propietary.

Regards

0 项奖励
回复
%3CLINGO-SUB%20id%3D%22lingo-sub-2193567%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%A6%82%E4%BD%95%E5%9C%A8%E5%90%AF%E5%8A%A8%E6%9C%9F%E9%97%B4%E5%90%AF%E7%94%A8%E5%8A%A8%E6%80%81%E8%B0%83%E8%AF%95%E6%B6%88%E6%81%AF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2193567%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%88%91%E6%9C%89%E4%B8%80%E4%B8%AA%E5%86%85%E7%BD%AE%E5%9C%A8%E5%86%85%E6%A0%B8%E4%B8%AD%E7%9A%84%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%EF%BC%88ti-sn65dsi83%EF%BC%89%E3%80%82%E5%AE%83%E4%BC%BC%E4%B9%8E%E6%98%AF%E5%9C%A8%E5%90%AF%E5%8A%A8%E6%9C%9F%E9%97%B4%E5%8A%A0%E8%BD%BD%E7%9A%84%EF%BC%8C%E5%9B%A0%E4%B8%BA%E6%88%91%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%20%22%20modinfo%20ti-sn65dsi83%20%22%20%E8%8E%B7%E5%8F%96%E6%9C%89%E5%85%B3%E6%A8%A1%E5%9D%97%E7%9A%84%E4%BF%A1%E6%81%AF%EF%BC%8C%E4%BD%86%E6%98%AF%20I2C%20%E6%80%BB%E7%BA%BF%E4%B8%8A%E6%B2%A1%E6%9C%89%E5%8F%91%E7%94%9F%E4%BB%BB%E4%BD%95%E5%88%9D%E5%A7%8B%E5%8C%96%20lvds%20%E6%A1%A5%E7%9A%84%E6%93%8D%E4%BD%9C%E3%80%82%E5%9B%A0%E6%AD%A4%EF%BC%8C%E6%88%91%E9%9C%80%E8%A6%81%E8%8E%B7%E5%8F%96%E5%86%85%E6%A0%B8%E4%BF%A1%E6%81%AF%EF%BC%8C%E4%BD%86%E8%BF%99%E4%BA%9B%E4%BF%A1%E6%81%AF%E6%98%AF%E4%BB%A5%22%E5%8A%A8%E6%80%81%E8%B0%83%E8%AF%95%E4%BF%A1%E6%81%AF%22%20%E7%9A%84%E5%BD%A2%E5%BC%8F%E5%AE%9E%E7%8E%B0%E7%9A%84%EF%BC%88%E5%8F%82%E8%A7%81%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fpwmxy87654%2Fattachments%2Fpwmxy87654%2Fimx-processors%2540tkb%2F5838%2F2%2FDynamic%2520Debug.pdf%22%20target%3D%22_self%22%3E%E5%AD%99%E5%BF%85%E5%8B%87%E6%92%B0%E5%86%99%E7%9A%84%E3%80%8A%E5%8A%A8%E6%80%81%E8%B0%83%E8%AF%95%3C%2FA%3E%E3%80%8B%EF%BC%89%E3%80%82%3CBR%20%2F%3E%E6%88%91%E5%9C%A8%E5%86%85%E6%A0%B8%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%90%AF%E7%94%A8%E4%BA%86%E5%8A%A8%E6%80%81%E8%B0%83%E8%AF%95%EF%BC%8C%E5%9C%A8%22kernel%20hacking%22%20-%26gt%3B%20%22%20printk%20%E5%92%8C%20dmesg%20%E9%80%89%E9%A1%B9%22.%E4%B8%BA%E4%BA%86%E6%9F%A5%E7%9C%8B%E8%BF%99%E4%BA%9B%E6%B6%88%E6%81%AF%EF%BC%8C%E5%BA%94%E8%AF%A5%E5%9C%A8%20u-%E5%90%AF%E5%8A%A8%20%E6%9C%9F%E9%97%B4%E5%86%99%E4%B8%8B%E4%BB%A5%E4%B8%8B%E5%91%BD%E4%BB%A4%EF%BC%9A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%20translate%3D%22no%22%3Esetenv%20DYNDBG%20%22dyndbg%20%3D%5C%5C%22file%20drivers%2Fgpu%2Fdrm%2Fbridge%2Fti-sn65dsi83.c%20%2Bpfl%5C%5C%22%22%0Asetenv%20mmcargs%20'setenv%20bootargs%20%24%7Bjh_clk%7D%20console%3D%24%7Bconsole%7D%20root%3D%24%7Bmmcroot%7D%20%24%7BDYNDBG%7D'%0Asaveenv%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%E8%AE%BE%E7%BD%AE%20bootargs%20%E7%A1%AE%E5%AE%9E%E4%BC%9A%E6%9B%B4%E6%94%B9%E5%90%AF%E5%8A%A8%E6%9C%9F%E9%97%B4%E6%8E%A7%E5%88%B6%E5%8F%B0%E4%B8%AD%E6%89%93%E5%8D%B0%E7%9A%84%E6%B6%88%E6%81%AF%E3%80%82%E5%BC%80%E5%A4%B4%E6%9C%89%E4%B8%80%E8%A1%8C%E5%86%99%E7%9D%80%22**%202128%20printk%20messages%20dropped%20**%22%20%EF%BC%8C%E4%BC%BC%E4%B9%8E%E8%BF%98%E6%89%93%E5%8D%B0%E4%BA%86%E5%85%B6%E4%BB%96%E4%B8%80%E4%BA%9B%E5%8A%A8%E6%80%81%E4%BF%A1%E6%81%AF%EF%BC%8C%E4%BD%86%E4%B8%8E%20ti-sn65dsi83%20%E6%97%A0%E5%85%B3%E3%80%82%3CBR%20%2F%3E%3CBR%20%2F%3E%3CSTRONG%3E%E8%BF%99%E5%B0%B1%E7%95%99%E4%B8%8B%E4%BA%86%E9%97%AE%E9%A2%98%EF%BC%9A%3C%2FSTRONG%3E%3CBR%20%2F%3E%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%E4%BC%BC%E4%B9%8E%E6%98%AF%E5%9C%A8%E5%90%AF%E5%8A%A8%E6%9C%9F%E9%97%B4%E5%8A%A0%E8%BD%BD%E7%9A%84%EF%BC%8C%E4%BD%86%E6%98%AF%E4%B8%BA%E4%BA%86%E9%80%9A%E8%BF%87%20I2C%20%E4%B8%8E%20LVDS%20%E6%A1%A5%E5%BB%BA%E7%AB%8B%E9%80%9A%E4%BF%A1%EF%BC%8C%E6%88%91%E8%BF%98%E5%BA%94%E8%AF%A5%E5%81%9A%E4%BA%9B%E4%BB%80%E4%B9%88%E5%90%97%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%88%91%E8%83%BD%E5%90%A6%E6%8C%87%E6%9C%9B%E5%86%85%E6%A0%B8%E6%A8%A1%E5%9D%97%E8%87%AA%E5%8A%A8%E5%90%AF%E5%8A%A8%20LVDS%20%E6%A1%A5%E6%8E%A5%E5%99%A8%E7%9A%84%E9%80%9A%E4%BF%A1%E5%92%8C%E5%88%9D%E5%A7%8B%E5%8C%96%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E5%BD%93%E6%88%91%E7%9C%8B%E4%B8%8D%E5%88%B0%E4%BB%BB%E4%BD%95%E4%B8%8E%20ti-sn65dsi83%20%E7%9B%B8%E5%85%B3%E7%9A%84%E4%BF%A1%E6%81%AF%E6%97%B6%EF%BC%8C%E6%98%AF%E5%9B%A0%E4%B8%BA%E6%B2%A1%E6%9C%89%E4%BF%A1%E6%81%AF%E8%BF%98%E6%98%AF%E6%88%91%E4%BB%8D%E7%84%B6%E7%9C%8B%E4%B8%8D%E5%88%B0%E5%8A%A8%E6%80%81%E8%B0%83%E8%AF%95%E4%BF%A1%E6%81%AF%EF%BC%9F%3CBR%20%2F%3E%3CBR%20%2F%3E%E8%87%B4%E4%BA%A8%E5%88%A9%E5%85%8B%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2193567%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3E%E5%9B%BE%E5%BD%A2%E4%B8%8E%E6%98%BE%E7%A4%BA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%207ULP%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EYocto%20Project%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2195153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20dynamic%20debug%20messages%20during%20boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2195153%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E6%AD%A3%E7%A1%AE%EF%BC%81%E9%82%A3%E4%B9%88%E4%BD%A0%E7%9A%84%E6%A8%A1%E5%9D%97%E5%B0%B1%E5%B7%B2%E7%BB%8F%E7%89%88%E6%9C%AC%E5%A5%BD%E4%BA%86%EF%BC%8C%E5%9C%A8%E7%94%B5%E8%B7%AF%E6%9D%BF%E6%94%AF%E6%8C%81%E5%8C%85%E4%B8%AD%EF%BC%8C%E7%8E%B0%E5%9C%A8%E4%BD%A0%E5%BF%85%E9%A1%BB%E5%9C%A8%20dtb%20%E4%B8%AD%E5%90%AF%E7%94%A8%E4%B8%80%E4%BA%9B%E4%BF%AE%E6%94%B9%E3%80%82%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2194380%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20dynamic%20debug%20messages%20during%20boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194380%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3CBR%20%2F%3E%3CBR%20%2F%3E%E6%97%A2%E7%84%B6%E6%88%91%E5%9C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C%E8%AF%A5%E5%87%BD%E6%95%B0%E8%B4%9F%E8%B4%A3%E5%9C%A8%E5%88%9D%E5%A7%8B%E5%8C%96%E8%BF%87%E7%A8%8B%E4%B8%AD%E5%88%87%E6%8D%A2%E5%90%AF%E7%94%A8%E5%BC%95%E8%84%9A%E5%B9%B6%E8%A7%A3%E6%9E%90%E8%AE%BE%E5%A4%87%E6%A0%91%E3%80%82%E5%8F%A6%E4%B8%80%E4%B8%AA%E5%90%8D%E4%B8%BA%22sn65dsi83_atomic_enable%22%20%E7%9A%84%E5%87%BD%E6%95%B0%E6%AD%A3%E5%9C%A8%E8%AE%BE%E7%BD%AE%E6%AD%A3%E7%A1%AE%E7%9A%84%E5%AF%84%E5%AD%98%E5%99%A8%E3%80%82%E6%88%91%E6%98%AF%E5%90%A6%E5%B8%8C%E6%9C%9B%E6%8E%A2%E9%92%88%E5%87%BD%E6%95%B0%E4%B8%8E%E6%A8%A1%E5%9D%97%E4%B8%80%E8%B5%B7%E8%A2%AB%E8%B0%83%E7%94%A8%E5%92%8C%E5%8A%A0%E8%BD%BD%EF%BC%9F%E4%BD%86%22sn65dsi83_atomic_enable%22%20%E8%B0%83%E7%94%A8%E8%AF%A5%E5%87%BD%E6%95%B0%E5%B9%B6%E5%88%9D%E5%A7%8B%E5%8C%96%20LVDS%20%E6%A1%A5%E6%8E%A5%E5%99%A8%E7%9A%84%E6%97%B6%E9%97%B4%E5%A6%82%E4%BD%95%EF%BC%9F%3C%2FP%3E%3CP%3E%E6%AD%A4%E8%87%B4%3C%2FP%3E%3CP%3E%E4%BA%A8%E5%88%A9%E5%85%8B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2194363%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20to%20enable%20dynamic%20debug%20messages%20during%20boot%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2194363%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%E4%BD%A0%E5%A5%BD%3C%2FP%3E%0A%3CP%3E%E5%A6%82%E6%9E%9C%E7%9C%8B%E4%B8%8D%E5%88%B0%E4%BB%BB%E4%BD%95%E4%BF%A1%E6%81%AF%EF%BC%8C%E5%88%99%E8%AF%B4%E6%98%8E%E6%A8%A1%E5%9D%97%E6%9C%AA%E5%8A%A0%E8%BD%BD%E3%80%82%E6%A3%80%E6%9F%A5%E8%AF%A5%E6%A8%A1%E5%9D%97%E6%98%AF%E5%90%A6%E4%BD%BF%E7%94%A8%E6%82%A8%E6%AD%A3%E5%9C%A8%E5%BC%80%E5%8F%91%E7%9A%84%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC%E6%9E%84%E5%BB%BA%E3%80%82%E5%9B%A0%E4%B8%BA%E4%BD%A0%E4%B9%9F%E5%9C%A8%E5%B0%9D%E8%AF%95%E8%B0%83%E8%AF%95%20GPU%EF%BC%8C%E8%BF%99%E6%98%AF%E4%B8%8D%E5%8F%AF%E8%83%BD%E7%9A%84%EF%BC%8C%E5%9B%A0%E4%B8%BA%20GPU%20%E6%98%AF%E4%BA%8C%E8%BF%9B%E5%88%B6%E5%92%8C%E4%B8%93%E6%9C%89%E7%9A%84%E3%80%82%3C%2FP%3E%0A%3CP%3E%E6%AD%A4%E8%87%B4%3C%2FP%3E%3C%2FLINGO-BODY%3E