Re: [PATCH v2 3/9] drm/ast: astdp: Use struct drm_edid and helpers

2024-08-13 Thread Jocelyn Falempe
fix that. v2: - fix reading if len is not a multiple of 4 Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_dp.c | 55 +++- 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a

Re: [PATCH v6 2/4] drm/rect: Add drm_rect_overlap()

2024-08-12 Thread Jocelyn Falempe
On 12/08/2024 15:49, Jani Nikula wrote: On Mon, 12 Aug 2024, Jocelyn Falempe wrote: Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Based on the name, I'd expect drm_rect_overlap()

[PATCH v6 4/4] drm/panic: Add a QR code panic screen

2024-08-12 Thread Jocelyn Falempe
code. You can also limit the QR code size with DRM_PANIC_SCREEN_QR_VERSION. Signed-off-by: Jocelyn Falempe Reviewed-by: Alice Ryhl --- v2: * Rewrite the rust comments with Markdown (Alice Ryhl) * Mark drm_panic_qr_generate() as unsafe (Alice Ryhl) * Use CStr directly, and remove the call to

[PATCH v6 3/4] drm/panic: Simplify logo handling

2024-08-12 Thread Jocelyn Falempe
Move logo rectangle initialisation, and logo drawing in separate functions, so they can be re-used by different panic screens. It prepares the introduction of the QR code panic screen. Signed-off-by: Jocelyn Falempe --- v6: * rebase, and handle conflict with 5d45c01dea6f ("drm/panic: Add

[PATCH v6 2/4] drm/rect: Add drm_rect_overlap()

2024-08-12 Thread Jocelyn Falempe
Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 3 +-- include/drm/drm_rect.h | 15 +++ 2 files changed, 16

[PATCH v6 1/4] drm/panic: Add integer scaling to blit()

2024-08-12 Thread Jocelyn Falempe
Add a parameter to the blit function, to upscale the image. This is necessary to draw a QR code, otherwise, the pixels are usually too small to be readable by most QR code reader. It can also be used later for drawing fonts on high DPI display. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

[PATCH v6 0/4] drm/panic: Add a QR code panic screen

2024-08-12 Thread Jocelyn Falempe
t;) * Fix qr_width should be a signed int, to handle error code. Jocelyn Falempe (4): drm/panic: Add integer scaling to blit() drm/rect: Add drm_rect_overlap() drm/panic: Simplify logo handling drm/panic: Add a QR code panic screen drivers/gpu/drm/Kconfig | 31 + driv

Re: [PATCH 0/5] drm/panic: Cleanup and add panic description

2024-08-12 Thread Jocelyn Falempe
On 23/07/2024 11:11, Jocelyn Falempe wrote: This small series removes unused export symbols, moves internal include to drm_crtc_internal.h, and adds the panic description, now that kmsg_dump provides this information. I've pushed it to drm-misc-next. Thanks, -- Jocelyn Jocelyn Fa

Re: [PATCH 2/9] drm/ast: astdp: Move locking into EDID helper

2024-08-09 Thread Jocelyn Falempe
On 06/08/2024 14:51, Thomas Zimmermann wrote: The modeset mutex protects EDID retrival from concurrent modeset operations. Acquire the lock in ast_astdp_read_edid(). Prepares the code for conversion to struct drm_edid. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off

Re: [PATCH 1/9] drm/ast: Move code for physical outputs into separate files

2024-08-09 Thread Jocelyn Falempe
On 06/08/2024 14:51, Thomas Zimmermann wrote: Move the modesetting code for the various transmitter chips into their own source files before adding BMC support. No functional changes. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers

Re: [PATCH 5/9] drm/ast: dp501: Use struct drm_edid and helpers

2024-08-09 Thread Jocelyn Falempe
On 06/08/2024 14:52, Thomas Zimmermann wrote: Convert DP501 support to struct drm_edid and its helpers. Simplifies and modernizes the EDID handling. The driver reads 4 bytes at once, but the overall read length is now variable. Therefore update the EDID read loop to never return more than the

[PATCH v2 5/5] drm/panic: Add panic description

2024-08-07 Thread Jocelyn Falempe
too cryptic. Signed-off-by: Jocelyn Falempe Reviewed-by: Thomas Zimmermann --- v2: * Use a macro PANIC_MSG_LINES, instead of directly using the indice in drm_panic_set_description() (Sima) * Add drm_panic_clear_description() to make sure the stack allocated pointer won't be used

[PATCH v2 4/5] drm/panic: Move copyright notice to the top

2024-08-07 Thread Jocelyn Falempe
Move the copyright notice to the top of drm_panic.h, and add the missing Red Hat copyright notice. Suggested-by: Thomas Zimmermann Signed-off-by: Jocelyn Falempe Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann --- include/drm/drm_panic.h | 9 ++--- 1 file changed, 6 insertions

[PATCH v2 1/5] drm/panic: Remove space before "!" in panic message

