1 From ef65a6f064b3bd497d83b0f40908182ba2a2b863 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Wed, 21 Oct 2020 18:34:56 +0100
4 Subject: [PATCH] drm/vc4: Add all the HDMI registers into the debugfs
7 The vc5 HDMI registers hadn't been added into the debugfs
8 register sets, therefore weren't dumped on request.
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 drivers/gpu/drm/vc4/vc4_hdmi.c | 44 ++++++++++++++++++++++++++++++++++
14 drivers/gpu/drm/vc4/vc4_hdmi.h | 9 +++++++
15 2 files changed, 53 insertions(+)
17 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
18 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
19 @@ -92,6 +92,12 @@ static int vc4_hdmi_debugfs_regs(struct
21 drm_print_regset32(&p, &vc4_hdmi->hdmi_regset);
22 drm_print_regset32(&p, &vc4_hdmi->hd_regset);
23 + drm_print_regset32(&p, &vc4_hdmi->cec_regset);
24 + drm_print_regset32(&p, &vc4_hdmi->csc_regset);
25 + drm_print_regset32(&p, &vc4_hdmi->dvp_regset);
26 + drm_print_regset32(&p, &vc4_hdmi->phy_regset);
27 + drm_print_regset32(&p, &vc4_hdmi->ram_regset);
28 + drm_print_regset32(&p, &vc4_hdmi->rm_regset);
32 @@ -1740,6 +1746,7 @@ static int vc5_hdmi_init_resources(struc
33 struct platform_device *pdev = vc4_hdmi->pdev;
34 struct device *dev = &pdev->dev;
38 res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi");
40 @@ -1830,6 +1837,38 @@ static int vc5_hdmi_init_resources(struc
41 return PTR_ERR(vc4_hdmi->reset);
44 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->hdmi_regset, VC4_HDMI);
48 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->hd_regset, VC4_HD);
52 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->cec_regset, VC5_CEC);
56 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->csc_regset, VC5_CSC);
60 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->dvp_regset, VC5_DVP);
64 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->phy_regset, VC5_PHY);
68 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->ram_regset, VC5_RAM);
72 + ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->rm_regset, VC5_RM);
79 --- a/drivers/gpu/drm/vc4/vc4_hdmi.h
80 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.h
81 @@ -161,8 +161,16 @@ struct vc4_hdmi {
83 struct reset_control *reset;
85 + /* Common debugfs regset */
86 struct debugfs_regset32 hdmi_regset;
87 struct debugfs_regset32 hd_regset;
88 + /* VC5 debugfs regset */
89 + struct debugfs_regset32 cec_regset;
90 + struct debugfs_regset32 csc_regset;
91 + struct debugfs_regset32 dvp_regset;
92 + struct debugfs_regset32 phy_regset;
93 + struct debugfs_regset32 ram_regset;
94 + struct debugfs_regset32 rm_regset;
97 static inline struct vc4_hdmi *