summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sun4i/sun4i_backend.h
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2017-04-21 16:38:52 +0800
committerMaxime Ripard <maxime.ripard@free-electrons.com>2017-05-14 08:27:41 +0200
commitda3a1c30dc10858b39a759432d8141f42b8529e8 (patch)
tree551ddb40124da0d492b59809841961f351497d12 /drivers/gpu/drm/sun4i/sun4i_backend.h
parentfdde6e7bcd5e2de4da6da7b0aab9676c478f319e (diff)
downloadlinux-da3a1c30dc10858b39a759432d8141f42b8529e8.tar.bz2
drm/sun4i: backend: Fetch backend ID from device tree
Some Allwinner SoCs have 2 display pipelines, as in 2 of each components, including the frontend, backend, TCON, and any other extras. As the backend and TCON are always paired together and form the CRTC, we need to know which backend or TCON we are currently probing, so we can pair them when initializing the CRTC. This patch figures out the backend's ID from the device tree and stores it in the backend's data structure. It does this by looking at the "reg" property of any remote endpoints connected to the backend's input port. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_backend.h')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_backend.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_backend.h b/drivers/gpu/drm/sun4i/sun4i_backend.h
index 9c8287309c65..45b7fc110590 100644
--- a/drivers/gpu/drm/sun4i/sun4i_backend.h
+++ b/drivers/gpu/drm/sun4i/sun4i_backend.h
@@ -151,6 +151,8 @@ struct sun4i_backend {
struct clk *sat_clk;
struct reset_control *sat_reset;
+ int id;
+
/* Backend list management */
struct list_head list;
};