DeadMeat
(Alex R.)
September 2, 2021, 5:20am
7
Ok, I’ve found the patch that is required for threshold calculation (4k patch).
Patched 5.10 has been successfully compiled, but not yet tested.
Commits are in my 5.10-main branch. I’ll update the post after testing.
Tested, not works. Probably it was not the main patch to fix 4k.
Further digging into the source.
frank-w
(Frank W.)
September 2, 2021, 8:01am
8
maybe this?
6385ed8eaa02 2021-05-26 drm/mediatek: dpi: Add dual edge sample mode support
is 5.13 (5.12,5.11) working with the patch…just to get a smaller diff…there is many in drm done between 5.10 and 5.14
DeadMeat
(Alex R.)
September 3, 2021, 4:54am
9
I’ve tried 5.14-main, works - confirmed.
frank-w
(Frank W.)
September 3, 2021, 5:53am
10
I meant going back from 5.13 with the path to get latest version working. Juste to limit count of patches needed. E.g. if 5.13 works and 5.12 not you can get diff/log between these 2
DeadMeat
(Alex R.)
September 3, 2021, 6:09am
11
Sure, just tested 4k while testing wifi on 5.14.
From my experience :
-5.10-main and any prior has hdmi working but w/o 4k.
-5.11 - not tested.
-5.12-hnat(not tested on main) - hdmi broken (bridge error, not sure if already fixed in 5.12-main )
-5.13-main - hdmi fixed, 4k works with the patch( not tested w/o it), also needs Fix cursor plane patch(already included to main tree)
-5.14-main - Everything works.(I see rdma threshold patch is already included).
I need some time to tested 5.12 and/or 5.11
frank-w
(Frank W.)
September 3, 2021, 6:13am
12
Bridge error was fixed in stable 5.12.x,afair i have merged dot-release to 5.12-main,but not rebased 5.12-hnat.
edit: added patches to 5.12-hnat to fix the bridge-error (not tested), 5.11 was working afair
DeadMeat
(Alex R.)
September 3, 2021, 9:47pm
13
tested with 5.12-hnat, bridge error fixed, but 4k TV doesn’t work both with or w/o adjust rdma fifo threshold patch.
Looks like the problem was resolved in 5.13.
1 Like
frank-w
(Frank W.)
September 4, 2021, 6:21am
14
Then it is a patch between 5.12 and 5.13…there are not much as between 5.10 and 5.13
This is the pull-request
https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected] /
This is the only looking related based on commit message:
dpi: Add check for max clock rate in mode_valid
Maybe ask dafna hirschfeld…
frank-w
(Frank W.)
September 4, 2021, 11:13am
15
i tested with my 4k screen, and yes, 5.14 works.
got 5.13 working in fbdev, but not x-server with these patches on top of 5.12-hnat:
80a8321870da 2021-07-11 drm/mediatek: adjust rdma fifo threshold calculate formula (HEAD -> 5.12-hnat)
c322ea15e69e 2021-05-26 drm/mediatek: dpi: Add dual edge sample mode support
4c7d08917bef 2021-04-19 drm/mediatek: hdmi: Add check for CEA modes only
with while xserver is loading i get this trace:
[ 40.820661] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:32:HDMI-A-1] flip_done timed out
[ 40.830685] [drm:mtk_drm_crtc_atomic_begin] *ERROR* new event while there is still a pending event
[ 40.940664] ------------[ cut here ]------------
[ 40.945300] WARNING: CPU: 2 PID: 521 at drivers/gpu/drm/drm_atomic_helper.c:1512 drm_atomic_helper_wait_for_vblanks.part.0+0x2a0/0x2a8
[ 40.957448] [CRTC:41:crtc-0] vblank wait timed out
[ 40.962272] Modules linked in:
[ 40.965341] CPU: 2 PID: 521 Comm: Xorg Tainted: G W 5.12.0-bpi-r2-hnat #1
[ 40.973432] Hardware name: Mediatek Cortex-A7 (Device Tree)
[ 40.979000] Backtrace:
[ 40.981447] [<c0c6edf0>] (dump_backtrace) from [<c0c6f1b4>] (show_stack+0x20/0x24)
[ 40.989034] r7:000005e8 r6:600e0013 r5:00000000 r4:c13ef860
[ 40.994687] [<c0c6f194>] (show_stack) from [<c0c73010>] (dump_stack+0xcc/0xe0)
[ 41.001915] [<c0c72f44>] (dump_stack) from [<c0126cd8>] (__warn+0xfc/0x114)
[ 41.008891] r7:000005e8 r6:c06be158 r5:00000009 r4:c104da84
[ 41.014543] [<c0126bdc>] (__warn) from [<c0c6f8b0>] (warn_slowpath_fmt+0xa8/0xd0)
[ 41.022036] r7:c06be158 r6:000005e8 r5:c104da84 r4:c104e034
[ 41.027689] [<c0c6f80c>] (warn_slowpath_fmt) from [<c06be158>] (drm_atomic_helper_wait_for_vblanks.part.0+0x2a0/0x2a8)
[ 41.038395] r8:00000000 r7:00000000 r6:000001df r5:c65907c0 r4:c2389040
[ 41.045089] [<c06bdeb8>] (drm_atomic_helper_wait_for_vblanks.part.0) from [<c06bf808>] (drm_atomic_helper_commit_tail_rpm+0x6c/0x7c)
[ 41.057010] r10:c2389800 r9:c2389040 r8:c0d8506c r7:00000004 r6:b7799405 r5:c2387c00
[ 41.064833] r4:c65907c0
[ 41.067360] [<c06bf79c>] (drm_atomic_helper_commit_tail_rpm) from [<c06bfdb4>] (commit_tail+0xb0/0x1c4)
[ 41.076759] r5:00000000 r4:c65907c0
[ 41.080329] [<c06bfd04>] (commit_tail) from [<c06c0b70>] (drm_atomic_helper_commit+0x144/0x168)
[ 41.089036] r9:c2389040 r8:00000000 r7:00000000 r6:c2387c00 r5:00000000 r4:c65907c0
[ 41.096771] [<c06c0a2c>] (drm_atomic_helper_commit) from [<c06df4a0>] (drm_atomic_commit+0x54/0x60)
[ 41.105827] r7:00000000 r6:c2387c00 r5:c65907c0 r4:00000000
[ 41.111480] [<c06df44c>] (drm_atomic_commit) from [<c06f9c38>] (drm_atomic_connector_commit_dpms+0xa4/0x104)
[ 41.121316] r7:00000000 r6:c2389800 r5:c65907c0 r4:00000001
[ 41.126969] [<c06f9b94>] (drm_atomic_connector_commit_dpms) from [<c06e7a64>] (drm_mode_obj_set_property_ioctl+0x1c8/0x440)
[ 41.138108] r9:00000000 r8:c5fad200 r7:c665fde4 r6:c2389814 r5:c65907c0 r4:c52aa500
[ 41.145844] [<c06e789c>] (drm_mode_obj_set_property_ioctl) from [<c06e5b28>] (drm_connector_property_set_ioctl+0x5c/0x84)
[ 41.156809] r10:c01064ab r9:c5fad200 r8:c665fecc r7:c06e5acc r6:00000002 r5:00000000
[ 41.164632] r4:00000000
[ 41.167159] [<c06e5acc>] (drm_connector_property_set_ioctl) from [<c06cc590>] (drm_ioctl_kernel+0xc8/0x10c)
[ 41.176907] r5:c2387c00 r4:00000000
[ 41.180476] [<c06cc4c8>] (drm_ioctl_kernel) from [<c06cc7ec>] (drm_ioctl+0x218/0x408)
[ 41.188316] r9:c5fad200 r8:000000ab r7:c665fecc r6:c06e5acc r5:c0d79bc0 r4:00000010
[ 41.196052] [<c06cc5d4>] (drm_ioctl) from [<c033faf0>] (sys_ioctl+0x88/0xb4)
[ 41.203116] r10:00000036 r9:fffffdfd r8:c600e600 r7:be818a60 r6:c01064ab r5:c600e601
[ 41.210939] r4:fffffdfd
[ 41.213467] [<c033fa68>] (sys_ioctl) from [<c0100060>] (ret_fast_syscall+0x0/0x58)
[ 41.221043] Exception stack(0xc665ffa8 to 0xc665fff0)
[ 41.226096] ffa0: 00000000 be818a60 0000000c c01064ab be818a60 0061c550
[ 41.234272] ffc0: 00000000 be818a60 c01064ab 00000036 0061ddd8 00000000 00000001 be818ad4
[ 41.242445] ffe0: b6d3f094 be818a44 b6d2a0a3 b6a63f08
[ 41.247496] r9:c665e000 r8:c0100264 r7:00000036 r6:c01064ab r5:be818a60 r4:00000000
[ 41.255282] ---[ end trace 37211af21b39311c ]---
[ 55.595020] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:41:crtc-0] flip_done timed out
so i guess i only miss one/more of the atomic-patches, most of them cannot be applied due to many depencies
DeadMeat
(Alex R.)
September 5, 2021, 3:40am
16
Sorry, i didn’t get if that was 5.13 or 5.12? In my case 5.13 needed patch for xorg cursor.
frank-w
(Frank W.)
September 5, 2021, 5:45am
17
Tried 5.12-hnat…took patches from 5.13
have no mouse connected…only try to bootup into x-server with 4k-screen connected
DeadMeat
(Alex R.)
September 12, 2021, 7:23am
18
Probably I’m doing smth wrong, but I can’t apply this patch(or i got wrong one):
Applying: dt-bindings: media: add pclk-sample dual edge property
error: patch failed: Documentation/devicetree/bindings/media/video-interfaces.txt:118
error: Documentation/devicetree/bindings/media/video-interfaces.txt: patch does not apply
Patch failed at 0001 dt-bindings: media: add pclk-sample dual edge property
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Could you plz provide a link to it on patchwork?
frank-w
(Frank W.)
September 12, 2021, 8:20am
19
You do not need the dtbindings-patch…only code-change. But at least xserver still don’t work
have pushed my 5.10-hnat and 5.12-hnat branch
DeadMeat
(Alex R.)
September 13, 2021, 6:33am
20
I’ve tried your 5.12-hnat - not works for me, including fb:
5.12-hnat.4k.txt (6.1 KB)
The dmesg is pretty the same as yours. The TV screen is corrupted.
frank-w
(Frank W.)
September 13, 2021, 6:46am
21
You see no fb console like me? Only x-server is corrupted and i see traceback while starting it and after
DeadMeat
(Alex R.)
September 13, 2021, 6:52am
22
No, I can’t see fb console, it’s corrupted, and i have backtrace in dmesg on boot(or on hdmi-cable connect). I didn’t tried Xorg.
The TV shows that it’s in 2160p mode.
frank-w
(Frank W.)
September 13, 2021, 6:54am
23
Mhm,i thought i have it partially working i can’t apply atomic patches as they depend on others
DeadMeat
(Alex R.)
September 13, 2021, 7:38am
24
Some good news!
After comparing 5.12-hnat anf 5.13-main I found a couple of patchsets to test…
And this set worked: https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected] /
I’ve applied the whole series
Both Xorg and FB console seems to be fine:
r2-gentoo ~ # uname -r
5.12.0-bpi-r2-hnat
Later I’ll try to run it on 5.10/5.11, not sure if it’s easy/necessary to backport it to 5.4.
P.S. if i’ll have some time i can test if rdma threshold and other patches are needed, but at low priority as there’s looks line no negative side effects.
1 Like
frank-w
(Frank W.)
September 13, 2021, 7:43am
25
Nice, i guess backporting to latest stable (5.10) is enough. Have you tried reverting the patches i applied?
Btw. linked patch has a change while applying to drm-next (5.13) as stated in comments:
https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/commit/?h=mediatek-drm-next-5.13&id=44b07120291c4b7a6722ccb7149f6b9d938cf5a2
DeadMeat
(Alex R.)
September 13, 2021, 8:03am
26
Not yet, testet on top of your branch, i’ll update after trying