2024-08-07 Thread Jocelyn Falempe
There is no space between the last word, and the punctuation mark in English. Suggested-by: Diego Viola Signed-off-by: Jocelyn Falempe Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/drm_panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v2 3/5] drm/panic: Move drm_panic_register prototype to drm_crtc_internal.h

2024-08-07 Thread Jocelyn Falempe
drm_panic_[un]register() are only used by the core drm, and are not intended to be called by other drm drivers, so move their prototypes to drm_crtc_internal.h. Suggested-by: Daniel Vetter Signed-off-by: Jocelyn Falempe Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann --- drivers

[PATCH v2 2/5] drm/panic: Remove useless export symbols

2024-08-07 Thread Jocelyn Falempe
drm_panic_[un]register() are called only from the core drm, so there is no need to export them. Suggested-by: Daniel Vetter Signed-off-by: Jocelyn Falempe Reviewed-by: Daniel Vetter Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/drm_panic.c | 2 -- 1 file changed, 2 deletions(-) diff

[PATCH v2 0/5] drm/panic: Cleanup and add panic description

2024-08-07 Thread Jocelyn Falempe
drm_panic_clear_description() to make sure the stack allocated pointer won't be used. (Sima) * use the macro PANIC_MSG_LINES also in draw_panic_static_user() Jocelyn Falempe (5): drm/panic: Remove space before "!" in panic message drm/panic: Remove useless export symbols

Re: [PATCH 5/5] drm/panic: Add panic description

2024-08-07 Thread Jocelyn Falempe
On 07/08/2024 11:21, Daniel Vetter wrote: On Tue, Jul 23, 2024 at 11:11:34AM +0200, Jocelyn Falempe wrote: Now that kmsg dump callback has the description parameter, use it in the user panic screen. This is the string passed to panic(), like "VFS: Unable to mount root fs on xx

Re: [PATCH 5/5] drm/mgag200: Remove BMC output

2024-08-06 Thread Jocelyn Falempe
und is now obsolete as the VGA-BMC connector handles BMC support internally. Hence, remove the driver's code and the BMC output entirely. Thanks for this work. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_

Re: [PATCH 4/5] drm/mgag200: vga-bmc: Control BMC scanout from encoder

2024-08-06 Thread Jocelyn Falempe
_enable helpers for all enabled encoders. The BMC stops scanning out the VGA signal if modeset disables the VGA encoder, and starts scanning out if the modeset enables the VGA encoder. Thanks for this work. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/

Re: [PATCH 3/5] drm/mgag200: vga-bmc: Control CRTC VIDRST flag from encoder

2024-08-06 Thread Jocelyn Falempe
atrox chip. The functionality is part of the CRTC, but depends on the presence of the clock source. This is the case for some BMCs, so control the pin from the VGA-BMC output. Thanks for this work. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mg

Re: [PATCH 2/5] drm/mgag200: vga-bmc: Transparently handle BMC

2024-08-06 Thread Jocelyn Falempe
lays to it. Depending on the setting, the connector's display modes either come from the VGA monitor's EDID or from an internal list of BMC-compatible modes. Thanks for this work. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mg

Re: [PATCH 1/5] drm/mgag200: Add VGA-BMC output

2024-08-06 Thread Jocelyn Falempe
On 05/08/2024 15:05, Thomas Zimmermann wrote: Duplicate VGA output to VGA-BMC output and update all code for Matrox server chips. The new output represents a VGA output that has a BMC attached to it. No functional changes so far. Thanks for this work. Reviewed-by: Jocelyn Falempe Signed

Re: [PATCH] drm/amdgpu: add dce6 drm_panic support

2024-08-05 Thread Jocelyn Falempe
On 02/08/2024 11:39, Christian König wrote: Am 02.08.24 um 09:17 schrieb Lu Yao: Add support for the drm_panic module, which displays a pretty user friendly message on the screen when a Linux kernel panic occurs. Signed-off-by: Lu Yao --- The patch can work properly on the TTY, but after st

Re: [RFC PATCH 3/3] drm/log: Introduce a new boot logger to draw the kmsg on the screen

2024-08-01 Thread Jocelyn Falempe
On 01/08/2024 12:51, John Ogness wrote: On 2024-08-01, Jocelyn Falempe wrote: * It uses a circular buffer so the console->write() callback is very quick, and will never stall. * Drawing is done asynchronously using a workqueue. For CON_NBCON, neither of the above points

[RFC PATCH 3/3] drm/log: Introduce a new boot logger to draw the kmsg on the screen

2024-08-01 Thread Jocelyn Falempe
e more appropriate than this module. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/Kconfig | 11 + drivers/gpu/drm/Makefile | 2 + drivers/gpu/drm/drm_drv.c | 2 + drivers/gpu/drm/drm_log.c | 477 ++ drivers/gpu/drm/drm_log.h | 8 + 5 files chang

