From 79bb62365a9ef96916f0bcf424e6d105dd409b9b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 10 Jul 2025 16:50:12 +0200 Subject: [PATCH] 5.4-stable patches added patches: drm-exynos-exynos7_drm_decon-add-vblank-check-in-irq-handling.patch --- ...con-add-vblank-check-in-irq-handling.patch | 47 +++++++++++++++++++ queue-5.4/series | 1 + 2 files changed, 48 insertions(+) create mode 100644 queue-5.4/drm-exynos-exynos7_drm_decon-add-vblank-check-in-irq-handling.patch diff --git a/queue-5.4/drm-exynos-exynos7_drm_decon-add-vblank-check-in-irq-handling.patch b/queue-5.4/drm-exynos-exynos7_drm_decon-add-vblank-check-in-irq-handling.patch new file mode 100644 index 0000000000..3bc248e22e --- /dev/null +++ b/queue-5.4/drm-exynos-exynos7_drm_decon-add-vblank-check-in-irq-handling.patch @@ -0,0 +1,47 @@ +From b846350aa272de99bf6fecfa6b08e64ebfb13173 Mon Sep 17 00:00:00 2001 +From: Kaustabh Chakraborty +Date: Fri, 27 Jun 2025 00:50:30 +0530 +Subject: drm/exynos: exynos7_drm_decon: add vblank check in IRQ handling + +From: Kaustabh Chakraborty + +commit b846350aa272de99bf6fecfa6b08e64ebfb13173 upstream. + +If there's support for another console device (such as a TTY serial), +the kernel occasionally panics during boot. The panic message and a +relevant snippet of the call stack is as follows: + + Unable to handle kernel NULL pointer dereference at virtual address 000000000000000 + Call trace: + drm_crtc_handle_vblank+0x10/0x30 (P) + decon_irq_handler+0x88/0xb4 + [...] + +Otherwise, the panics don't happen. This indicates that it's some sort +of race condition. + +Add a check to validate if the drm device can handle vblanks before +calling drm_crtc_handle_vblank() to avoid this. + +Cc: stable@vger.kernel.org +Fixes: 96976c3d9aff ("drm/exynos: Add DECON driver") +Signed-off-by: Kaustabh Chakraborty +Signed-off-by: Inki Dae +Signed-off-by: Greg Kroah-Hartman +--- + drivers/gpu/drm/exynos/exynos7_drm_decon.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/gpu/drm/exynos/exynos7_drm_decon.c ++++ b/drivers/gpu/drm/exynos/exynos7_drm_decon.c +@@ -595,6 +595,10 @@ static irqreturn_t decon_irq_handler(int + if (!ctx->drm_dev) + goto out; + ++ /* check if crtc and vblank have been initialized properly */ ++ if (!drm_dev_has_vblank(ctx->drm_dev)) ++ goto out; ++ + if (!ctx->i80_if) { + drm_crtc_handle_vblank(&ctx->crtc->base); + diff --git a/queue-5.4/series b/queue-5.4/series index 3415153c78..09c8dafa36 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -109,3 +109,4 @@ media-uvcvideo-return-the-number-of-processed-controls.patch media-uvcvideo-send-control-events-for-partial-succeeds.patch media-uvcvideo-rollback-non-processed-entities-on-error.patch staging-rtl8723bs-avoid-memset-in-aes_cipher-and-aes_decipher.patch +drm-exynos-exynos7_drm_decon-add-vblank-check-in-irq-handling.patch -- 2.47.2