Module Name: src
Committed By: riastradh
Date: Sun Dec 19 12:45:12 UTC 2021
Modified Files:
src/sys/arch/arm/rockchip: rk_vop.c
Log Message:
rkdrm: Reset vop for 10us on attach.
This avoids creepy lines slowly appearing, and freezing themselves
semipermanently on the display, until the first successful modeset.
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/rockchip/rk_vop.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/arm/rockchip/rk_vop.c
diff -u src/sys/arch/arm/rockchip/rk_vop.c:1.13 src/sys/arch/arm/rockchip/rk_vop.c:1.14
--- src/sys/arch/arm/rockchip/rk_vop.c:1.13 Sun Dec 19 12:43:37 2021
+++ src/sys/arch/arm/rockchip/rk_vop.c Sun Dec 19 12:45:12 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: rk_vop.c,v 1.13 2021/12/19 12:43:37 riastradh Exp $ */
+/* $NetBSD: rk_vop.c,v 1.14 2021/12/19 12:45:12 riastradh Exp $ */
/*-
* Copyright (c) 2019 Jared D. McNeill <[email protected]>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.13 2021/12/19 12:43:37 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rk_vop.c,v 1.14 2021/12/19 12:45:12 riastradh Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -624,13 +624,25 @@ rk_vop_attach(device_t parent, device_t
fdtbus_clock_assign(phandle);
+ /* assert all the reset signals for 20us */
+ for (n = 0; n < __arraycount(reset_names); n++) {
+ rst = fdtbus_reset_get(phandle, reset_names[n]);
+ if (rst == NULL || fdtbus_reset_assert(rst) != 0) {
+ aprint_error(": couldn't assert reset %s\n",
+ reset_names[n]);
+ return;
+ }
+ }
+ DELAY(10);
for (n = 0; n < __arraycount(reset_names); n++) {
rst = fdtbus_reset_get(phandle, reset_names[n]);
if (rst == NULL || fdtbus_reset_deassert(rst) != 0) {
- aprint_error(": couldn't de-assert reset %s\n", reset_names[n]);
+ aprint_error(": couldn't de-assert reset %s\n",
+ reset_names[n]);
return;
}
}
+
for (n = 0; n < __arraycount(clock_names); n++) {
if (fdtbus_clock_enable(phandle, clock_names[n], true) != 0) {
aprint_error(": couldn't enable clock %s\n", clock_names[n]);