[RFC PATCH 2/3] drm/panic: Move drawing functions to drm_draw

2024-08-01 Thread Jocelyn Falempe
Move the color conversions, blit and fill functions to drm_draw.c, so that they can be re-used by drm_log. drm_draw is internal to the drm subsystem, and shouldn't be used by gpu drivers. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile

[RFC PATCH 1/3] [NOT FOR REVIEW] drm/panic: Squash of pending series

2024-08-01 Thread Jocelyn Falempe
This is a squashed patch of: https://patchwork.freedesktop.org/series/136377/ https://patchwork.freedesktop.org/series/135944/ This is to avoid to rebase when they are merged. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/Kconfig | 31 + drivers/gpu/drm/Makefile

[RFC PATCH 0/3] drm/log: Introduce a new boot logger to draw the kmsg on the screen

2024-08-01 Thread Jocelyn Falempe
hey can be re-used by drm_log. The third patch is the actual drm_log implementation. I want to get some feedbacks before spending more time on this, and make sure I'm heading in the right direction. Thanks and best regards, -- Jocelyn Jocelyn Falempe (3): [NOT FOR REVIEW] drm/panic: Squash of

Re: [PATCH] drm/mgag200: Fix VBLANK interrupt handling

2024-07-31 Thread Jocelyn Falempe
looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann Fixes: 89c6ea2006e2 ("drm/mgag200: Add vblank support") Fixes: d5070c9b2944 ("drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp") Cc: Thomas Zimmermann Cc: Jocelyn Falempe Cc: Ge

Re: [PATCH 5/5] drm/ast: astdp: Clean up EDID reading

2024-07-30 Thread Jocelyn Falempe
On 17/07/2024 16:24, Thomas Zimmermann wrote: Simplify ast_astdp_read_edid(). Rename register constants. Drop unnecessary error handling. On success, the helper returns 0; an error code otherwise. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann

Re: [PATCH 4/5] drm/ast: astdp: Perform link training during atomic_enable

2024-07-30 Thread Jocelyn Falempe
re. A status flag reports success or failure. The process can be fragile on Aspeed hardware. Moving the test from connector detection to the atomic_enable allows for several retries and a longer timeout. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimme

Re: [PATCH 3/5] drm/ast: astdp: Only test HDP state in ast_astdp_is_connected()

2024-07-30 Thread Jocelyn Falempe
to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_dp.c | 12 +++- drivers/gpu/drm/ast/ast_reg.h | 3 +-- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_dp.c b/drivers/gpu/drm/ast/ast_dp.c

Re: [PATCH 2/5] drm/ast: astdp: Test firmware status once during probing

2024-07-30 Thread Jocelyn Falempe
. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/ast/ast_dp.c | 41 +- drivers/gpu/drm/ast/ast_drv.h | 2 +- drivers/gpu/drm/ast/ast_main.c | 6 +++-- drivers/gpu/drm/ast/ast_post.c | 2 +- drivers/gpu/drm/ast/ast_reg.h | 4

Re: [PATCH 1/5] drm/ast: astdp: Wake up during connector status detection

2024-07-30 Thread Jocelyn Falempe
x27;s atomic_disable turns off power on the physical connector. Further HPD reads will fail, thus preventing the driver from detecting re-connected displays. For connectors that are actively used, only test the HPD flag without touching power. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe

[PATCH v5 4/4] drm/panic: Add a QR code panic screen

2024-07-24 Thread Jocelyn Falempe
code. You can also limit the QR code size with DRM_PANIC_SCREEN_QR_VERSION. Signed-off-by: Jocelyn Falempe Reviewed-by: Alice Ryhl --- v2: * Rewrite the rust comments with Markdown (Alice Ryhl) * Mark drm_panic_qr_generate() as unsafe (Alice Ryhl) * Use CStr directly, and remove the call to

[PATCH v5 3/4] drm/panic: Simplify logo handling

2024-07-24 Thread Jocelyn Falempe
Move logo rectangle initialisation, and logo drawing in separate functions, so they can be re-used by different panic screens. It prepares the introduction of the QR code panic screen. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 57 + 1

[PATCH v5 2/4] drm/rect: Add drm_rect_overlap()

2024-07-24 Thread Jocelyn Falempe
Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 3 +-- include/drm/drm_rect.h | 15 +++ 2 files changed, 16

[PATCH v5 1/4] drm/panic: Add integer scaling to blit()

2024-07-24 Thread Jocelyn Falempe
Add a parameter to the blit function, to upscale the image. This is necessary to draw a QR code, otherwise, the pixels are usually too small to be readable by most QR code reader. It can also be used later for drawing fonts on high DPI display. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

[PATCH v5 0/4] drm/panic: Add a QR code panic screen

