Skip to content

Commit

Permalink
update patches and enable hdmi console
Browse files Browse the repository at this point in the history
  • Loading branch information
anaelorlinski committed Apr 25, 2023
1 parent cf1ccbf commit 0f3f615
Show file tree
Hide file tree
Showing 8 changed files with 180 additions and 1 deletion.
2 changes: 1 addition & 1 deletion openwrt-23.04/patches/target/linux/rockchip/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ endef

include $(INCLUDE_DIR)/target.mk

DEFAULT_PACKAGES += uboot-envtools partx-utils e2fsprogs mkf2fs kmod-gpio-button-hotplug \
DEFAULT_PACKAGES += uboot-envtools partx-utils mkf2fs kmod-gpio-button-hotplug \
automount fdisk

KERNELNAME:=Image dtbs
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::askconsole:/usr/libexec/login.sh
tty1::askfirst:/usr/libexec/login.sh
50 changes: 50 additions & 0 deletions openwrt-23.04/patches/target/linux/rockchip/armv8/config-5.15
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,23 @@ CONFIG_DMA_OPS=y
CONFIG_DMA_REMAP=y
CONFIG_DMA_SHARED_BUFFER=y
CONFIG_DNOTIFY=y
CONFIG_DRM=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_DW_HDMI=y
CONFIG_DRM_DW_MIPI_DSI=y
CONFIG_DRM_GEM_CMA_HELPER=y
CONFIG_DRM_GEM_SHMEM_HELPER=y
CONFIG_DRM_KMS_CMA_HELPER=y
CONFIG_DRM_KMS_HELPER=y
CONFIG_DRM_LIMA=y
CONFIG_DRM_MALI_DISPLAY=y
CONFIG_DRM_MIPI_DSI=y
CONFIG_DRM_PANEL=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
CONFIG_DRM_PANFROST=y
CONFIG_DRM_ROCKCHIP=y
CONFIG_DRM_SCHED=y
CONFIG_DTC=y
CONFIG_DT_IDLE_STATES=y
CONFIG_DUMMY_CONSOLE=y
Expand All @@ -220,10 +237,29 @@ CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXTCON=y
CONFIG_F2FS_FS=y
CONFIG_FANOTIFY=y
CONFIG_FB=y
CONFIG_FB_CMDLINE=y
CONFIG_FHANDLE=y
CONFIG_FIXED_PHY=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_FONTS=y
# CONFIG_FONT_10x18 is not set
# CONFIG_FONT_6x10 is not set
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_8x16 is not set
CONFIG_FONT_8x8=y
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_SUN8x16 is not set
CONFIG_FONT_SUPPORT=y
# CONFIG_FORTIFY_SOURCE is not set
CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER=y
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FRAME_POINTER=y
CONFIG_FRAME_WARN=2048
CONFIG_FS_IOMAP=y
Expand Down Expand Up @@ -254,6 +290,7 @@ CONFIG_GENERIC_MSI_IRQ=y
CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
CONFIG_GENERIC_PCI_IOMAP=y
CONFIG_GENERIC_PHY=y
CONFIG_GENERIC_PHY_MIPI_DPHY=y
CONFIG_GENERIC_PINCONF=y
CONFIG_GENERIC_SCHED_CLOCK=y
CONFIG_GENERIC_SMP_IDLE_THREAD=y
Expand All @@ -273,6 +310,7 @@ CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_HAS_DMA=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT_MAP=y
CONFIG_HDMI=y
CONFIG_HID=y
CONFIG_HID_GENERIC=y
CONFIG_HOTPLUG_CPU=y
Expand All @@ -289,6 +327,7 @@ CONFIG_HZ=250
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
CONFIG_I2C=y
CONFIG_I2C_ALGOBIT=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_COMPAT=y
Expand Down Expand Up @@ -327,6 +366,7 @@ CONFIG_JBD2=y
CONFIG_JFFS2_ZLIB=y
CONFIG_JUMP_LABEL=y
CONFIG_KALLSYMS=y
CONFIG_KCMP=y
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC_FILE=y
CONFIG_KSM=y
Expand Down Expand Up @@ -522,14 +562,23 @@ CONFIG_RELOCATABLE=y
CONFIG_RESET_CONTROLLER=y
CONFIG_RESET_SCMI=y
CONFIG_RFS_ACCEL=y
# CONFIG_ROCKCHIP_CDN_DP is not set
CONFIG_ROCKCHIP_DW_HDMI=y
CONFIG_ROCKCHIP_DW_MIPI_DSI=y
CONFIG_ROCKCHIP_GRF=y
CONFIG_ROCKCHIP_INNO_HDMI=y
CONFIG_ROCKCHIP_IODOMAIN=y
CONFIG_ROCKCHIP_IOMMU=y
# CONFIG_ROCKCHIP_LVDS is not set
CONFIG_ROCKCHIP_MBOX=y
CONFIG_ROCKCHIP_PHY=y
CONFIG_ROCKCHIP_PM_DOMAINS=y
# CONFIG_ROCKCHIP_RGB is not set
# CONFIG_ROCKCHIP_RK3066_HDMI is not set
CONFIG_ROCKCHIP_THERMAL=y
CONFIG_ROCKCHIP_TIMER=y
# CONFIG_ROCKCHIP_VOP is not set
CONFIG_ROCKCHIP_VOP2=y
CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
CONFIG_RPS=y
CONFIG_RSEQ=y
Expand Down Expand Up @@ -661,6 +710,7 @@ CONFIG_USB_ULPI_BUS=y
CONFIG_USB_ULPI_VIEWPORT=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_VIDEOMODE_HELPERS=y
# CONFIG_VIRTIO_MENU is not set
CONFIG_VMAP_STACK=y
CONFIG_VM_EVENT_COUNTERS=y
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
From afa965a45e01e541cdbe5c8018226eff117610f0 Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Thu, 13 Apr 2023 16:43:47 +0200
Subject: [PATCH] drm/rockchip: vop2: fix suspend/resume

