Skip to content

Commit

Permalink
rk356x-vop2-support(:1)
Browse files Browse the repository at this point in the history
Original-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) <myy@miouyouyou.fr>
> 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) <myy@miouyouyou.fr>
> 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) <myy@miouyouyou.fr>
> 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) <myy@miouyouyou.fr>
> X-Git-Archeology: - Revision 5ffefd40ab337dacb1d0c801081253962c54bb25: armbian/build@5ffefd4
> X-Git-Archeology:   Date: Sun, 24 May 2020 23:08:01 +0200
> X-Git-Archeology:   From: Miouyouyou <myy@miouyouyou.fr>
> X-Git-Archeology:   Subject: [RFC] RK3288 : Add HDMI resolutions (#1887)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 812245def37a695bce9e7ece148b2920d82c8b37: armbian/build@812245d
> X-Git-Archeology:   Date: Sat, 18 Jul 2020 23:07:01 +0200
> X-Git-Archeology:   From: Werner <EvilOlaf@users.noreply.github.com>
> X-Git-Archeology:   Subject: Move rockchip/64 current to 5.7.y (#2099)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 62c27823a637698e88284bc0c0f0d31342ed9641: armbian/build@62c2782
> X-Git-Archeology:   Date: Wed, 25 Nov 2020 19:50:47 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Move Rockchip 32b to 5.9.y (#2339)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 2b627cb36b67d8d3c9ddc6f1b49ddf8516a2b26d: armbian/build@2b627cb
> X-Git-Archeology:   Date: Fri, 18 Dec 2020 18:50:47 +0100
> X-Git-Archeology:   From: q4a <q4arus@ya.ru>
> 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: armbian/build@0cdffb2
> X-Git-Archeology:   Date: Wed, 24 Mar 2021 19:01:53 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Renaming DEV branch to EDGE (#2704)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision f52a4193d02ef88333ba117c68d49486dfd7ff41: armbian/build@f52a419
> X-Git-Archeology:   Date: Sun, 20 Mar 2022 22:58:21 +0100
> X-Git-Archeology:   From: Oleg <balbes-150@yandex.ru>
> X-Git-Archeology:   Subject: Adding Pine64 Quartz64a as WIP target (#3539)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 03ef96715ed7fd348268506c5098800f7f64f228: armbian/build@03ef967
> X-Git-Archeology:   Date: Fri, 25 Mar 2022 20:51:03 +0100
> X-Git-Archeology:   From: Oleg <balbes-150@yandex.ru>
> X-Git-Archeology:   Subject: fix emmc nano-pc-t4 (#3557)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision eb54a13b05996777789f5e9b8f8058eca65fb6c9: armbian/build@eb54a13
> X-Git-Archeology:   Date: Tue, 05 Apr 2022 16:18:38 +0200
> X-Git-Archeology:   From: Oleg <balbes-150@yandex.ru>
> X-Git-Archeology:   Subject: update kernel 5.17.1 station-p2-edge (#3637)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 57428044ec6ee099f6d67eebbcb9ce94c439b017: armbian/build@5742804
> X-Git-Archeology:   Date: Mon, 02 May 2022 11:36:59 +0200
> X-Git-Archeology:   From: Oleg <balbes-150@yandex.ru>
> 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 2e1b4eed739d6ea81c3a7ba7e94d1bcab5cbbb6c: armbian/build@2e1b4ee
> X-Git-Archeology:   Date: Mon, 04 Jul 2022 16:18:31 +0300
> X-Git-Archeology:   From: balbes150 <balbes-150@yandex.ru>
> X-Git-Archeology:   Subject: move kernel media to current 5.18 and edge 5.19
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 8c6641e7b79f0d50acdc306d140e586a4e923cf0: armbian/build@8c6641e
> X-Git-Archeology:   Date: Wed, 03 Aug 2022 22:22:55 +0200
> X-Git-Archeology:   From: Jianfeng Liu <liujianfeng1994@gmail.com>
> X-Git-Archeology:   Subject: update rockchip64 edge to 5.19 (#4039)
> X-Git-Archeology: 
> X-Git-Archeology: - Revision 92f1a22d76b987afa7ba555d5b509adc51d689e7: armbian/build@92f1a22
> X-Git-Archeology:   Date: Fri, 16 Dec 2022 13:38:13 +0100
> X-Git-Archeology:   From: Igor Pecovnik <igorpecovnik@users.noreply.github.com>
> X-Git-Archeology:   Subject: Re-add rockchip64 6.0 patches (#4575)
> X-Git-Archeology: 
X-Armbian: Patch-File: rk356x-vop2-support
X-Armbian: Patch-File-Counter: 1
X-Armbian: Patch-Rel-Directory: patch/kernel/archive/rockchip64-6.1
X-Armbian: Patch-Type: kernel
X-Armbian: Patch-Root-Type: core
X-Armbian: Patch-Sub-Type: common
X-Armbian: Original-Subject: [ARCHEOLOGY] [RFC] RK3288 : Add HDMI resolutions (#1887)
  • Loading branch information
Miouyouyou authored and Armbian AutoPatcher committed May 24, 2020
1 parent f15c728 commit 5310b21
Showing 1 changed file with 73 additions and 76 deletions.
149 changes: 73 additions & 76 deletions drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,101 +91,97 @@ 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 },
},
}
};

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},
}
};
Expand All @@ -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}
};

Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 5310b21

Please sign in to comment.