2024-07-24 Thread Jocelyn Falempe
ind next line and skip the '\n' (Alic Ryhl) * Remove __LOG_PREFIX as it's not used (Alice Ryhl) v5: * Move drm_panic_[init|exit]() prototype to drm_crtc_internal.h (Daniel Vetter) Jocelyn Falempe (4): drm/panic: Add integer scaling to blit() drm/rect: Add drm_rect_overlap(

[PATCH 4/5] drm/panic: Move copyright notice to the top

2024-07-23 Thread Jocelyn Falempe
Move the copyright notice to the top of drm_panic.h, and add the missing Red Hat copyright notice. Suggested-by: Thomas Zimmermann Signed-off-by: Jocelyn Falempe --- include/drm/drm_panic.h | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/drm/drm_panic.h b

[PATCH 5/5] drm/panic: Add panic description

2024-07-23 Thread Jocelyn Falempe
too cryptic. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 23 --- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c index 2efede7fa23a..fb283695f50e 100644 --- a/drivers/gpu/drm/drm_panic

[PATCH 3/5] drm/panic: Move drm_panic_register prototype to drm_crtc_internal.h

2024-07-23 Thread Jocelyn Falempe
drm_panic_[un]register() are only used by the core drm, and are not intended to be called by other drm drivers, so move their prototypes to drm_crtc_internal.h. Suggested-by: Daniel Vetter Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_crtc_internal.h | 4 include/drm/drm_panic.h

[PATCH 1/5] drm/panic: Remove space before "!" in panic message

2024-07-23 Thread Jocelyn Falempe
There is no space between the last word, and the punctuation mark in English. Suggested-by: Diego Viola Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm/drm_panic.c

[PATCH 2/5] drm/panic: Remove useless export symbols

2024-07-23 Thread Jocelyn Falempe
drm_panic_[un]register() are called only from the core drm, so there is no need to export them. Suggested-by: Daniel Vetter Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/drm_panic.c b/drivers/gpu/drm

[PATCH 0/5] drm/panic: Cleanup and add panic description

2024-07-23 Thread Jocelyn Falempe
This small series removes unused export symbols, moves internal include to drm_crtc_internal.h, and adds the panic description, now that kmsg_dump provides this information. Jocelyn Falempe (5): drm/panic: Remove space before "!" in panic message drm/panic: Remove useless expo

Re: [PATCH v4 4/4] drm/panic: Add a QR code panic screen

2024-07-23 Thread Jocelyn Falempe
On 23/07/2024 01:20, Mitchell Levy wrote: On 7/17/2024 7:24 AM, Jocelyn Falempe wrote: This patch adds a new panic screen, with a QR code and the kmsg data embedded. If DRM_PANIC_SCREEN_QR_CODE_URL is set, then the kmsg data will be compressed with zlib and encoded as a numerical segment

Re: [PATCH] fbcon: Use oops_in_progress instead of panic_cpu

2024-07-22 Thread Jocelyn Falempe
On 22/07/2024 16:15, Daniel Vetter wrote: On Mon, Jul 22, 2024 at 01:47:51PM +0200, Jocelyn Falempe wrote: Panic_cpu is not exported, so it can't be used if fbcon is used as a module. Use oops_in_progress in this case, but non-fatal oops won't be printed. Reported-by: kernel

Re: [PATCH] mtd: mtdoops: Fix kmsgdump parameter renaming.

2024-07-22 Thread Jocelyn Falempe
mtdoops. Fixes: e1a261ba599e ("printk: Add a short description string to kmsg_dump()") Reported-by: Knop Ryszard Signed-off-by: Jocelyn Falempe --- The offended commit is in the drm-misc tree, because it was needed by drm_panic. So I will push the fix there too. drivers/mtd/mtdoops.c

[PATCH] fbcon: Use oops_in_progress instead of panic_cpu

2024-07-22 Thread Jocelyn Falempe
Panic_cpu is not exported, so it can't be used if fbcon is used as a module. Use oops_in_progress in this case, but non-fatal oops won't be printed. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202407210203.2isiic9m-...@intel.com/ Signed-off-by: Jocel

Re: [PATCH v4 0/4] drm/panic: Add a QR code panic screen

2024-07-22 Thread Jocelyn Falempe
ith simpledrm. and then you can run: echo 1 > /sys/kernel/debug/dri/0/drm_panic_plane_0 On a side note, looking at the hyperv drm driver, it should be easy to add drm_panic support for it. I will look into that when I get some time. Best regards, -- Jocelyn Thanks! Mitchell On 7/17/2

Re: [PATCH v2] drm/panic: Add missing static inline to drm_panic_is_enabled()

2024-07-19 Thread Jocelyn Falempe
On 19/07/2024 20:26, Michal Wajdeczko wrote: On 19.07.2024 17:37, Jocelyn Falempe wrote: On 19/07/2024 17:28, Michal Wajdeczko wrote: On 19.07.2024 14:20, Jocelyn Falempe wrote: This breaks build if DRM_PANIC is not enabled. Also add the missing include drm_crtc_internal.h in