During a suspend/resume cycle the VO power domain will be disabled and
the VOP2 registers will reset to their default values. After that the
cached register values will be out of sync and the read/modify/write
operations we do on the window registers will result in bogus values
written. Fix this by re-initializing the register cache each time we
enable the VOP2. With this the VOP2 will show a picture after a
suspend/resume cycle whereas without this the screen stays dark.

Fixes: 604be85547ce4 ("drm/rockchip: Add VOP2 driver")
Cc: [email protected]
Signed-off-by: Sascha Hauer <[email protected]>
Tested-by: Chris Morgan <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
---
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 8 ++++++++
1 file changed, 8 insertions(+)

--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -214,6 +214,8 @@ struct vop2 {
struct vop2_win win[];
};

+static const struct regmap_config vop2_regmap_config;
+
static struct vop2_video_port *to_vop2_video_port(struct drm_crtc *crtc)
{
return container_of(crtc, struct vop2_video_port, crtc);
@@ -838,6 +840,12 @@ static void vop2_enable(struct vop2 *vop
return;
}

+ ret = regmap_reinit_cache(vop2->map, &vop2_regmap_config);
+ if (ret) {
+ drm_err(vop2->drm, "failed to reinit cache: %d\n", ret);
+ return;
+ }
+
if (vop2->data->soc_id == 3566)
vop2_writel(vop2, RK3568_OTP_WIN_EN, 1);

Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
From b63a553e8f5aa6574eeb535a551817a93c426d8c Mon Sep 17 00:00:00 2001
From: Sascha Hauer <[email protected]>
Date: Mon, 17 Apr 2023 14:37:47 +0200
Subject: [PATCH] drm/rockchip: vop2: Use regcache_sync() to fix suspend/resume

afa965a45e01 ("drm/rockchip: vop2: fix suspend/resume") uses
regmap_reinit_cache() to fix the suspend/resume issue with the VOP2
driver. During discussion it came up that we should rather use
regcache_sync() instead. As the original patch is already applied
fix this up in this follow-up patch.

Fixes: afa965a45e01 ("drm/rockchip: vop2: fix suspend/resume")
Cc: [email protected]
Signed-off-by: Sascha Hauer <[email protected]>
Signed-off-by: Heiko Stuebner <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
---
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)

--- a/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
@@ -214,8 +214,6 @@ struct vop2 {
struct vop2_win win[];
};

