[PATCH v6 6/8] drm/i915/display: Flush the front buffer in panic handler
From: Jocelyn Falempe
Date: Tue Apr 01 2025 - 09:00:05 EST
On Lunar Lake, if the panic occurs when fbcon is active, the panic
screen is only partially visible on the screen. Adding this
intel_frontbuffer_flush() call solves the issue.
It's probably not safe to do that in the panic handler, but that's
still better than nothing.
Signed-off-by: Jocelyn Falempe <jfalempe@xxxxxxxxxx>
---
drivers/gpu/drm/i915/display/intel_atomic_plane.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index eebf20fafaeb..5dc880b963fd 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -59,6 +59,7 @@
#include "intel_fb.h"
#include "intel_fb_pin.h"
#include "intel_fbdev.h"
+#include "intel_frontbuffer.h"
#include "skl_scaler.h"
#include "skl_universal_plane.h"
#include "skl_watermark.h"
@@ -1273,7 +1274,13 @@ static void intel_panic_flush(struct drm_plane *plane)
/* Don't disable tiling if it's the fbdev framebuffer.*/
if (to_intel_framebuffer(fb) == intel_fbdev_framebuffer(display->fbdev.fbdev)) {
+ struct intel_frontbuffer *front = to_intel_frontbuffer(fb);
+ struct drm_gem_object *obj = intel_fb_bo(fb);
+
+ intel_bo_flush_if_display(obj);
+ intel_frontbuffer_flush(front, ORIGIN_DIRTYFB);
return;
+ }
if (fb->modifier && iplane->disable_tiling)
iplane->disable_tiling(iplane);
--
2.49.0