Re: [PATCH v2] drm/panic: Add missing static inline to drm_panic_is_enabled()

2024-07-19 Thread Jocelyn Falempe
On 19/07/2024 17:28, Michal Wajdeczko wrote: On 19.07.2024 14:20, Jocelyn Falempe wrote: This breaks build if DRM_PANIC is not enabled. Also add the missing include drm_crtc_internal.h in drm_panic.c Fixes: 9f774c42a908 ("drm/panic: Add drm_panic_is_enabled()") Signed-off-b

[PATCH] mtd: mtdoops: Fix kmsgdump parameter renaming.

2024-07-19 Thread Jocelyn Falempe
When the kmsg_dumper callback parameter changed, the reason variable in mtdoops_do_dump() was not updated accordingly. This breaks the build with mtdoops. Fixes: e1a261ba599e ("printk: Add a short description string to kmsg_dump()") Reported-by: Knop Ryszard Signed-off-by: Jocel

[PATCH v2] drm/panic: Add missing static inline to drm_panic_is_enabled()

2024-07-19 Thread Jocelyn Falempe
This breaks build if DRM_PANIC is not enabled. Also add the missing include drm_crtc_internal.h in drm_panic.c Fixes: 9f774c42a908 ("drm/panic: Add drm_panic_is_enabled()") Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_panic.c

Re: [PATCH] drm/panic: Add missing static inline to drm_panic_is_enabled()

2024-07-19 Thread Jocelyn Falempe
On 19/07/2024 14:01, Imre Deak wrote: On Fri, Jul 19, 2024 at 02:43:27PM +0300, Imre Deak wrote: On Fri, Jul 19, 2024 at 02:39:11PM +0300, Imre Deak wrote: On Fri, Jul 19, 2024 at 12:36:08PM +0200, Jocelyn Falempe wrote: This breaks build if DRM_PANIC is not enabled. Fixes: de338c754d40

[PATCH] drm/panic: Add missing static inline to drm_panic_is_enabled()

2024-07-19 Thread Jocelyn Falempe
This breaks build if DRM_PANIC is not enabled. Fixes: de338c754d40 ("drm/panic: Add missing static inline to drm_panic_is_enabled()") Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_crtc_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive

Re: [PATCH 1/3] drm/panic: Add drm_panic_is_enabled()

2024-07-19 Thread Jocelyn Falempe
On 19/07/2024 12:18, Imre Deak wrote: Hi, On Wed, Jul 17, 2024 at 10:48:39AM +0200, Jocelyn Falempe wrote: It allows to check if the drm device supports drm_panic. Prepare the work to have better integration with fbcon and vtconsole. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

Re: [PATCH 0/3] drm/panic: Remove build time dependency with FRAMEBUFFER_CONSOLE

2024-07-19 Thread Jocelyn Falempe
On 17/07/2024 10:48, Jocelyn Falempe wrote: When proposing to enable DRM_PANIC on Fedora, some users raised concern about the need to disable VT_CONSOLE. So this is my new attempt to avoid fbcon/vt_console to overwrite the panic screen. This time it doesn't involve any locking, so it s

Re: [PATCH v5 6/7] drm/mgag200: Add vblank support

2024-07-18 Thread Jocelyn Falempe
m Ravnborg Tested-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_drv.c | 40 + drivers/gpu/drm/mgag200/mgag200_drv.h | 6 ++- drivers/gpu/drm/mgag200/mgag200_g200.c| 5 +++ drivers/gpu/drm/mgag200/mgag200_g200eh.c | 5 +++ drivers/gpu/drm/mgag200/mgag200

Re: [PATCH 1/3] drm/panic: Add drm_panic_is_enabled()

2024-07-18 Thread Jocelyn Falempe
On 18/07/2024 09:04, Jocelyn Falempe wrote: On 17/07/2024 17:08, Daniel Vetter wrote: On Wed, Jul 17, 2024 at 10:48:39AM +0200, Jocelyn Falempe wrote: It allows to check if the drm device supports drm_panic. Prepare the work to have better integration with fbcon and vtconsole. Signed-off

Re: [PATCH 2/3] fbcon: Add an option to disable fbcon in panic.

2024-07-18 Thread Jocelyn Falempe
On 17/07/2024 17:04, Daniel Vetter wrote: On Wed, Jul 17, 2024 at 10:48:40AM +0200, Jocelyn Falempe wrote: This is required to avoid conflict between DRM_PANIC, and fbcon. If a drm device already handle panic with drm_panic, it should set the skip_panic field in fb_info, so that fbcon will

Re: [PATCH 1/3] drm/panic: Add drm_panic_is_enabled()

2024-07-18 Thread Jocelyn Falempe
On 17/07/2024 17:08, Daniel Vetter wrote: On Wed, Jul 17, 2024 at 10:48:39AM +0200, Jocelyn Falempe wrote: It allows to check if the drm device supports drm_panic. Prepare the work to have better integration with fbcon and vtconsole. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

