mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
* import new layout for libreelec patches (no more mbox) * refactor existing patches to kernel 6.17 * fix uboot issue causing VOP IOMMU page fault and no screen
72 lines
2.0 KiB
Diff
72 lines
2.0 KiB
Diff
From eb780535ef9545a927dea283ca576ca6bc2b14e1 Mon Sep 17 00:00:00 2001
|
|
From: Paolo Sabatino <paolo.sabatino@gmail.com>
|
|
Date: Wed, 17 Sep 2025 12:03:15 +0200
|
|
Subject: [PATCH] Fix Linux kernel complaining about IOMMU page fault
|
|
|
|
rk3288 remove handle does not get called at all
|
|
because the driver is missing the DM_FLAG_OS_PREPARE flag.
|
|
Also adds proper reset of VOP clocks to further clean
|
|
up VOP state.
|
|
---
|
|
drivers/video/rockchip/rk3288_vop.c | 22 ++++++++++++++++++++--
|
|
1 file changed, 20 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/drivers/video/rockchip/rk3288_vop.c b/drivers/video/rockchip/rk3288_vop.c
|
|
index 282831eaac..9e88f3538b 100644
|
|
--- a/drivers/video/rockchip/rk3288_vop.c
|
|
+++ b/drivers/video/rockchip/rk3288_vop.c
|
|
@@ -10,6 +10,7 @@
|
|
#include <regmap.h>
|
|
#include <syscon.h>
|
|
#include <video.h>
|
|
+#include <reset.h>
|
|
#include <asm/global_data.h>
|
|
#include <asm/arch-rockchip/clock.h>
|
|
#include <asm/arch-rockchip/grf_rk3288.h>
|
|
@@ -69,16 +70,32 @@ static int rk3288_vop_probe(struct udevice *dev)
|
|
return rk_vop_probe(dev);
|
|
}
|
|
|
|
-static int rk_vop_remove(struct udevice *dev)
|
|
+static int rk3288_vop_remove(struct udevice *dev)
|
|
{
|
|
struct rk_vop_priv *priv = dev_get_priv(dev);
|
|
struct rk3288_vop *regs = priv->regs;
|
|
+ struct rk3288_vop *win_regs = priv->regs + priv->win_offset;
|
|
+ struct reset_ctl_bulk resets;
|
|
+ struct reset_ctl dclk_rst;
|
|
+ int ret;
|
|
|
|
setbits_le32(®s->sys_ctrl, V_STANDBY_EN(1));
|
|
|
|
/* wait frame complete (60Hz) to enter standby */
|
|
mdelay(17);
|
|
|
|
+ ret = reset_get_bulk(dev, &resets);
|
|
+ if (ret) {
|
|
+ printf("failed to get resets (ret=%d)\n", ret);
|
|
+ return ret;
|
|
+ }
|
|
+
|
|
+ reset_assert_bulk(&resets);
|
|
+ udelay(20);
|
|
+
|
|
+ reset_deassert_bulk(&resets);
|
|
+ udelay(20);
|
|
+
|
|
return 0;
|
|
}
|
|
|
|
@@ -103,6 +120,7 @@ U_BOOT_DRIVER(rockchip_rk3288_vop) = {
|
|
.ops = &rk3288_vop_ops,
|
|
.bind = rk_vop_bind,
|
|
.probe = rk3288_vop_probe,
|
|
- .remove = rk_vop_remove,
|
|
+ .remove = rk3288_vop_remove,
|
|
.priv_auto = sizeof(struct rk_vop_priv),
|
|
+ .flags = DM_FLAG_OS_PREPARE
|
|
};
|
|
--
|
|
2.43.0
|
|
|