* patch: kernel: rockchip-dev: Handle more resolutions with HDMI (β) The added patch add more PLL configurations, in order to satisfy more HDMI frequencies requirements. This should allow users to benefit from more resolutions. However, this is fairly untested. I only tested it on my 1080p screen and, yeah, it works but so does the kernel without this patch. Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr> * patch: kernel: rockchip-dev: Handle more resolutions with HDMI (β) Now with proper patches names. Anyway : The added patch add more PLL configurations, in order to satisfy more HDMI frequencies requirements. This should allow users to benefit from more resolutions. However, this is fairly untested. I only tested it on my 1080p screen and, yeah, it works but it also does without this patch. So could anyone test this with the following configurations ? * [ ] A HDMI 4K screen * [ ] A HDMI 1366x768 screen resolution * [ ] A VGA screen with a VGA to HDMI adapter * [ ] A DVI screen with a DVI to HDMI adapter Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr> * Using the patches provided by @Kwiboo for HDMI This provides me way more resolutions, including interlaced modes. I don't see 4K modes, though the screen attached can't do it, so I still don't know if that can help provided 4K modes on mainline kernels. Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr> * Support for 4K screens Using fixes provided by @czak Tested and approved by @czak too ! Signed-off-by: Miouyouyou (Myy) <myy@miouyouyou.fr>
191 lines
4.3 KiB
Diff
191 lines
4.3 KiB
Diff
From 0a07a7ed53b37c7a53df3e14ab29d366522d2439 Mon Sep 17 00:00:00 2001
|
|
From: Douglas Anderson <dianders@chromium.org>
|
|
Date: Mon, 11 Jul 2016 19:05:42 +0800
|
|
Subject: [PATCH 08/14] drm/rockchip: dw_hdmi: Use auto-generated tables
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
The previous tables for mpll_cfg and curr_ctrl were created using the
|
|
20-pages of example settings provided by the PHY vendor. Those
|
|
example settings weren't particularly dense, so there were places
|
|
where we were guessing what the settings would be for 10-bit and
|
|
12-bit (not that we use those anyway). It was also always a lot of
|
|
extra work every time we wanted to add a new clock rate since we had
|
|
to cross-reference several tables.
|
|
|
|
In <http://crosreview.com/285855> I've gone through the work to figure
|
|
out how to generate this table automatically. Let's now use the
|
|
automatically generated table and then we'll never need to look at it
|
|
again.
|
|
|
|
We only support 8-bit mode right now and only support a small number
|
|
of clock rates and and I've verified that the only 8-bit rate that was
|
|
affected was 148.5. That mode appears to have been wrong in the old
|
|
table.
|
|
|
|
Signed-off-by: Douglas Anderson <dianders@chromium.org>
|
|
Signed-off-by: Yakir Yang <ykk@rock-chips.com>
|
|
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
|
|
---
|
|
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 130 +++++++++++---------
|
|
1 file changed, 69 insertions(+), 61 deletions(-)
|
|
|
|
diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
index 3cd86070f..c0f67309b 100644
|
|
--- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
+++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
|
|
@@ -78,80 +78,88 @@ struct rockchip_hdmi {
|
|
|
|
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 },
|
|
+ },
|
|
+ }, {
|
|
+ 122666000, {
|
|
+ { 0x0051, 0x0002 },
|
|
+ { 0x2145, 0x0002 },
|
|
+ { 0x4061, 0x0002 },
|
|
},
|
|
- }, {
|
|
- 74250000, {
|
|
- { 0x0072, 0x0001},
|
|
- { 0x2145, 0x0002},
|
|
- { 0x4061, 0x0002}
|
|
+ }, {
|
|
+ 147200000, {
|
|
+ { 0x0051, 0x0002 },
|
|
+ { 0x2145, 0x0002 },
|
|
+ { 0x4064, 0x0003 },
|
|
},
|
|
- }, {
|
|
- 83500000, {
|
|
- { 0x0072, 0x0001},
|
|
+ }, {
|
|
+ 184000000, {
|
|
+ { 0x0051, 0x0002 },
|
|
+ { 0x214c, 0x0003 },
|
|
+ { 0x4064, 0x0003 },
|
|
},
|
|
- }, {
|
|
- 108000000, {
|
|
- { 0x0051, 0x0002},
|
|
- { 0x2145, 0x0002},
|
|
- { 0x4061, 0x0002}
|
|
+ }, {
|
|
+ 226666000, {
|
|
+ { 0x0040, 0x0003 },
|
|
+ { 0x214c, 0x0003 },
|
|
+ { 0x4064, 0x0003 },
|
|
},
|
|
- }, {
|
|
- 106500000, {
|
|
- { 0x0051, 0x0002},
|
|
- { 0x2145, 0x0002},
|
|
- { 0x4061, 0x0002}
|
|
+ }, {
|
|
+ 272000000, {
|
|
+ { 0x0040, 0x0003 },
|
|
+ { 0x214c, 0x0003 },
|
|
+ { 0x5a64, 0x0003 },
|
|
},
|
|
- }, {
|
|
- 146250000, {
|
|
- { 0x0051, 0x0002},
|
|
- { 0x2145, 0x0002},
|
|
- { 0x4061, 0x0002}
|
|
+ }, {
|
|
+ 340000000, {
|
|
+ { 0x0040, 0x0003 },
|
|
+ { 0x3b4c, 0x0003 },
|
|
+ { 0x5a64, 0x0003 },
|
|
},
|
|
- }, {
|
|
- 148500000, {
|
|
- { 0x0051, 0x0003},
|
|
- { 0x214c, 0x0003},
|
|
- { 0x4064, 0x0003}
|
|
+ }, {
|
|
+ 600000000, {
|
|
+ { 0x1a40, 0x0003 },
|
|
+ { 0x3b4c, 0x0003 },
|
|
+ { 0x5a64, 0x0003 },
|
|
},
|
|
- }, {
|
|
+ }, {
|
|
~0UL, {
|
|
- { 0x00a0, 0x000a },
|
|
- { 0x2001, 0x000f },
|
|
- { 0x4002, 0x000f },
|
|
+ { 0x0000, 0x0000 },
|
|
+ { 0x0000, 0x0000 },
|
|
+ { 0x0000, 0x0000 },
|
|
},
|
|
}
|
|
};
|
|
--
|
|
2.26.2
|
|
|