[PATCH v4 3/4] drm/panic: Simplify logo handling

2024-07-17 Thread Jocelyn Falempe
Move logo rectangle initialisation, and logo drawing in separate functions, so they can be re-used by different panic screens. It prepares the introduction of the QR code panic screen. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 57 + 1

[PATCH v4 4/4] drm/panic: Add a QR code panic screen

2024-07-17 Thread Jocelyn Falempe
code. You can also limit the QR code size with DRM_PANIC_SCREEN_QR_VERSION. Signed-off-by: Jocelyn Falempe --- v2: * Rewrite the rust comments with Markdown (Alice Ryhl) * Mark drm_panic_qr_generate() as unsafe (Alice Ryhl) * Use CStr directly, and remove the call to as_str_unchecked

[PATCH v4 2/4] drm/rect: Add drm_rect_overlap()

2024-07-17 Thread Jocelyn Falempe
Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 3 +-- include/drm/drm_rect.h | 15 +++ 2 files changed, 16

[PATCH v4 1/4] drm/panic: Add integer scaling to blit()

2024-07-17 Thread Jocelyn Falempe
Add a parameter to the blit function, to upscale the image. This is necessary to draw a QR code, otherwise, the pixels are usually too small to be readable by most QR code reader. It can also be used later for drawing fonts on high DPI display. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

[PATCH v4 0/4] drm/panic: Add a QR code panic screen

2024-07-17 Thread Jocelyn Falempe
ind next line and skip the '\n' (Alice Ryhl) * Remove __LOG_PREFIX as it's not used (Alice Ryhl) Jocelyn Falempe (4): drm/panic: Add integer scaling to blit() drm/rect: Add drm_rect_overlap() drm/panic: Simplify logo handling drm/panic: Add a QR code panic screen drivers/gp

Re: [PATCH v2] printk: Add a short description string to kmsg_dump()

2024-07-17 Thread Jocelyn Falempe
On 02/07/2024 14:26, Jocelyn Falempe wrote: kmsg_dump doesn't forward the panic reason string to the kmsg_dumper callback. This patch adds a new struct kmsg_dump_detail, that will hold the reason and description, and pass it to the dump() callback. To avoid updating all kmsg_dump() cal

[PATCH 3/3] drm/panic: Remove build time dependency with FRAMEBUFFER_CONSOLE

2024-07-17 Thread Jocelyn Falempe
Now that fbcon has the skip_panic option, there is no more conflicts between drm_panic and fbcon. Remove the build time dependency, so they can be both enabled. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH 2/3] fbcon: Add an option to disable fbcon in panic.

2024-07-17 Thread Jocelyn Falempe
This is required to avoid conflict between DRM_PANIC, and fbcon. If a drm device already handle panic with drm_panic, it should set the skip_panic field in fb_info, so that fbcon will stay quiet, and not overwrite the panic_screen. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

[PATCH 1/3] drm/panic: Add drm_panic_is_enabled()

2024-07-17 Thread Jocelyn Falempe
It allows to check if the drm device supports drm_panic. Prepare the work to have better integration with fbcon and vtconsole. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 20 include/drm/drm_panic.h | 2 ++ 2 files changed, 22 insertions(+) diff

[PATCH 0/3] drm/panic: Remove build time dependency with FRAMEBUFFER_CONSOLE

2024-07-17 Thread Jocelyn Falempe
truct fb_info, and check if this option and the panic_cpu are set in fb_is_inactive(), to prevent any framebuffer operation. Also skip_panic is only true if the drm driver supports drm_panic, so you will still get the VT panic info on drivers that don't have drm_panic support yet. Jocelyn

Re: [PATCH v2] printk: Add a short description string to kmsg_dump()

2024-07-12 Thread Jocelyn Falempe
On 12/07/2024 15:34, Kees Cook wrote: On July 12, 2024 2:59:30 AM PDT, Jocelyn Falempe wrote: Gentle ping, I need reviews from powerpc, usermod linux, mtd, pstore and hyperv, to be able to push it in the drm-misc tree. Oops, I thought I'd Acked already! Acked-by: Kees Cook And,

Re: [PATCH v2] printk: Add a short description string to kmsg_dump()

2024-07-12 Thread Jocelyn Falempe
On 02/07/2024 14:26, Jocelyn Falempe wrote: kmsg_dump doesn't forward the panic reason string to the kmsg_dumper callback. This patch adds a new struct kmsg_dump_detail, that will hold the reason and description, and pass it to the dump() callback. To avoid updating all kmsg_dump() cal

Re: [PATCH v3 4/4] drm/panic: Add a QR code panic screen

