aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0648-drm-vc4-Don-t-create-hvs_load_tracker-on-fkms.patch
blob: 199aa6efa2185734b2b68acce98755f48f7b2b8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From d695c7afe2e688663041f8861ebd31c1e8275f27 Mon Sep 17 00:00:00 2001
From: Dom Cobley <popcornmix@gmail.com>
Date: Thu, 24 Jun 2021 12:00:49 +0100
Subject: [PATCH] drm/vc4: Don't create hvs_load_tracker on fkms

fkms doesn't use vc4->hvs so protect against that

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
---
 drivers/gpu/drm/vc4/vc4_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/vc4/vc4_debugfs.c
+++ b/drivers/gpu/drm/vc4/vc4_debugfs.c
@@ -27,7 +27,7 @@ vc4_debugfs_init(struct drm_minor *minor
 	struct vc4_dev *vc4 = to_vc4_dev(minor->dev);
 	struct vc4_debugfs_info_entry *entry;
 
-	if (!of_device_is_compatible(vc4->hvs->pdev->dev.of_node,
+	if (vc4->hvs && !of_device_is_compatible(vc4->hvs->pdev->dev.of_node,
 				     "brcm,bcm2711-vc5"))
 		debugfs_create_bool("hvs_load_tracker", S_IRUGO | S_IWUSR,
 				    minor->debugfs_root, &vc4->load_tracker_enabled);