aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen-Yu Tsai <wens@csie.org>2017-04-21 04:38:55 -0400
committerMaxime Ripard <maxime.ripard@free-electrons.com>2017-05-14 02:31:57 -0400
commitd281c862de30381c144145a75ec1f0d5efc307ae (patch)
tree55367f24dd97b3c7ac47dfc6b4e9a354eb723c91
parentb317fa3ba11a10eee45c3e64d6396015ff87e8dc (diff)
drm/sun4i: tcon: Copy ID from associated backend
The tcons and backends have a one-to-one relationship. Their IDs, or indexes in the documentation, are also the same. Copy the ID from the associated backend and save it in the tcon structure. This will later be used when we add support for the output data path muxes. Signed-off-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_tcon.c1
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_tcon.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun4i_tcon.c
index b13a7c2029df..5d7866fce78b 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c
@@ -471,6 +471,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
471 dev_set_drvdata(dev, tcon); 471 dev_set_drvdata(dev, tcon);
472 tcon->drm = drm; 472 tcon->drm = drm;
473 tcon->dev = dev; 473 tcon->dev = dev;
474 tcon->id = backend->id;
474 tcon->quirks = of_device_get_match_data(dev); 475 tcon->quirks = of_device_get_match_data(dev);
475 476
476 tcon->lcd_rst = devm_reset_control_get(dev, "lcd"); 477 tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.h b/drivers/gpu/drm/sun4i/sun4i_tcon.h
index 1bda4d183eec..d37e1e2ed60e 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tcon.h
+++ b/drivers/gpu/drm/sun4i/sun4i_tcon.h
@@ -174,6 +174,8 @@ struct sun4i_tcon {
174 /* Associated crtc */ 174 /* Associated crtc */
175 struct sun4i_crtc *crtc; 175 struct sun4i_crtc *crtc;
176 176
177 int id;
178
177 /* TCON list management */ 179 /* TCON list management */
178 struct list_head list; 180 struct list_head list;
179}; 181};