2024-07-12 Thread Jocelyn Falempe
On 11/07/2024 23:00, Alice Ryhl wrote: On Wed, Jul 10, 2024 at 4:01 PM Jocelyn Falempe wrote: This patch adds a new panic screen, with a QR code and the kmsg data embedded. If DRM_PANIC_SCREEN_QR_CODE_URL is set, then the kmsg data will be compressed with zlib and encoded as a numerical

Re: [PATCH v2 3/3] drm/mgag200: Rename BMC vidrst names

2024-07-10 Thread Jocelyn Falempe
On 10/07/2024 10:42, Thomas Zimmermann wrote: The BMC's scanout synchronization is only indirectly related to the VIDRST functionality. Do some renaming. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mg

Re: [PATCH v2 1/3] drm/mgag200: Only set VIDRST bits in CRTC modesetting

2024-07-10 Thread Jocelyn Falempe
ks, I think this has less chance for regression. I've only a small nitpick below. Reviewed-by: Jocelyn Falempe v2: - keep logic entirely in CRTC (Jocelyn) Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_bmc.c| 5 - drivers/gpu/drm/mgag200/mgag200_drv

Re: [PATCH v2 2/3] drm/mgag200: Remove vidrst callbacks from struct mgag200_device_funcs

2024-07-10 Thread Jocelyn Falempe
of a modeset in atomic_enable. While the modeset takes place, the BMC does not scanout at all. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h | 12 drivers/gpu/drm/mgag200/mgag200

[PATCH v3 3/4] drm/panic: Simplify logo handling

2024-07-10 Thread Jocelyn Falempe
Move logo rectangle initialisation, and logo drawing in separate functions, so they can be re-used by different panic screens. It prepares the introduction of the QR code panic screen. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 57 + 1

[PATCH v3 4/4] drm/panic: Add a QR code panic screen

2024-07-10 Thread Jocelyn Falempe
#include +#include #include #include @@ -26,6 +28,7 @@ #include #include #include +#include MODULE_AUTHOR("Jocelyn Falempe"); MODULE_DESCRIPTION("DRM panic handler"); @@ -621,6 +624,232 @@ static void draw_panic_static_kmsg(struct drm_scanout_buffer *sb)

[PATCH v3 2/4] drm/rect: Add drm_rect_overlap()

2024-07-10 Thread Jocelyn Falempe
Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 3 +-- include/drm/drm_rect.h | 15 +++ 2 files changed, 16

[PATCH v3 1/4] drm/panic: Add integer scaling to blit()

2024-07-10 Thread Jocelyn Falempe
Add a parameter to the blit function, to upscale the image. This is necessary to draw a QR code, otherwise, the pixels are usually too small to be readable by most QR code reader. It can also be used later for drawing fonts on high DPI display. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

[PATCH v3 0/4] drm/panic: Add a QR code panic screen

2024-07-10 Thread Jocelyn Falempe
t;= data_size (Greg KH) v3: * Fix all rust comments (typo, punctuation) (Miguel Ojeda) * Change the wording of safety comments (Alice Ryhl) * Add a link to the javascript decoder in the Kconfig (Greg KH) * Fix data_size and tmp_size check in drm_panic_qr_generate() Jocelyn Falempe (4): d

Re: [PATCH v2 4/4] drm/panic: Add a qr_code panic screen

2024-07-09 Thread Jocelyn Falempe
On 09/07/2024 11:41, Alice Ryhl wrote: On Tue, Jul 9, 2024 at 10:45 AM Jocelyn Falempe wrote: This patch adds a new panic screen, with a QR code and the kmsg data embedded. If DRM_PANIC_SCREEN_QR_CODE_URL is set, then the kmsg data will be compressed with zlib and encoded as a numerical

Re: [PATCH v2 4/4] drm/panic: Add a qr_code panic screen

2024-07-09 Thread Jocelyn Falempe
On 09/07/2024 11:41, Miguel Ojeda wrote: Hi Jocelyn, A quick docs-only review of the Rust side (some of these apply in several cases -- I just wanted to give an overview for you to consider). Thanks, I'll fix all typo/grammar you mentioned. On Tue, Jul 9, 2024 at 10:45 AM Jocelyn Fa

Re: [PATCH v2 4/4] drm/panic: Add a qr_code panic screen

2024-07-09 Thread Jocelyn Falempe
On 09/07/2024 12:12, Greg KH wrote: On Tue, Jul 09, 2024 at 12:04:02PM +0200, Jocelyn Falempe wrote: On 09/07/2024 11:12, Greg KH wrote: On Tue, Jul 09, 2024 at 11:11:35AM +0200, Greg KH wrote: On Tue, Jul 09, 2024 at 10:40:10AM +0200, Jocelyn Falempe wrote: +config

Re: [PATCH v2 4/4] drm/panic: Add a qr_code panic screen

2024-07-09 Thread Jocelyn Falempe
On 09/07/2024 11:12, Greg KH wrote: On Tue, Jul 09, 2024 at 11:11:35AM +0200, Greg KH wrote: On Tue, Jul 09, 2024 at 10:40:10AM +0200, Jocelyn Falempe wrote: +config DRM_PANIC_SCREEN_QR_CODE_URL + string "Base url of the QR code in the panic screen" +

