linux/drivers/gpu/drm/exynos
Boris Brezillon f66ff55a9b drm/exynos: dsi: Fix bridge chain handling
Commit 05193dc381 ("drm/bridge: Make the bridge chain a double-linked
list") patched the bridge chain logic to use a double-linked list instead
of a single-linked list. This change induced changes to the Exynos driver
which was manually resetting the encoder->bridge element to NULL to
control the enable/disable sequence of the bridge chain. During this
conversion, 2 bugs were introduced:

1/ list_splice() was used to move chain elements to our own internal
   chain, but list_splice() does not reset the source list to an empty
   state, leading to unexpected bridge hook calls when
   drm_bridge_chain_xxx() helpers were called by the core. Replacing
   the list_splice() call by list_splice_init() fixes this problem.

2/ drm_bridge_chain_xxx() helpers operate on the
   bridge->encoder->bridge_chain list, which is now empty. When the
   helper uses list_for_each_entry_reverse() we end up with no operation
   done which is not what we want. But that's even worse when the helper
   uses list_for_each_entry_from(), because in that case we end up in
   an infinite loop searching for the list head element which is no
   longer encoder->bridge_chain but exynos_dsi->bridge_chain. To address
   that problem we stop using the bridge chain helpers and call the
   hooks directly.

Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: 05193dc381 ("drm/bridge: Make the bridge chain a double-linked list")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191227144124.210294-3-boris.brezillon@collabora.com
2020-01-08 09:09:48 +01:00
..
exynos7_drm_decon.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos5433_drm_decon.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_dp.c drm/exynos: Don't reset bridge->next 2019-12-02 09:34:06 +01:00
exynos_drm_crtc.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_crtc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos_drm_dma.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_dpi.c drm/panel: decouple connector from drm_panel 2019-12-09 22:57:26 +01:00
exynos_drm_drv.c drm main pull for 5.4-rc1 2019-09-19 16:24:24 -07:00
exynos_drm_drv.h drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_dsi.c drm/exynos: dsi: Fix bridge chain handling 2020-01-08 09:09:48 +01:00
exynos_drm_fb.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_fb.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos_drm_fbdev.c drm: constify fb ops across all drivers 2019-12-05 10:57:42 +02:00
exynos_drm_fbdev.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos_drm_fimc.c drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_fimd.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_g2d.c drm/exynos: remove redundant assignment to pointer 'node' 2019-08-02 15:28:47 +09:00
exynos_drm_g2d.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 423 2019-06-05 17:37:15 +02:00
exynos_drm_gem.c Revert "drm/gem: Rename drm_gem_dumb_map_offset() to drm_gem_map_offset()" 2019-08-07 11:56:48 -04:00
exynos_drm_gem.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos_drm_gsc.c drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_ipp.c drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_ipp.h drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_mic.c drm: Stop including drm_bridge.h from drm_crtc.h 2019-08-28 22:11:03 +02:00
exynos_drm_plane.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_plane.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos_drm_rotator.c drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_scaler.c drm/exynos: drop use of drmP.h 2019-09-01 20:55:12 +09:00
exynos_drm_vidi.c drm/exynos: drop drmP.h usage 2019-06-27 19:56:09 +09:00
exynos_drm_vidi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
exynos_hdmi.c drm/exynos: Provide ddc symlink in connector's sysfs 2019-11-08 09:16:14 +01:00
exynos_mixer.c drm/exynos: Move static keyword to the front of declaration 2019-10-28 21:12:27 +09:00
Kconfig drm/exynos: add CONFIG_MMU dependency 2019-08-02 15:28:47 +09:00
Makefile
regs-decon7.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
regs-decon5433.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 423 2019-06-05 17:37:15 +02:00
regs-fimc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
regs-gsc.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
regs-hdmi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
regs-mixer.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
regs-rotator.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
regs-scaler.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
regs-vp.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00