linux/drivers/gpu/drm/sun4i
Maxime Ripard 8b11aaface drm/sun4i: Implement endpoint parsing using kfifo
The commit da82b8785e ("drm/sun4i: add components in breadth first
traversal order") implemented a breadth first traversal of our device tree
nodes graph. However, it was relying on the kernel linked lists, and those
are not really safe for addition.

Indeed, in a single pipeline stage, your first stage (ie, the mixer or
fronted) will be queued, and it will be the final iteration of that list as
far as list_for_each_entry_safe is concerned. Then, during that final
iteration, we'll queue another element (the TCON or the backend) that
list_for_each_entry_safe will not account for, and we will leave the loop
without having iterated over all the elements. And since we won't have
built our components list properly, the DRM driver will be left
non-functional.

We can instead use a kfifo to queue and enqueue components in-order, as was
the original intention. This also has the benefit of removing any dynamic
allocation, making the error handling path simpler too. The only thing
we're losing is the ability to tell whether an element has already been
queued, but that was only needed to remove spurious logs, and therefore
purely cosmetic.

This means that this commit effectively reverses e8afb7b67f ("drm/sun4i:
don't add components that are already in the queue").

Fixes: da82b8785e ("drm/sun4i: add components in breadth first traversal order")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Link: https://patchwork.freedesktop.org/patch/msgid/4ecb323e787918208f6a5d9f0ebba12c62583c98.1508231063.git-series.maxime.ripard@free-electrons.com
2017-10-17 16:31:31 +02:00
..
Kconfig drm/sun4i: cec: Enable back CEC-pin framework 2017-09-22 08:42:17 +02:00
Makefile drm/sun4i: hdmi: Implement I2C adapter for A10s DDC bus 2017-07-17 08:21:39 +02:00
sun4i_backend.c drm/sun4i: backend: Offset layer buffer address by DRAM starting address 2017-10-17 16:25:45 +02:00
sun4i_backend.h drm/sun4i: abstract a engine type 2017-06-01 09:47:23 +02:00
sun4i_crtc.c drm: Convert atomic drivers from CRTC .disable() to .atomic_disable() 2017-06-30 14:53:15 +02:00
sun4i_crtc.h drm/sun4i: abstract a engine type 2017-06-01 09:47:23 +02:00
sun4i_dotclock.c drm/sun4i: dotclock: Round to closest clock rate 2016-09-20 09:19:31 +02:00
sun4i_dotclock.h
sun4i_drv.c drm/sun4i: Implement endpoint parsing using kfifo 2017-10-17 16:31:31 +02:00
sun4i_drv.h drm/sun4i: abstract a engine type 2017-06-01 09:47:23 +02:00
sun4i_framebuffer.c drm/sun4i: Use drm_gem_fb_create() 2017-10-01 17:03:55 +02:00
sun4i_framebuffer.h
sun4i_hdmi_ddc_clk.c drm/sun4i: hdmi: Add support for controller hardware variants 2017-10-11 09:53:33 +02:00
sun4i_hdmi_enc.c drm/sun4i: hdmi: Move PAD_CTRL1 setting to mode_set function 2017-10-16 09:54:46 +02:00
sun4i_hdmi_i2c.c drm/sun4i: hdmi: Add support for controller hardware variants 2017-10-11 09:53:33 +02:00
sun4i_hdmi_tmds_clk.c drm/sun4i: hdmi: Add support for controller hardware variants 2017-10-11 09:53:33 +02:00
sun4i_hdmi.h drm/sun4i: hdmi: Document PAD_CTRL1 output invert bits 2017-10-16 09:54:21 +02:00
sun4i_layer.c Allwinner DRM changes for 4.14 2017-08-21 09:05:01 +10:00
sun4i_layer.h drm/sun4i: abstract a engine type 2017-06-01 09:47:23 +02:00
sun4i_rgb.c Allwinner DRM changes for 4.14 2017-08-21 09:05:01 +10:00
sun4i_rgb.h drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder 2017-03-07 22:18:24 +01:00
sun4i_tcon.c drm/sun4i: tcon: Add support for demuxing TCON output on A31 2017-10-11 09:52:50 +02:00
sun4i_tcon.h drm/sun4i: tcon: Add variant callback for TCON output muxing 2017-10-11 09:52:36 +02:00
sun4i_tv.c Allwinner DRM changes for 4.14 2017-08-21 09:05:01 +10:00
sun6i_drc.c Merge tag 'drm-misc-next-2016-11-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2016-11-17 08:02:46 +10:00
sun8i_layer.c drm: Plumb modifiers through plane init 2017-08-01 17:50:06 +01:00
sun8i_layer.h drm/sun4i: add support for Allwinner DE2 mixers 2017-06-01 09:49:54 +02:00
sun8i_mixer.c drm/sun4i: add support for Allwinner DE2 mixers 2017-06-01 09:49:54 +02:00
sun8i_mixer.h drm/sun4i: add support for Allwinner DE2 mixers 2017-06-01 09:49:54 +02:00
sunxi_engine.h drm/sun4i: abstract a engine type 2017-06-01 09:47:23 +02:00