drm/sun4i: Use lists to track registered display backends and TCONs
To support multiple display pipelines, we need to keep track of the
multiple display backends and TCONs registered with the driver.
Switch to lists to track registered components. Components are only
appended to their respective lists if the bind process was successful.
The TCON bind function now defers if a backend was not registered.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.h b/drivers/gpu/drm/sun4i/sun4i_backend.h
index 83e63cc..9c82873 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.h
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.h
@@ -14,6 +14,7 @@
#define _SUN4I_BACKEND_H_
#include <linux/clk.h>
+#include <linux/list.h>
#include <linux/regmap.h>
#include <linux/reset.h>
@@ -149,6 +150,9 @@ struct sun4i_backend {
struct clk *sat_clk;
struct reset_control *sat_reset;
+
+ /* Backend list management */
+ struct list_head list;
};
void sun4i_backend_apply_color_correction(struct sun4i_backend *backend);