-static const struct regmap_config vop2_regmap_config;
-
static struct vop2_video_port *to_vop2_video_port(struct drm_crtc *crtc)
{
return container_of(crtc, struct vop2_video_port, crtc);
@@ -840,11 +838,7 @@ static void vop2_enable(struct vop2 *vop
return;
}

- ret = regmap_reinit_cache(vop2->map, &vop2_regmap_config);
- if (ret) {
- drm_err(vop2->drm, "failed to reinit cache: %d\n", ret);
- return;
- }
+ regcache_sync(vop2->map);

if (vop2->data->soc_id == 3566)
vop2_writel(vop2, RK3568_OTP_WIN_EN, 1);
@@ -874,6 +868,8 @@ static void vop2_disable(struct vop2 *vo

pm_runtime_put_sync(vop2->dev);

+ regcache_mark_dirty(vop2->map);
+
clk_disable_unprepare(vop2->aclk);
clk_disable_unprepare(vop2->hclk);
}
1 change: 1 addition & 0 deletions openwrt-23.04/release-info.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
- pbr latest version from https://github.com/stangri/source.openwrt.melmac.net

### Changelog
- [2023-04-25] Update patches and enable hdmi console
- [2023-04-16] Re-add some disabled features and packages
- [2023-04-10] Initial build
12 changes: 12 additions & 0 deletions openwrt-23.04/seed/ao-R5S-full.seed
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ CONFIG_PACKAGE_jq=y
CONFIG_PACKAGE_kmod-arptables=y
CONFIG_PACKAGE_kmod-asn1-decoder=y
CONFIG_PACKAGE_kmod-asn1-encoder=y
CONFIG_PACKAGE_kmod-backlight=y
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-crypto-aead=y
CONFIG_PACKAGE_kmod-crypto-arc4=y
Expand Down Expand Up @@ -211,9 +212,19 @@ CONFIG_PACKAGE_kmod-crypto-user=y
CONFIG_PACKAGE_kmod-cryptodev=y
CONFIG_PACKAGE_kmod-dax=y
CONFIG_PACKAGE_kmod-dm=y
CONFIG_PACKAGE_kmod-dma-buf=y
CONFIG_PACKAGE_kmod-dnsresolver=y
CONFIG_PACKAGE_kmod-drm=y
CONFIG_PACKAGE_kmod-drm-kms-helper=y
CONFIG_PACKAGE_kmod-drm-rockchip=y
CONFIG_PACKAGE_kmod-dummy=y
CONFIG_PACKAGE_kmod-ebtables=y
CONFIG_PACKAGE_kmod-fb=y
CONFIG_PACKAGE_kmod-fb-cfb-copyarea=y
CONFIG_PACKAGE_kmod-fb-cfb-fillrect=y
CONFIG_PACKAGE_kmod-fb-cfb-imgblt=y
CONFIG_PACKAGE_kmod-fb-sys-fops=y
CONFIG_PACKAGE_kmod-fb-sys-ram=y
CONFIG_PACKAGE_kmod-fs-btrfs=y
CONFIG_PACKAGE_kmod-fs-cifs=y
CONFIG_PACKAGE_kmod-fs-ext4=y
Expand Down Expand Up @@ -259,6 +270,7 @@ CONFIG_PACKAGE_kmod-lib-zstd=y
CONFIG_PACKAGE_kmod-libphy=y
CONFIG_PACKAGE_kmod-macvlan=y
CONFIG_PACKAGE_kmod-mii=y
CONFIG_PACKAGE_kmod-multimedia-input=y
CONFIG_PACKAGE_kmod-nf-conncount=y
CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y
CONFIG_PACKAGE_kmod-nf-ipt=y
Expand Down
12 changes: 12 additions & 0 deletions openwrt-23.04/seed/ao-R5S-mini.seed
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ CONFIG_PACKAGE_jq=y
CONFIG_PACKAGE_kmod-arptables=y
CONFIG_PACKAGE_kmod-asn1-decoder=y
CONFIG_PACKAGE_kmod-asn1-encoder=y
CONFIG_PACKAGE_kmod-backlight=y
CONFIG_PACKAGE_kmod-br-netfilter=y
CONFIG_PACKAGE_kmod-crypto-aead=y
CONFIG_PACKAGE_kmod-crypto-arc4=y
Expand Down Expand Up @@ -192,8 +193,18 @@ CONFIG_PACKAGE_kmod-crypto-user=y
CONFIG_PACKAGE_kmod-cryptodev=y
CONFIG_PACKAGE_kmod-dax=y
CONFIG_PACKAGE_kmod-dm=y
CONFIG_PACKAGE_kmod-dma-buf=y
CONFIG_PACKAGE_kmod-drm=y
CONFIG_PACKAGE_kmod-drm-kms-helper=y
CONFIG_PACKAGE_kmod-drm-rockchip=y
CONFIG_PACKAGE_kmod-dummy=y
CONFIG_PACKAGE_kmod-ebtables=y
CONFIG_PACKAGE_kmod-fb=y
CONFIG_PACKAGE_kmod-fb-cfb-copyarea=y
CONFIG_PACKAGE_kmod-fb-cfb-fillrect=y
CONFIG_PACKAGE_kmod-fb-cfb-imgblt=y
CONFIG_PACKAGE_kmod-fb-sys-fops=y
CONFIG_PACKAGE_kmod-fb-sys-ram=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-f2fs=y
CONFIG_PACKAGE_kmod-fs-squashfs=y
Expand Down Expand Up @@ -223,6 +234,7 @@ CONFIG_PACKAGE_kmod-lib-zlib-inflate=y
CONFIG_PACKAGE_kmod-lib-zstd=y
CONFIG_PACKAGE_kmod-libphy=y
CONFIG_PACKAGE_kmod-mii=y
CONFIG_PACKAGE_kmod-multimedia-input=y
CONFIG_PACKAGE_kmod-nf-conncount=y
CONFIG_PACKAGE_kmod-nf-conntrack-netlink=y
CONFIG_PACKAGE_kmod-nf-ipt=y
Expand Down

0 comments on commit 0f3f615

Please sign in to comment.