diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-23 13:42:55 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2019-12-24 18:49:44 +0100 |
commit | 67dcc43f3a22dc3a7ac07a7065971b426feeb043 (patch) | |
tree | 0b647356dce45d2c79fd46cf201daa5089cc0934 /target/linux/brcm2708/patches-4.19/950-0663-Fixup-FKMS-interrupt-handing-for-non-existent-displa.patch | |
parent | 47a93a810f78adce5a130d287f82b28e9b54313c (diff) | |
download | upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.gz upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.tar.bz2 upstream-67dcc43f3a22dc3a7ac07a7065971b426feeb043.zip |
brcm2708: organize kernel patches
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/brcm2708/patches-4.19/950-0663-Fixup-FKMS-interrupt-handing-for-non-existent-displa.patch')
-rw-r--r-- | target/linux/brcm2708/patches-4.19/950-0663-Fixup-FKMS-interrupt-handing-for-non-existent-displa.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/target/linux/brcm2708/patches-4.19/950-0663-Fixup-FKMS-interrupt-handing-for-non-existent-displa.patch b/target/linux/brcm2708/patches-4.19/950-0663-Fixup-FKMS-interrupt-handing-for-non-existent-displa.patch new file mode 100644 index 0000000000..2626658d16 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0663-Fixup-FKMS-interrupt-handing-for-non-existent-displa.patch @@ -0,0 +1,39 @@ +From c2957d7709a43c81e5345d537feaa6980ffcc1a4 Mon Sep 17 00:00:00 2001 +From: James Hughes <james.hughes@raspberrypi.org> +Date: Mon, 29 Jul 2019 12:02:59 +0100 +Subject: [PATCH] Fixup FKMS interrupt handing for non-existent display + +If an errant interrupt flag was received from a non-existent display, +a NULL pointer access was made. Protect against this by checking if a +second display is present prior to checking the interrupt flags. +--- + drivers/gpu/drm/vc4/vc4_firmware_kms.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c ++++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c +@@ -1056,14 +1056,17 @@ static irqreturn_t vc4_crtc_irq_handler( + vc4_crtc_handle_page_flip(crtc_list[0]); + } + +- /* Check for the secondary display too */ +- chan = readl(crtc_list[0]->regs + SMIDSW1); ++ if (crtc_list[1]) { ++ /* Check for the secondary display too */ ++ chan = readl(crtc_list[0]->regs + SMIDSW1); + +- if (chan & 1) { +- writel(SMI_NEW, crtc_list[0]->regs + SMIDSW1); +- if (crtc_list[1]->vblank_enabled) +- drm_crtc_handle_vblank(&crtc_list[1]->base); +- vc4_crtc_handle_page_flip(crtc_list[1]); ++ if (chan & 1) { ++ writel(SMI_NEW, crtc_list[0]->regs + SMIDSW1); ++ ++ if (crtc_list[1]->vblank_enabled) ++ drm_crtc_handle_vblank(&crtc_list[1]->base); ++ vc4_crtc_handle_page_flip(crtc_list[1]); ++ } + } + } + |