[PATCH v2 0/4] drm/panic: Add a qr_code panic screen

2024-07-09 Thread Jocelyn Falempe
t;= data_size (Greg KH) Jocelyn Falempe (4): drm/panic: Add integer scaling to blit() drm/rect: add drm_rect_overlap() drm/panic: simplify logo handling drm/panic: Add a qr_code panic screen drivers/gpu/drm/Kconfig | 29 + drivers/gpu/drm/Makefile|1 + drivers/gpu/

[PATCH v2 4/4] drm/panic: Add a qr_code panic screen

2024-07-09 Thread Jocelyn Falempe
<= data_size (Greg KH) Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/Kconfig | 29 + drivers/gpu/drm/Makefile|1 + drivers/gpu/drm/drm_drv.c |3 + drivers/gpu/drm/drm_panic.c | 247 drivers/gpu/drm/drm_panic_qr.rs | 1

[PATCH v2 2/4] drm/rect: add drm_rect_overlap()

2024-07-09 Thread Jocelyn Falempe
Check if two rectangles overlap. It's a bit similar to drm_rect_intersect() but this won't modify the rectangle. Simplifies a bit drm_panic. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 3 +-- include/drm/drm_rect.h | 15 +++ 2 files changed, 16

[PATCH v2 3/4] drm/panic: simplify logo handling

2024-07-09 Thread Jocelyn Falempe
Move logo rectangle initialisation, and logo drawing in separate functions, so they can be re-used by different panic screens. It prepares the introduction of the QR-code panic screen. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm/drm_panic.c | 57 + 1

[PATCH v2 1/4] drm/panic: Add integer scaling to blit()

2024-07-09 Thread Jocelyn Falempe
Add a parameter to the blit function, to upscale the image. This is necessary to draw QR-code, otherwise, the pixels are usually too small to be readable by most QR-code reader. It can also be used later for drawing fonts on high-DPI display. Signed-off-by: Jocelyn Falempe --- drivers/gpu/drm

Re: [PATCH v4 7/7] drm/mgag200: Implement struct drm_crtc_funcs.get_vblank_timestamp

2024-07-08 Thread Jocelyn Falempe
. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_drv.h | 10 -- drivers/gpu/drm/mgag200/mgag200_mode.c | 25 + 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/mgag200

Re: [PATCH v4 6/7] drm/mgag200: Add vblank support

2024-07-08 Thread Jocelyn Falempe
On 05/07/2024 13:47, Thomas Zimmermann wrote: There's no VBLANK interrupt on Matrox chipsets. The workaround that is being used here and in other free Matrox drivers is to program to the value of and enable the VLINE interrupt. This triggers an interrupt at the time when VBLANK begins. VLIN

Re: [PATCH v4 4/7] drm/mgag200: Add dedicated variables for blanking fields

2024-07-08 Thread Jocelyn Falempe
On 05/07/2024 13:47, Thomas Zimmermann wrote: Represent fields for horizontal and vertical blanking with , , and . Aligns the code with the Matrox programming manuals. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm

Re: [PATCH v4 3/7] drm/mgag200: Use adjusted mode values for CRTCs

2024-07-08 Thread Jocelyn Falempe
On 05/07/2024 13:47, Thomas Zimmermann wrote: Use the values with the crtc_ prefix from struct drm_display_mode to program hardware. The DRM core adjusted these values to the requirements of CRTC hardware. Thanks, it looks good to me. Reviewed-by: Jocelyn Falempe Signed-off-by: Thomas

Re: [PATCH v4 2/7] drm/mgag200: Align register field names with documentation

2024-07-08 Thread Jocelyn Falempe
On 05/07/2024 13:47, Thomas Zimmermann wrote: In mgag200_set_mode_regs(), align variable names with the field names given in the Matrox programming manuals. Makes the code and docs grep- able. I confirm it's better when the code matches the documentation. Reviewed-by: Jocelyn Fa

Re: [PATCH v4 1/7] drm/mgag200: Use hexadecimal register indeces

2024-07-08 Thread Jocelyn Falempe
: Jocelyn Falempe Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/mgag200/mgag200_mode.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c index d4550e4b3b01

Re: [PATCH 1/4] drm/mgag200: Only set VIDRST bits in CRTC modesetting

2024-07-04 Thread Jocelyn Falempe
On 04/07/2024 14:16, Thomas Zimmermann wrote: Hi Am 04.07.24 um 14:03 schrieb Jocelyn Falempe: On 03/07/2024 15:40, Thomas Zimmermann wrote: The VRSTEN and HRSTEN bits control whether a CRTC synchronizes its display signal with an external source on the VIDRST pin. The G200WB and G200EW3

<    1   2   3   4   5   6   7   >