e25b18a21f26ed4d2a884ff23a786a7f2b7aabe2
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0588-drm-vc4-hdmi-Deal-with-multiple-debugfs-files.patch
1 From a1f24e24c065b91f833e3f546c1507f69fb04bc7 Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Thu, 16 Jan 2020 14:27:56 +0100
4 Subject: [PATCH] drm/vc4: hdmi: Deal with multiple debugfs files
5
6 The HDMI driver was registering a single debugfs file so far with the name
7 hdmi_regs.
8
9 Obviously, this is not going to work anymore when will have multiple HDMI
10 controllers since we will end up trying to register two files with the same
11 name.
12
13 Let's use the ID to avoid that name conflict.
14
15 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
16 ---
17 drivers/gpu/drm/vc4/vc4_hdmi.c | 5 ++++-
18 1 file changed, 4 insertions(+), 1 deletion(-)
19
20 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
21 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
22 @@ -1381,7 +1381,10 @@ static int vc4_hdmi_bind(struct device *
23 if (ret)
24 goto err_destroy_encoder;
25
26 - vc4_debugfs_add_file(drm, "hdmi_regs", vc4_hdmi_debugfs_regs, vc4_hdmi);
27 + vc4_debugfs_add_file(drm,
28 + variant->id ? "hdmi1_regs" : "hdmi_regs",
29 + vc4_hdmi_debugfs_regs,
30 + vc4_hdmi);
31
32 return 0;
33