1 From b6d1141860db42137660a44a8c1713a33e6e5833 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 | 39 ++++++++++++++++++++++++++++++++++
14 drivers/gpu/drm/vc4/vc4_hdmi.h | 8 +++++++
15 2 files changed, 47 insertions(+)
17 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
18 +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
19 @@ -116,6 +116,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 @@ -2369,6 +2375,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 @@ -2465,6 +2472,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 @@ -216,6 +216,14 @@ struct vc4_hdmi {
82 * the scrambler on? Protected by @mutex.
86 + /* VC5 debugfs regset */
87 + struct debugfs_regset32 cec_regset;
88 + struct debugfs_regset32 csc_regset;
89 + struct debugfs_regset32 dvp_regset;
90 + struct debugfs_regset32 phy_regset;
91 + struct debugfs_regset32 ram_regset;
92 + struct debugfs_regset32 rm_regset;
95 static inline struct vc4_hdmi *