mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-22 22:54:06 +00:00
20ea6adbf1
Build system: x86_64 Build-tested: bcm2708, bcm2709, bcm2710, bcm2711 Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B Signed-off-by: Marty Jones <mj8263788@gmail.com> Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
24 lines
829 B
Diff
24 lines
829 B
Diff
From 02e41ddac8a960df7defaa377c1d3d981ac0a652 Mon Sep 17 00:00:00 2001
|
|
From: Dom Cobley <popcornmix@gmail.com>
|
|
Date: Wed, 27 Apr 2022 14:45:35 +0100
|
|
Subject: [PATCH] drm/vc4_kms: Protect hvs dereference on fkms
|
|
|
|
fkms has a null hvs pointer so this crashes. Protect against it
|
|
|
|
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
|
|
---
|
|
drivers/gpu/drm/vc4/vc4_kms.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/vc4_kms.c
|
|
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
|
|
@@ -354,7 +354,7 @@ static void vc4_atomic_commit_tail(struc
|
|
struct vc4_hvs_state *new_hvs_state;
|
|
struct drm_crtc *crtc;
|
|
struct vc4_hvs_state *old_hvs_state;
|
|
- unsigned long max_clock_rate = clk_get_max_rate(hvs->core_clk);
|
|
+ unsigned long max_clock_rate = hvs ? clk_get_max_rate(hvs->core_clk) : 0;
|
|
unsigned int channel;
|
|
int i;
|
|
|