From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Miouyouyou Date: Sun, 24 May 2020 23:08:01 +0200 Subject: [ARCHEOLOGY] [RFC] RK3288 : Add HDMI resolutions (#1887) > X-Git-Archeology: > recovered message: > * patch: kernel: rockchip-dev: Handle more resolutions with HDMI (b) > X-Git-Archeology: > recovered message: > The added patch add more PLL configurations, in order to satisfy > X-Git-Archeology: > recovered message: > more HDMI frequencies requirements. > X-Git-Archeology: > recovered message: > This should allow users to benefit from more resolutions. > X-Git-Archeology: > recovered message: > However, this is fairly untested. I only tested it on my 1080p > X-Git-Archeology: > recovered message: > screen and, yeah, it works but so does the kernel without this > X-Git-Archeology: > recovered message: > patch. > X-Git-Archeology: > recovered message: > Signed-off-by: Miouyouyou (Myy) > X-Git-Archeology: > recovered message: > * patch: kernel: rockchip-dev: Handle more resolutions with HDMI (b) > X-Git-Archeology: > recovered message: > Now with proper patches names. > X-Git-Archeology: > recovered message: > Anyway : > X-Git-Archeology: > recovered message: > The added patch add more PLL configurations, in order to satisfy > X-Git-Archeology: > recovered message: > more HDMI frequencies requirements. > X-Git-Archeology: > recovered message: > This should allow users to benefit from more resolutions. > X-Git-Archeology: > recovered message: > However, this is fairly untested. I only tested it on my 1080p > X-Git-Archeology: > recovered message: > screen and, yeah, it works but it also does without this > X-Git-Archeology: > recovered message: > patch. > X-Git-Archeology: > recovered message: > So could anyone test this with the following configurations ? > X-Git-Archeology: > recovered message: > * [ ] A HDMI 4K screen > X-Git-Archeology: > recovered message: > * [ ] A HDMI 1366x768 screen resolution > X-Git-Archeology: > recovered message: > * [ ] A VGA screen with a VGA to HDMI adapter > X-Git-Archeology: > recovered message: > * [ ] A DVI screen with a DVI to HDMI adapter > X-Git-Archeology: > recovered message: > Signed-off-by: Miouyouyou (Myy) > X-Git-Archeology: > recovered message: > * Using the patches provided by @Kwiboo for HDMI > X-Git-Archeology: > recovered message: > This provides me way more resolutions, including interlaced modes. > X-Git-Archeology: > recovered message: > I don't see 4K modes, though the screen attached can't do it, > X-Git-Archeology: > recovered message: > so I still don't know if that can help provided 4K modes on mainline > X-Git-Archeology: > recovered message: > kernels. > X-Git-Archeology: > recovered message: > Signed-off-by: Miouyouyou (Myy) > X-Git-Archeology: > recovered message: > * Support for 4K screens > X-Git-Archeology: > recovered message: > Using fixes provided by @czak > X-Git-Archeology: > recovered message: > Tested and approved by @czak too ! > X-Git-Archeology: > recovered message: > Signed-off-by: Miouyouyou (Myy) > X-Git-Archeology: - Revision 5ffefd40ab337dacb1d0c801081253962c54bb25: https://github.com/armbian/build/commit/5ffefd40ab337dacb1d0c801081253962c54bb25 > X-Git-Archeology: Date: Sun, 24 May 2020 23:08:01 +0200 > X-Git-Archeology: From: Miouyouyou > X-Git-Archeology: Subject: [RFC] RK3288 : Add HDMI resolutions (#1887) > X-Git-Archeology: > X-Git-Archeology: - Revision 812245def37a695bce9e7ece148b2920d82c8b37: https://github.com/armbian/build/commit/812245def37a695bce9e7ece148b2920d82c8b37 > X-Git-Archeology: Date: Sat, 18 Jul 2020 23:07:01 +0200 > X-Git-Archeology: From: Werner > X-Git-Archeology: Subject: Move rockchip/64 current to 5.7.y (#2099) > X-Git-Archeology: > X-Git-Archeology: - Revision 62c27823a637698e88284bc0c0f0d31342ed9641: https://github.com/armbian/build/commit/62c27823a637698e88284bc0c0f0d31342ed9641 > X-Git-Archeology: Date: Wed, 25 Nov 2020 19:50:47 +0100 > X-Git-Archeology: From: Igor Pecovnik > X-Git-Archeology: Subject: Move Rockchip 32b to 5.9.y (#2339) > X-Git-Archeology: > X-Git-Archeology: - Revision 2b627cb36b67d8d3c9ddc6f1b49ddf8516a2b26d: https://github.com/armbian/build/commit/2b627cb36b67d8d3c9ddc6f1b49ddf8516a2b26d > X-Git-Archeology: Date: Fri, 18 Dec 2020 18:50:47 +0100 > X-Git-Archeology: From: q4a > X-Git-Archeology: Subject: rockchip-current: return hdmi patches and rework it for 5.9.y kernel (#2471) > X-Git-Archeology: > X-Git-Archeology: - Revision 0cdffb29b07305209efb12cf3b5ac6032d3a1153: https://github.com/armbian/build/commit/0cdffb29b07305209efb12cf3b5ac6032d3a1153 > X-Git-Archeology: Date: Wed, 24 Mar 2021 19:01:53 +0100 > X-Git-Archeology: From: Igor Pecovnik > X-Git-Archeology: Subject: Renaming DEV branch to EDGE (#2704) > X-Git-Archeology: > X-Git-Archeology: - Revision 6b490e16944b30ff69bf9c13678905187df0d9d4: https://github.com/armbian/build/commit/6b490e16944b30ff69bf9c13678905187df0d9d4 > X-Git-Archeology: Date: Tue, 11 Jan 2022 15:26:11 +0100 > X-Git-Archeology: From: Oleg > X-Git-Archeology: Subject: move kernel edge to 5.16 (#3387) > X-Git-Archeology: > X-Git-Archeology: - Revision 188d6d0a8ac547e25ffff28ae72b0d37e46b80cb: https://github.com/armbian/build/commit/188d6d0a8ac547e25ffff28ae72b0d37e46b80cb > X-Git-Archeology: Date: Tue, 01 Feb 2022 22:53:43 +0100 > X-Git-Archeology: From: catalinii > X-Git-Archeology: Subject: Support edge kernel for Rock 3A and rk35xx (#3371) > X-Git-Archeology: > X-Git-Archeology: - Revision 88464cc41251c76de4fc87e8da67d19ac7ce364c: https://github.com/armbian/build/commit/88464cc41251c76de4fc87e8da67d19ac7ce364c > X-Git-Archeology: Date: Sat, 19 Mar 2022 07:10:37 -0400 > X-Git-Archeology: From: Jianfeng Liu > X-Git-Archeology: Subject: Radxa rock3a gpu support (#3547) > X-Git-Archeology: > X-Git-Archeology: - Revision f52a4193d02ef88333ba117c68d49486dfd7ff41: https://github.com/armbian/build/commit/f52a4193d02ef88333ba117c68d49486dfd7ff41 > X-Git-Archeology: Date: Sun, 20 Mar 2022 22:58:21 +0100 > X-Git-Archeology: From: Oleg > X-Git-Archeology: Subject: Adding Pine64 Quartz64a as WIP target (#3539) > X-Git-Archeology: > X-Git-Archeology: - Revision 03115888c3bfda3c001e678d37b3c986030c08c6: https://github.com/armbian/build/commit/03115888c3bfda3c001e678d37b3c986030c08c6 > X-Git-Archeology: Date: Thu, 24 Mar 2022 12:44:58 -0700 > X-Git-Archeology: From: Jianfeng Liu > X-Git-Archeology: Subject: fix radxa rock3a usb regulator and clean useless info in patches (#3559) > X-Git-Archeology: > X-Git-Archeology: - Revision 03ef96715ed7fd348268506c5098800f7f64f228: https://github.com/armbian/build/commit/03ef96715ed7fd348268506c5098800f7f64f228 > X-Git-Archeology: Date: Fri, 25 Mar 2022 20:51:03 +0100 > X-Git-Archeology: From: Oleg > X-Git-Archeology: Subject: fix emmc nano-pc-t4 (#3557) > X-Git-Archeology: > X-Git-Archeology: - Revision dad2d913f158af9602b233ce99389de0273254e4: https://github.com/armbian/build/commit/dad2d913f158af9602b233ce99389de0273254e4 > X-Git-Archeology: Date: Fri, 01 Apr 2022 21:11:55 -0700 > X-Git-Archeology: From: Jianfeng Liu > X-Git-Archeology: Subject: change rk35xx edge to 5.17.y (#3614) > X-Git-Archeology: > X-Git-Archeology: - Revision eb54a13b05996777789f5e9b8f8058eca65fb6c9: https://github.com/armbian/build/commit/eb54a13b05996777789f5e9b8f8058eca65fb6c9 > X-Git-Archeology: Date: Tue, 05 Apr 2022 16:18:38 +0200 > X-Git-Archeology: From: Oleg > X-Git-Archeology: Subject: update kernel 5.17.1 station-p2-edge (#3637) > X-Git-Archeology: > X-Git-Archeology: - Revision 57428044ec6ee099f6d67eebbcb9ce94c439b017: https://github.com/armbian/build/commit/57428044ec6ee099f6d67eebbcb9ce94c439b017 > X-Git-Archeology: Date: Mon, 02 May 2022 11:36:59 +0200 > X-Git-Archeology: From: Oleg > X-Git-Archeology: Subject: move kernel media-current to 5.17 and media-edge to 5.18 (#3726) > X-Git-Archeology: > X-Git-Archeology: - Revision fc66f374e843f3b57b6896ac1db98dbc1cba7ccb: https://github.com/armbian/build/commit/fc66f374e843f3b57b6896ac1db98dbc1cba7ccb > X-Git-Archeology: Date: Sat, 07 May 2022 15:51:11 +0200 > X-Git-Archeology: From: catalinii > X-Git-Archeology: Subject: Merge rk35xx-edge into rockchip64-edge (#3765) > X-Git-Archeology: > X-Git-Archeology: - Revision 597d2dac11f00d9070a4e49d6bad1b2244e36cb3: https://github.com/armbian/build/commit/597d2dac11f00d9070a4e49d6bad1b2244e36cb3 > X-Git-Archeology: Date: Sat, 28 May 2022 07:56:22 +0200 > X-Git-Archeology: From: Jianfeng Liu > X-Git-Archeology: Subject: update rockchip64-edge to 5.18 (#3814) > X-Git-Archeology: > X-Git-Archeology: - Revision 2e1b4eed739d6ea81c3a7ba7e94d1bcab5cbbb6c: https://github.com/armbian/build/commit/2e1b4eed739d6ea81c3a7ba7e94d1bcab5cbbb6c > X-Git-Archeology: Date: Mon, 04 Jul 2022 16:18:31 +0300 > X-Git-Archeology: From: balbes150 > X-Git-Archeology: Subject: move kernel media to current 5.18 and edge 5.19 > X-Git-Archeology: > X-Git-Archeology: - Revision 8c6641e7b79f0d50acdc306d140e586a4e923cf0: https://github.com/armbian/build/commit/8c6641e7b79f0d50acdc306d140e586a4e923cf0 > X-Git-Archeology: Date: Wed, 03 Aug 2022 22:22:55 +0200 > X-Git-Archeology: From: Jianfeng Liu > X-Git-Archeology: Subject: update rockchip64 edge to 5.19 (#4039) > X-Git-Archeology: > X-Git-Archeology: - Revision 6765f734cc4a22aeaa9f99a3ad28c8c322de26f6: https://github.com/armbian/build/commit/6765f734cc4a22aeaa9f99a3ad28c8c322de26f6 > X-Git-Archeology: Date: Tue, 25 Oct 2022 11:26:51 +0200 > X-Git-Archeology: From: Igor Pecovnik > X-Git-Archeology: Subject: Bump rockchip64 edge to 6.0.y (#4337) > X-Git-Archeology: > X-Git-Archeology: - Revision 92f1a22d76b987afa7ba555d5b509adc51d689e7: https://github.com/armbian/build/commit/92f1a22d76b987afa7ba555d5b509adc51d689e7 > X-Git-Archeology: Date: Fri, 16 Dec 2022 13:38:13 +0100 > X-Git-Archeology: From: Igor Pecovnik > X-Git-Archeology: Subject: Re-add rockchip64 6.0 patches (#4575) > X-Git-Archeology: > X-Git-Archeology: - Revision 34ae84fac5d0b66a1ab2d1e51534b7beb13ef245: https://github.com/armbian/build/commit/34ae84fac5d0b66a1ab2d1e51534b7beb13ef245 > X-Git-Archeology: Date: Fri, 05 May 2023 14:22:00 +0200 > X-Git-Archeology: From: amazingfate > X-Git-Archeology: Subject: bump rockchip64 edge to v6.3 > X-Git-Archeology: --- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 149 +++++----- 1 file changed, 73 insertions(+), 76 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index ae857bf8bd62..fb454d6d2165 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -91,80 +91,88 @@ static struct rockchip_hdmi *to_rockchip_hdmi(struct drm_encoder *encoder) static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = { { - 27000000, { - { 0x00b3, 0x0000}, - { 0x2153, 0x0000}, - { 0x40f3, 0x0000} + 30666000, { + { 0x00b3, 0x0000 }, + { 0x2153, 0x0000 }, + { 0x40f3, 0x0000 }, }, - }, { - 36000000, { - { 0x00b3, 0x0000}, - { 0x2153, 0x0000}, - { 0x40f3, 0x0000} + }, { + 36800000, { + { 0x00b3, 0x0000 }, + { 0x2153, 0x0000 }, + { 0x40a2, 0x0001 }, }, - }, { - 40000000, { - { 0x00b3, 0x0000}, - { 0x2153, 0x0000}, - { 0x40f3, 0x0000} + }, { + 46000000, { + { 0x00b3, 0x0000 }, + { 0x2142, 0x0001 }, + { 0x40a2, 0x0001 }, }, - }, { - 54000000, { - { 0x0072, 0x0001}, - { 0x2142, 0x0001}, - { 0x40a2, 0x0001}, + }, { + 61333000, { + { 0x0072, 0x0001 }, + { 0x2142, 0x0001 }, + { 0x40a2, 0x0001 }, }, - }, { - 65000000, { - { 0x0072, 0x0001}, - { 0x2142, 0x0001}, - { 0x40a2, 0x0001}, + }, { + 73600000, { + { 0x0072, 0x0001 }, + { 0x2142, 0x0001 }, + { 0x4061, 0x0002 }, }, - }, { - 66000000, { - { 0x013e, 0x0003}, - { 0x217e, 0x0002}, - { 0x4061, 0x0002} + }, { + 92000000, { + { 0x0072, 0x0001 }, + { 0x2145, 0x0002 }, + { 0x4061, 0x0002 }, }, - }, { - 74250000, { - { 0x0072, 0x0001}, - { 0x2145, 0x0002}, - { 0x4061, 0x0002} + }, { + 122666000, { + { 0x0051, 0x0002 }, + { 0x2145, 0x0002 }, + { 0x4061, 0x0002 }, }, - }, { - 83500000, { - { 0x0072, 0x0001}, + }, { + 147200000, { + { 0x0051, 0x0002 }, + { 0x2145, 0x0002 }, + { 0x4064, 0x0003 }, }, - }, { - 108000000, { - { 0x0051, 0x0002}, - { 0x2145, 0x0002}, - { 0x4061, 0x0002} + }, { + 184000000, { + { 0x0051, 0x0002 }, + { 0x214c, 0x0003 }, + { 0x4064, 0x0003 }, }, - }, { - 106500000, { - { 0x0051, 0x0002}, - { 0x2145, 0x0002}, - { 0x4061, 0x0002} + }, { + 226666000, { + { 0x0040, 0x0003 }, + { 0x214c, 0x0003 }, + { 0x4064, 0x0003 }, }, - }, { - 146250000, { - { 0x0051, 0x0002}, - { 0x2145, 0x0002}, - { 0x4061, 0x0002} + }, { + 272000000, { + { 0x0040, 0x0003 }, + { 0x214c, 0x0003 }, + { 0x5a64, 0x0003 }, }, - }, { - 148500000, { - { 0x0051, 0x0003}, - { 0x214c, 0x0003}, - { 0x4064, 0x0003} + }, { + 340000000, { + { 0x0040, 0x0003 }, + { 0x3b4c, 0x0003 }, + { 0x5a64, 0x0003 }, }, - }, { + }, { + 600000000, { + { 0x1a40, 0x0003 }, + { 0x3b4c, 0x0003 }, + { 0x5a64, 0x0003 }, + }, + }, { ~0UL, { - { 0x00a0, 0x000a }, - { 0x2001, 0x000f }, - { 0x4002, 0x000f }, + { 0x0000, 0x0000 }, + { 0x0000, 0x0000 }, + { 0x0000, 0x0000 }, }, } }; @@ -172,20 +180,8 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg[] = { static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = { /* pixelclk bpp8 bpp10 bpp12 */ { - 40000000, { 0x0018, 0x0018, 0x0018 }, - }, { - 65000000, { 0x0028, 0x0028, 0x0028 }, - }, { - 66000000, { 0x0038, 0x0038, 0x0038 }, - }, { - 74250000, { 0x0028, 0x0038, 0x0038 }, - }, { - 83500000, { 0x0028, 0x0038, 0x0038 }, - }, { - 146250000, { 0x0038, 0x0038, 0x0038 }, - }, { - 148500000, { 0x0000, 0x0038, 0x0038 }, - }, { + 600000000, { 0x0000, 0x0000, 0x0000 }, + }, { ~0UL, { 0x0000, 0x0000, 0x0000}, } }; @@ -195,6 +191,7 @@ static const struct dw_hdmi_phy_config rockchip_phy_config[] = { { 74250000, 0x8009, 0x0004, 0x0272}, { 148500000, 0x802b, 0x0004, 0x028d}, { 297000000, 0x8039, 0x0005, 0x028d}, + { 594000000, 0x8039, 0x0000, 0x019d}, { ~0UL, 0x0000, 0x0000, 0x0000} }; @@ -251,7 +248,7 @@ dw_hdmi_rockchip_mode_valid(struct dw_hdmi *hdmi, void *data, int i; for (i = 0; mpll_cfg[i].mpixelclock != (~0UL); i++) { - if (pclk == mpll_cfg[i].mpixelclock) { + if (pclk <= mpll_cfg[i].mpixelclock) { valid = true; break; } -- Armbian