mirror of
https://github.com/Fishwaldo/build.git
synced 2025-05-30 19:01:48 +00:00
Move Rockchip DEV to 5.10.y
This commit is contained in:
parent
d6027862a0
commit
582f1228a0
7 changed files with 422 additions and 198 deletions
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,7 @@ case $BRANCH in
|
|||
|
||||
dev)
|
||||
|
||||
KERNELBRANCH='branch:linux-5.8.y'
|
||||
KERNELBRANCH='branch:linux-5.10.y'
|
||||
|
||||
;;
|
||||
|
||||
|
|
|
@ -0,0 +1,42 @@
|
|||
From 73258d32daf3a661281bb5c77c5e2e06c7ff714e Mon Sep 17 00:00:00 2001
|
||||
From: "Miouyouyou (Myy)" <myy@miouyouyou.fr>
|
||||
Date: Fri, 3 Jul 2020 02:02:18 +0200
|
||||
Subject: [PATCH] arm: dtsi: rk3288: add GPU 500 Mhz OPP again
|
||||
|
||||
Undoing the very bizarre mainline kernel patch,
|
||||
75481833c6dbab4c29d15452f6b4337c16f5407b
|
||||
which main purpose is to sync some 3.14 kernels hacks to
|
||||
mainline kernels, for reasons that only matter for a few Chromebooks,
|
||||
and shove it down the throat of every RK3288 user.
|
||||
|
||||
If you need to avoid the GPU going to 500 Mhz on Chromebooks,
|
||||
remove the OPP entry inside the DTS that actually matters to RK3288
|
||||
Chromebooks.
|
||||
|
||||
Meanwhile, the 600 Mhz operating point can prove to be unstable on
|
||||
some RK3288 boards, while 500 Mhz works fine.
|
||||
https://forum.armbian.com/topic/13515-panfrost-on-rk3288-and-gpu-on-600mhz-problems/
|
||||
|
||||
Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
|
||||
---
|
||||
arch/arm/boot/dts/rk3288.dtsi | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
|
||||
index a66412547..ef7457f79 100644
|
||||
--- a/arch/arm/boot/dts/rk3288.dtsi
|
||||
+++ b/arch/arm/boot/dts/rk3288.dtsi
|
||||
@@ -1312,6 +1312,10 @@ opp-400000000 {
|
||||
opp-hz = /bits/ 64 <400000000>;
|
||||
opp-microvolt = <1100000>;
|
||||
};
|
||||
+ opp-500000000 {
|
||||
+ opp-hz = /bits/ 64 <500000000>;
|
||||
+ opp-microvolt = <1200000>;
|
||||
+ };
|
||||
opp-600000000 {
|
||||
opp-hz = /bits/ 64 <600000000>;
|
||||
opp-microvolt = <1250000>;
|
||||
--
|
||||
2.27.0
|
||||
|
|
@ -37,7 +37,7 @@ index 7f56d8c34..7d7ee5b26 100644
|
|||
- 148500000, { 0x0000, 0x0038, 0x0038 },
|
||||
- }, {
|
||||
+ 600000000, { 0x0000, 0x0000, 0x0000 },
|
||||
+ }, {
|
||||
+ }, {
|
||||
~0UL, { 0x0000, 0x0000, 0x0000},
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,48 +1,50 @@
|
|||
From 13fe05c1a6a0b7b81d7c6768eef9fbc618b75f30 Mon Sep 17 00:00:00 2001
|
||||
From f83d188f49bd11d085c3f4160b208cb8194daff4 Mon Sep 17 00:00:00 2001
|
||||
From: Jonas Karlman <jonas@kwiboo.se>
|
||||
Date: Sun, 3 May 2020 17:09:41 +0000
|
||||
Subject: [PATCH 10/14] drm/rockchip: dw-hdmi: limit tmds to 340mhz
|
||||
Date: Wed, 8 Jan 2020 21:07:52 +0000
|
||||
Subject: [PATCH] drm/rockchip: dw-hdmi: limit tmds to 340mhz
|
||||
|
||||
RK3228/RK3328 does not provide a stable hdmi signal at TMDS rates
|
||||
above 371.25MHz (340MHz pixel clock).
|
||||
|
||||
Limit the pixel clock rate to 340MHz to provide a stable signal.
|
||||
Also limit the pixel clock to the display reported max tmds clock.
|
||||
|
||||
This also enables use of pixel clocks up to 340MHz on RK3288/RK3399.
|
||||
And limit resolution to 3840x2160
|
||||
|
||||
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
|
||||
---
|
||||
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 23 ++++++++++-----------
|
||||
1 file changed, 11 insertions(+), 12 deletions(-)
|
||||
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 16 ++++------------
|
||||
1 file changed, 4 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index 1a047f9d0..955fc3cf4 100644
|
||||
index b5d2cdaa24fa..5f7ab8e6bb72 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
@@ -219,19 +219,18 @@ static enum drm_mode_status
|
||||
dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
|
||||
@@ -221,19 +221,11 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data,
|
||||
const struct drm_display_info *info,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
- const struct dw_hdmi_mpll_config *mpll_cfg = rockchip_mpll_cfg;
|
||||
- int pclk = mode->clock * 1000;
|
||||
- bool valid = false;
|
||||
- int i;
|
||||
-
|
||||
+ if (mode->clock > 340000 ||
|
||||
+ (info->max_tmds_clock && mode->clock > info->max_tmds_clock))
|
||||
+ return MODE_CLOCK_HIGH;
|
||||
|
||||
- for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) {
|
||||
- if (pclk == mpll_cfg[i].mpixelclock) {
|
||||
- valid = true;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
+ struct drm_display_info *info = &connector->display_info;
|
||||
+ int max_tmds_clock = max(info->max_tmds_clock, 165000);
|
||||
+ int clock = mode->clock;
|
||||
+
|
||||
+ if (connector->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&
|
||||
+ (info->color_formats & DRM_COLOR_FORMAT_YCRCB420))
|
||||
+ clock /= 2;
|
||||
+
|
||||
+ if (clock > max_tmds_clock || clock > 340000)
|
||||
+ return MODE_CLOCK_HIGH;
|
||||
|
||||
-
|
||||
- return (valid) ? MODE_OK : MODE_BAD;
|
||||
+ return MODE_OK;
|
||||
+ return drm_mode_validate_size(mode, 3840, 2160);
|
||||
}
|
||||
|
||||
static const struct drm_encoder_funcs dw_hdmi_rockchip_encoder_funcs = {
|
||||
static void dw_hdmi_rockchip_encoder_disable(struct drm_encoder *encoder)
|
||||
--
|
||||
2.26.2
|
||||
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
From 5b99ce41a35e7ddd0d4681990613ec9195a5acc0 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?=C5=81ukasz?= <lukasz@czak.pl>
|
||||
Date: Thu, 7 May 2020 11:54:26 +0200
|
||||
Subject: [PATCH 2/3] Use 340000 as fallback max_tmds_clock
|
||||
|
||||
If connector->display_info->max_tmds_clock is 0, fall back to 340000.
|
||||
|
||||
If it is > 0 though, shouldn't it take priority, and instead of max be
|
||||
`min(info->max_tmds_clock, 165000)`?
|
||||
---
|
||||
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
index 955fc3cf4..f95cdc53a 100644
|
||||
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
||||
@@ -220,14 +220,17 @@ dw_hdmi_rockchip_mode_valid(struct drm_connector *connector,
|
||||
const struct drm_display_mode *mode)
|
||||
{
|
||||
struct drm_display_info *info = &connector->display_info;
|
||||
- int max_tmds_clock = max(info->max_tmds_clock, 165000);
|
||||
+ int max_tmds_clock = info->max_tmds_clock > 0 ?
|
||||
+ max(info->max_tmds_clock, 165000) :
|
||||
+ 340000;
|
||||
+
|
||||
int clock = mode->clock;
|
||||
|
||||
if (connector->ycbcr_420_allowed && drm_mode_is_420(info, mode) &&
|
||||
(info->color_formats & DRM_COLOR_FORMAT_YCRCB420))
|
||||
clock /= 2;
|
||||
|
||||
- if (clock > max_tmds_clock || clock > 340000)
|
||||
+ if (clock > max_tmds_clock)
|
||||
return MODE_CLOCK_HIGH;
|
||||
|
||||
return MODE_OK;
|
||||
--
|
||||
2.26.2
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
diff --git a/arch/arm/boot/.gitignore b/arch/arm/boot/.gitignore
|
||||
index 3c79f859..4e5c1d59 100644
|
||||
--- a/arch/arm/boot/.gitignore
|
||||
+++ b/arch/arm/boot/.gitignore
|
||||
@@ -3,3 +3,5 @@ zImage
|
||||
xipImage
|
||||
bootpImage
|
||||
uImage
|
||||
+*.dtb*
|
||||
+*.scr
|
||||
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
|
||||
index 50d580d77..94bd15617 100644
|
||||
--- a/scripts/Makefile.dtbinst
|
||||
+++ b/scripts/Makefile.dtbinst
|
||||
@@ -18,9 +18,12 @@ include scripts/Kbuild.include
|
||||
include $(src)/Makefile
|
||||
|
||||
dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
|
||||
+dtbos := $(addprefix $(dst)/, $(dtbo-y))
|
||||
+scrs := $(addprefix $(dst)/, $(scr-y))
|
||||
+readmes := $(addprefix $(dst)/, $(dtbotxt-y))
|
||||
subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
|
||||
|
||||
-__dtbs_install: $(dtbs) $(subdirs)
|
||||
+__dtbs_install: $(dtbs) $(dtbos) $(scrs) $(readmes) $(subdirs)
|
||||
@:
|
||||
|
||||
quiet_cmd_dtb_install = INSTALL $@
|
||||
@@ -29,6 +32,15 @@ quiet_cmd_dtb_install = INSTALL $@
|
||||
$(dst)/%.dtb: $(obj)/%.dtb
|
||||
$(call cmd,dtb_install)
|
||||
|
||||
+$(dst)/%.dtbo: $(obj)/%.dtbo
|
||||
+ $(call cmd,dtb_install)
|
||||
+
|
||||
+$(dst)/%.scr: $(obj)/%.scr
|
||||
+ $(call cmd,dtb_install)
|
||||
+
|
||||
+$(dst)/README.rockchip-overlays: $(src)/README.rockchip-overlays
|
||||
+ $(call cmd,dtb_install)
|
||||
+
|
||||
PHONY += $(subdirs)
|
||||
$(subdirs):
|
||||
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
|
||||
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
|
||||
index 58c05e5d..2b95dda9 100644
|
||||
--- a/scripts/Makefile.lib
|
||||
+++ b/scripts/Makefile.lib
|
||||
@@ -278,6 +278,9 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \
|
||||
# ---------------------------------------------------------------------------
|
||||
DTC ?= $(objtree)/scripts/dtc/dtc
|
||||
|
||||
+# Overlay support
|
||||
+DTC_FLAGS += -@ -Wno-unit_address_format -Wno-simple_bus_reg
|
||||
+
|
||||
# Disable noisy checks by default
|
||||
ifeq ($(KBUILD_ENABLE_EXTRA_GCC_CHECKS),)
|
||||
DTC_FLAGS += -Wno-unit_address_vs_reg \
|
||||
@@ -324,6 +327,23 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
$(obj)/%.dtb: $(src)/%.dts FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
+quiet_cmd_dtco = DTCO $@
|
||||
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
|
||||
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
|
||||
+ $(DTC) -O dtb -o $@ -b 0 \
|
||||
+ -i $(dir $<) $(DTC_FLAGS) \
|
||||
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
|
||||
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
|
||||
+
|
||||
+$(obj)/%.dtbo: $(src)/%.dts FORCE
|
||||
+ $(call if_changed_dep,dtco)
|
||||
+
|
||||
+quiet_cmd_scr = MKIMAGE $@
|
||||
+cmd_scr = mkimage -C none -A $(ARCH) -T script -d $< $@
|
||||
+
|
||||
+$(obj)/%.scr: $(src)/%.scr-cmd FORCE
|
||||
+ $(call if_changed,scr)
|
||||
+
|
||||
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
|
||||
|
||||
# Bzip2
|
||||
|
Loading…
Add table
Reference in a new issue