notro / fbtft

Linux Framebuffer drivers for small TFT LCD display modules. Development has moved to https://git.kernel.org/cgit/linux/kernel/git/gregkh/staging.git/tree/drivers/staging/fbtft?h=staging-testing
1.85k stars 493 forks source link

Cannot enable debug messages #537

Closed LordRafa closed 3 years ago

LordRafa commented 5 years ago

I am trying to enable the fbtft debug messages but I have not been able to do so.

My kernel has been compiled with the dynamic debug flag and I have executed these commands to try to enable the debug logs: echo 'module fbtft +p' > /sys/kernel/debug/dynamic_debug/control echo 'module fbtft_device +p' > /sys/kernel/debug/dynamic_debug/control echo 8 > /proc/sys/kernel/printk

But when I insert de module with: sudo modprobe fbtft_device name=ra8876_800x600 gpios=reset:46,dc:7 busnum=2 debug=7

I cannot see any debug message on the dmesg output.

notro commented 5 years ago

I haven't used fbtft in a long time so I don't know if something is broken, but debug=7 should give you all fbtft debug messages. You don't need to enable debug printing since fbtft use dev_info(): fbtft_par_dbg():

#define fbtft_par_dbg(level, par, format, arg...)            \
do {                                                         \
    if (unlikely(par->debug & level))                    \
        dev_info(par->info->device, format, ##arg);  \
} while (0)

(The value debug=7 gets expanded in fbtft_expand_debug_value())

/proc/sys/kernel/printk controls what gets printed to the console, not what goes into the kernel log (dmesg), so no need to set that.

Wait, you say you don't see any output, not from fbtft_device either? It should print the device it registers.

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.