Marcos Paulo de Souza
5395e09c80
printk: Rename console_start to console_resume
...
The intent of console_start was to resume a previously suspended console,
so rename it accordingly.
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com >
Reviewed-by: Petr Mladek <pmladek@suse.com >
Reviewed-by: John Ogness <john.ogness@linutronix.de >
Link: https://lore.kernel.org/r/20250226-printk-renaming-v1-4-0b878577f2e6@suse.com
[pmladek@suse.com: Fixed typo in the commit message. Updated also new drm_log.c.]
Signed-off-by: Petr Mladek <pmladek@suse.com>
2025-03-11 12:51:21 +01:00
Marcos Paulo de Souza
242fafe3fa
printk: Rename console_stop to console_suspend
...
The intent of console_stop was in fact to suspend it, so rename the
function accordingly.
Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com >
Reviewed-by: Petr Mladek <pmladek@suse.com >
Reviewed-by: John Ogness <john.ogness@linutronix.de >
Link: https://lore.kernel.org/r/20250226-printk-renaming-v1-3-0b878577f2e6@suse.com
[pmladek@suse.com: Fixed typo in the commit message. Updated also new drm_log.c]
Signed-off-by: Petr Mladek <pmladek@suse.com>
2025-03-11 12:41:55 +01:00
Arnd Bergmann
322a00efec
drm/log: select CONFIG_FONT_SUPPORT
...
Without fonts, this fails to link:
drivers/gpu/drm/clients/drm_log.o: in function `drm_log_init_client':
drm_log.c:(.text+0x3d4): undefined reference to `get_default_font'
Select this, like the other users do.
Fixes: f7b42442c4 ("drm/log: Introduce a new boot logger to draw the kmsg on the screen")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241212154003.1313437-1-arnd@kernel.org
2024-12-12 18:26:32 +01:00
Jocelyn Falempe
bc0e01b536
drm/client: Fix drm client endless Kconfig loop
...
if DRM_CLIENT_SELECTION is enabled, and none of the client is, the
"Default DRM Client" choice is empty, and this makes Kconfig goes
into an infinite loop of:
Default DRM Client
choice[1-0?]: 0
Default DRM Client
choice[1-0?]: 0
Default DRM Client
choice[1-0?]: 0
....
So only allow the choice if at least one of the client is selected.
Fixes: f7b42442c4 ("drm/log: Introduce a new boot logger to draw the kmsg on the screen")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org >
Closes: https://lore.kernel.org/dri-devel/20241204160014.1171469-1-jfalempe@redhat.com/T/#md78853bba8904fd7614073f280f721d13ab0b432
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Tested-by: Dan Carpenter <dan.carpenter@linaro.org >
Acked-by: Simona Vetter <simona.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20241212091153.1592096-1-jfalempe@redhat.com
2024-12-12 11:22:32 +01:00
Jocelyn Falempe
8a4b913df4
drm/log: Add integer scaling support
...
Add a module parameter, to increase the font size for HiDPI screen.
Even with CONFIG_FONT_TER16x32, it can still be a bit small to read.
In this case, adding drm_log.scale=2 to your kernel command line will
double the character size.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-7-jfalempe@redhat.com
2024-12-10 14:36:54 +01:00
Jocelyn Falempe
cd41b4489c
drm/log: Implement suspend/resume
...
Normally the console is already suspended when the graphic driver
suspend callback is called, but if the parameter no_console_suspend
is set, it might still be active.
So call console_stop()/console_start() in the suspend/resume
callbacks, to make sure it won't try to write to the framebuffer
while the graphic driver is suspended.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: John Ogness <john.ogness@linutronix.de >
Acked-by: Petr Mladek <pmladek@suse.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-6-jfalempe@redhat.com
2024-12-10 14:36:54 +01:00
Jocelyn Falempe
25e2c2a3ef
drm/log: Color the timestamp, to improve readability
...
Color the timesamp prefix, similar to dmesg.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-5-jfalempe@redhat.com
2024-12-10 14:36:54 +01:00
Jocelyn Falempe
eb30b4453e
drm/log: Do not draw if drm_master is taken
...
When userspace takes drm_master, the drm_client buffer is no more
visible, so drm_log shouldn't waste CPU cycle to draw on it.
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-4-jfalempe@redhat.com
2024-12-10 14:36:53 +01:00
Jocelyn Falempe
f7b42442c4
drm/log: Introduce a new boot logger to draw the kmsg on the screen
...
drm_log is a simple logger that uses the drm_client API to print the
kmsg boot log on the screen. This is not a full replacement to fbcon,
as it will only print the kmsg. It will never handle user input, or a
terminal because this is better done in userspace.
Design decisions:
* It uses the drm_client API, so it should work on all drm drivers
from the start.
* It doesn't scroll the message, that way it doesn't need to redraw
the whole screen for each new message.
It also means it doesn't have to keep drawn messages in memory, to
redraw them when scrolling.
* It uses the new non-blocking console API, so it should work well
with PREEMPT_RT.
This patch also adds a Kconfig menu to select the drm client to use.
It can be overwritten on the kernel command line with:
drm_client_lib.active=log or drm_client_lib.active=fbdev
Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com >
Reviewed-by: John Ogness <john.ogness@linutronix.de > # console API
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de >
Link: https://patchwork.freedesktop.org/patch/msgid/20241204160014.1171469-3-jfalempe@redhat.com
2024-12-10 14:36:53 +01:00
Thomas Zimmermann
7d2faa8dbb
drm/fbdev-client: Unexport drm_fbdev_client_setup()
...
DRM drivers invoke drm_client_setup() to set up in-kernel clients.
No driver should call drm_fbdev_client_setup() directly. Therefore,
unexport the symbol and move the declaration to the internal header
drm_client_internal.h.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-4-tzimmermann@suse.de
2024-11-15 09:42:21 +01:00
Thomas Zimmermann
b86711c6d6
drm/client: Move public client header to clients/ subdirectory
...
Move the public header file drm_client_setup.h to the clients/
subdirectory and update all drivers. No functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-3-tzimmermann@suse.de
2024-11-15 09:42:13 +01:00
Thomas Zimmermann
a49e7e8125
drm: Move client code to clients/ subdirectory
...
Just move some files around to keep source code well organized. Plus
fix a type in the help text of CONFIG_DRM_FBDEV_LEAK_PHYS_SMEM. No
functional changes.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de >
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20241108154600.126162-2-tzimmermann@suse.de
2024-11-15 09:42:11 +01:00