made a bisect between 5.11 and 5.12
turns out that this commit breaks
$ git bisect bad
f27893c49ec8129a0ddac135cd074cf25955e125 is the first bad commit
commit f27893c49ec8129a0ddac135cd074cf25955e125
Author: Hsin-Yi Wang <[email protected]>
Date: Thu Dec 3 16:24:45 2020 +0800
drm/mediatek: mtk_dpi: Create connector for bridges
Similar to commit a9d9fea74be2
("drm/mediatek: mtk_dsi: Create connector for bridges"):
Use the drm_bridge_connector helper to create a connector for pipelines
that use drm_bridge. This allows splitting connector operations across
multiple bridges when necessary, instead of having the last bridge in
the chain creating the connector and handling all connector operations
internally.
Signed-off-by: Hsin-Yi Wang <[email protected]>
Signed-off-by: Chun-Kuang Hu <[email protected]>
dmesg:
[ 7.329314] mediatek-dpi 14014000.dpi: Found bridge node: /hdmi@14015000
[ 7.336360] mediatek-drm mediatek-drm.1.auto: bound 14007000.ovl (ops mtk_disp_ovl_component_ops)
[ 7.345310] mediatek-drm mediatek-drm.1.auto: bound 14008000.rdma (ops mtk_disp_rdma_component_ops)
[ 7.354404] mediatek-drm mediatek-drm.1.auto: bound 1400b000.color (ops mtk_disp_color_component_ops)
[ 7.363659] mediatek-drm mediatek-drm.1.auto: bound 14012000.rdma (ops mtk_disp_rdma_component_ops)
[ 7.372752] [drm:mtk_hdmi_bridge_attach] *ERROR* Fix bridge driver to make connector optional!
[ 7.372774] mediatek-dpi 14014000.dpi: Failed to attach bridge: -22
[ 7.387686] mediatek-drm mediatek-drm.1.auto: failed to bind 14014000.dpi (ops mtk_dpi_component_ops): -22
[ 7.397509] mediatek-drm mediatek-drm.1.auto: master bind failed: -22
[ 7.404005] mediatek-dpi 14014000.dpi: Failed to add component: -22
[ 7.410325] mediatek-dpi: probe of 14014000.dpi failed with error -22
mainline-commit:
f01195148967 2020-12-03 drm/mediatek: mtk_dpi: Create connector for bridges
When looking on the commit it seems that first line seems to break:
- ret = drm_bridge_attach(&dpi->encoder, &dpi->bridge, NULL, 0);
+ ret = drm_bridge_attach(&dpi->encoder, &dpi->bridge, NULL,
+ DRM_BRIDGE_ATTACH_NO_CONNECTOR);
if (ret) {
dev_err(dev, "Failed to attach bridge: %d\n", ret);
I guess it’s related to the
[drm:mtk_hdmi_bridge_attach] *ERROR* Fix bridge driver to make connector optional!
https://git.kernel.org/pub/scm/linux/kernel/git/chunkuang.hu/linux.git/tree/drivers/gpu/drm/mediatek/mtk_hdmi.c?h=mediatek-drm-next-5.12&id=f011951489678a9c679489136f5df064a86c84dd#n1311
But this seems to be fixed in 5.13,so there is another problem which breaks
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/mediatek/mtk_hdmi.c#n1287
i tried to add only the new part which allows the current binding (not returning -EINVAL if flag is set), but then it fails later (i guess because connector is not added).
commit 2e477391522354e763aa62ee3e281c1ad9e8eb1b
Author: Dafna Hirschfeld <[email protected]>
Date: Tue Mar 30 13:09:02 2021 +0200
drm/mediatek: Don't support hdmi connector creation
but i cannot apply the patch to the drm-next-5.12
tried now 5.12.14 which contains this fix too…and is also based on atomic patches…and this works…now i need a way to get the breaking commit between 5.12.14 and 5.13, but here i cannot do a bisect, but 5.13 resetted to this fix (2e4773915223) still do work…now i can do the bisect
while doing this i see multiple versions
- be18cd1fcae2 shows warning about vblank timeout and purple screen without fbcon (like uboot for 1080p)
- 01d713689441 do not show anything but also no crash/warning/backtrace
- 16ae2044e91e same as above (no hdmi output but no traceback)
- 2ba9bea2d368 same
- 50eb842fe517 same, and i wonder why i see the “[drm:mtk_hdmi_bridge_attach] ERROR Fix bridge driver to make connector optional!” in dmesg as this should be shown no more as i set fix for this as good
my bisect log shows this:
$ git bisect log
git bisect start
# good: [2e477391522354e763aa62ee3e281c1ad9e8eb1b] drm/mediatek: Don't support hdmi connector creation
git bisect good 2e477391522354e763aa62ee3e281c1ad9e8eb1b
# bad: [562d8e0b1db85c9fecb71d30e489aa571fc5af85] mt76: enable load_eeprom_from_file
git bisect bad 562d8e0b1db85c9fecb71d30e489aa571fc5af85
# bad: [562d8e0b1db85c9fecb71d30e489aa571fc5af85] mt76: enable load_eeprom_from_file
git bisect bad 562d8e0b1db85c9fecb71d30e489aa571fc5af85
# bad: [be18cd1fcae2ed7db58d92d20733dfa8aa0a5173] Merge tag 'mmc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
git bisect bad be18cd1fcae2ed7db58d92d20733dfa8aa0a5173
# bad: [be18cd1fcae2ed7db58d92d20733dfa8aa0a5173] Merge tag 'mmc-v5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc
git bisect bad be18cd1fcae2ed7db58d92d20733dfa8aa0a5173
# bad: [01d7136894410a71932096e0fb9f1d301b6ccf07] Merge tag 'arm-soc-5.13' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
git bisect bad 01d7136894410a71932096e0fb9f1d301b6ccf07
# bad: [16ae2044e91e186d69390a8e67bc16141c3c406f] staging: rtl8723bs: Change controlling expressions
git bisect bad 16ae2044e91e186d69390a8e67bc16141c3c406f
# bad: [2ba9bea2d3682361f0f22f68a400bcee4248c205] Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
git bisect bad 2ba9bea2d3682361f0f22f68a400bcee4248c205
and while running the bisect i do not see the fix-commit i defined as good at start…maybe this can be caused by merges?
restarted bisect and first (be18cd1fcae2) shows the backtrace
WARNING: CPU: 2 PID: 513 at drivers/gpu/drm/drm_atomic_helper.c:1511 drm_atomic_helper_wait_for_vblanks.part.0+0x2a0/0x2a8
...
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:41:crtc-0] commit wait timed out
[ 304.500682] [drm:drm_crtc_commit_wait] *ERROR* flip_done timed out
[ 304.506904] [drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:32:HDMI-A-1] commit wait timed out
after defining this as bad (bisect stops at 01d7136894410a71932096e0fb9f1d301b6ccf07), the fix is no more included (but why???)
and i see another problem in 5.13: “watchdog: watchdog0: watchdog did not stop!” on reboot-command, but let us fix hdmi
Update july 9:
I have send the bug to mailinglist and it looks like a irq problem
http://lists.infradead.org/pipermail/linux-mediatek/2021-July/026583.html
Watchdog problem is caused by known commit in mtk_wdt.c and not related,wrote the author directly without mailinglist.
Update july 10:
Have found breaking commit and fixed it by adding back the missing function
https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/
Fix is applied to my 5.13-main tree
@DeadMeat maybe this patch fixes 4k-problem?
https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/