From 20ea6adbf199097c4f5f591ffee088340630dae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Mon, 16 May 2022 23:40:32 +0200 Subject: bcm27xx: add support for linux v5.15 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Álvaro Fernández Rojas --- ...-all-the-HDMI-registers-into-the-debugfs-.patch | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch (limited to 'target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch') diff --git a/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch b/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch new file mode 100644 index 0000000000..feedea8f43 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0427-drm-vc4-Add-all-the-HDMI-registers-into-the-debugfs-.patch @@ -0,0 +1,95 @@ +From b6d1141860db42137660a44a8c1713a33e6e5833 Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +Date: Wed, 21 Oct 2020 18:34:56 +0100 +Subject: [PATCH] drm/vc4: Add all the HDMI registers into the debugfs + dumps + +The vc5 HDMI registers hadn't been added into the debugfs +register sets, therefore weren't dumped on request. +Add them in. + +Signed-off-by: Dave Stevenson +--- + drivers/gpu/drm/vc4/vc4_hdmi.c | 39 ++++++++++++++++++++++++++++++++++ + drivers/gpu/drm/vc4/vc4_hdmi.h | 8 +++++++ + 2 files changed, 47 insertions(+) + +--- a/drivers/gpu/drm/vc4/vc4_hdmi.c ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.c +@@ -112,6 +112,12 @@ static int vc4_hdmi_debugfs_regs(struct + + drm_print_regset32(&p, &vc4_hdmi->hdmi_regset); + drm_print_regset32(&p, &vc4_hdmi->hd_regset); ++ drm_print_regset32(&p, &vc4_hdmi->cec_regset); ++ drm_print_regset32(&p, &vc4_hdmi->csc_regset); ++ drm_print_regset32(&p, &vc4_hdmi->dvp_regset); ++ drm_print_regset32(&p, &vc4_hdmi->phy_regset); ++ drm_print_regset32(&p, &vc4_hdmi->ram_regset); ++ drm_print_regset32(&p, &vc4_hdmi->rm_regset); + + return 0; + } +@@ -2361,6 +2367,7 @@ static int vc5_hdmi_init_resources(struc + struct platform_device *pdev = vc4_hdmi->pdev; + struct device *dev = &pdev->dev; + struct resource *res; ++ int ret; + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "hdmi"); + if (!res) +@@ -2457,6 +2464,38 @@ static int vc5_hdmi_init_resources(struc + return PTR_ERR(vc4_hdmi->reset); + } + ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->hdmi_regset, VC4_HDMI); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->hd_regset, VC4_HD); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->cec_regset, VC5_CEC); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->csc_regset, VC5_CSC); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->dvp_regset, VC5_DVP); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->phy_regset, VC5_PHY); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->ram_regset, VC5_RAM); ++ if (ret) ++ return ret; ++ ++ ret = vc4_hdmi_build_regset(vc4_hdmi, &vc4_hdmi->rm_regset, VC5_RM); ++ if (ret) ++ return ret; ++ + return 0; + } + +--- a/drivers/gpu/drm/vc4/vc4_hdmi.h ++++ b/drivers/gpu/drm/vc4/vc4_hdmi.h +@@ -216,6 +216,14 @@ struct vc4_hdmi { + * the scrambler on? Protected by @mutex. + */ + bool scdc_enabled; ++ ++ /* VC5 debugfs regset */ ++ struct debugfs_regset32 cec_regset; ++ struct debugfs_regset32 csc_regset; ++ struct debugfs_regset32 dvp_regset; ++ struct debugfs_regset32 phy_regset; ++ struct debugfs_regset32 ram_regset; ++ struct debugfs_regset32 rm_regset; + }; + + static inline struct vc4_hdmi * -- cgit v1.2.3