Files
build/patch/kernel/archive/meson-6.12/0051-drm-meson-Update-meson_vpu_init-to-work-with-Meson8-.patch
Dominik Wójt 5b29f4dd4b meson: kernel update: legacy -> 6.6, current -> 6.12 (#7801)
* Add MXQ target. Copy HDMI fix from odroid-c1.
* meson8, MXQ: add boot from usb support, configurable dtb
* MXQ: remove boot logo
Built-in U-BOOT is used, so the logo will not be displayed anyway.
* meson: kernel update: legacy -> 6.6, current -> 6.12
* Change Odroid C1 and Onecloud to community supported as build now passes
---------
Co-authored-by: Igor Pecovnik <igor@armbian.com>
2025-02-08 23:08:34 +01:00

85 lines
3.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date: Sat, 25 Apr 2020 22:03:27 +0200
Subject: drm/meson: Update meson_vpu_init to work with Meson8/Meson8b/Meson8m2
Don't modify the VPU_RDARB_MODE_* registers because they only exist on
GXBB and newer SoCs. Initialize the VPU_MEM_PD_REG0 and VPU_MEM_PD_REG1
to 0x0 (meaning: enable everything), just like vendor u-boot does for
Meson8/Meson8b/Meson8m2.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/gpu/drm/meson/meson_drv.c | 55 ++++++----
1 file changed, 33 insertions(+), 22 deletions(-)
diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c
index 111111111111..222222222222 100644
--- a/drivers/gpu/drm/meson/meson_drv.c
+++ b/drivers/gpu/drm/meson/meson_drv.c
@@ -135,28 +135,39 @@ static struct regmap_config meson_regmap_config = {
static void meson_vpu_init(struct meson_drm *priv)
{
- u32 value;
-
- /*
- * Slave dc0 and dc5 connected to master port 1.
- * By default other slaves are connected to master port 0.
- */
- value = VPU_RDARB_SLAVE_TO_MASTER_PORT(0, 1) |
- VPU_RDARB_SLAVE_TO_MASTER_PORT(5, 1);
- writel_relaxed(value, priv->io_base + _REG(VPU_RDARB_MODE_L1C1));
-
- /* Slave dc0 connected to master port 1 */
- value = VPU_RDARB_SLAVE_TO_MASTER_PORT(0, 1);
- writel_relaxed(value, priv->io_base + _REG(VPU_RDARB_MODE_L1C2));
-
- /* Slave dc4 and dc7 connected to master port 1 */
- value = VPU_RDARB_SLAVE_TO_MASTER_PORT(4, 1) |
- VPU_RDARB_SLAVE_TO_MASTER_PORT(7, 1);
- writel_relaxed(value, priv->io_base + _REG(VPU_RDARB_MODE_L2C1));
-
- /* Slave dc1 connected to master port 1 */
- value = VPU_RDARB_SLAVE_TO_MASTER_PORT(1, 1);
- writel_relaxed(value, priv->io_base + _REG(VPU_WRARB_MODE_L2C1));
+ if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_M8) ||
+ meson_vpu_is_compatible(priv, VPU_COMPATIBLE_M8B) ||
+ meson_vpu_is_compatible(priv, VPU_COMPATIBLE_M8M2)) {
+ writel(0x0, priv->io_base + _REG(VPU_MEM_PD_REG0));
+ writel(0x0, priv->io_base + _REG(VPU_MEM_PD_REG1));
+ } else {
+ u32 value;
+
+ /*
+ * Slave dc0 and dc5 connected to master port 1.
+ * By default other slaves are connected to master port 0.
+ */
+ value = VPU_RDARB_SLAVE_TO_MASTER_PORT(0, 1) |
+ VPU_RDARB_SLAVE_TO_MASTER_PORT(5, 1);
+ writel_relaxed(value,
+ priv->io_base + _REG(VPU_RDARB_MODE_L1C1));
+
+ /* Slave dc0 connected to master port 1 */
+ value = VPU_RDARB_SLAVE_TO_MASTER_PORT(0, 1);
+ writel_relaxed(value,
+ priv->io_base + _REG(VPU_RDARB_MODE_L1C2));
+
+ /* Slave dc4 and dc7 connected to master port 1 */
+ value = VPU_RDARB_SLAVE_TO_MASTER_PORT(4, 1) |
+ VPU_RDARB_SLAVE_TO_MASTER_PORT(7, 1);
+ writel_relaxed(value,
+ priv->io_base + _REG(VPU_RDARB_MODE_L2C1));
+
+ /* Slave dc1 connected to master port 1 */
+ value = VPU_RDARB_SLAVE_TO_MASTER_PORT(1, 1);
+ writel_relaxed(value,
+ priv->io_base + _REG(VPU_WRARB_MODE_L2C1));
+ }
}
static void meson_fbdev_setup(struct meson_drm *priv)
--
Armbian