drm调试手段

😄 好记性不如烂笔头:不定期更新记录~

1. drm的内核打印信息

1.1 drm logging bitmask

  • 输入 modinfo -p可以查看
    The number provided as the debug parameter is a bitmask of logging categories to enable. The command modinfo -p drm can print the possible values. As of Linux 6.0, the values are:
debug:Enable debug output, where each bit enables a debug category.
	Bit 0 (0x01)  will enable CORE messages (drm core code)
	Bit 1 (0x02)  will enable DRIVER messages (drm controller code)
	Bit 2 (0x04)  will enable KMS messages (modesetting code)
	Bit 3 (0x08)  will enable PRIME messages (prime code)
	Bit 4 (0x10)  will enable ATOMIC messages (atomic code)
	Bit 5 (0x20)  will enable VBL messages (vblank code)
	Bit 7 (0x80)  will enable LEASE messages (leasing code)
	Bit 8 (0x100) will enable DP messages (displayport code)

通过修改/sys/module/drm/parameters/debug参数来调整drm信息的打印级别,根据自己需要进行调整

// echo 0x19F > /sys/module/drm/parameters/debug
echo 0x19F | sudo tee /sys/module/drm/parameters/debug # Enable verbose DRM logging
sudo dmesg -C # Clear kernel logs
sudo dmesg -w >dmesg.log & # Continuously write DRM logs to a file, in the background
// Kill dmesg with Ctrl+C
// echo 0x0> /sys/module/drm/parameters/debug
echo 0 | sudo tee /sys/module/drm/parameters/debug # Disable DRM logging
//查看🔗连接状态
cat /sys/class/drm/card0-DP-1/status
cat /sys/class/drm/card0-HDMI-A-2/status

通过grug.cfg参数可以调成级别,看drm驱动初始化的打印,比如drm.debug=0x1f

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

种瓜大爷

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值