浏览代码

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>
Chen-Yu Tsai 8 年之前
父节点
当前提交
d281c862de
共有 2 个文件被更改,包括 3 次插入0 次删除
  1. 1 0
      drivers/gpu/drm/sun4i/sun4i_tcon.c
  2. 2 0
      drivers/gpu/drm/sun4i/sun4i_tcon.h

+ 1 - 0
drivers/gpu/drm/sun4i/sun4i_tcon.c

@@ -471,6 +471,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
 	dev_set_drvdata(dev, tcon);
 	dev_set_drvdata(dev, tcon);
 	tcon->drm = drm;
 	tcon->drm = drm;
 	tcon->dev = dev;
 	tcon->dev = dev;
+	tcon->id = backend->id;
 	tcon->quirks = of_device_get_match_data(dev);
 	tcon->quirks = of_device_get_match_data(dev);
 
 
 	tcon->lcd_rst = devm_reset_control_get(dev, "lcd");
 	tcon->lcd_rst = devm_reset_control_get(dev, "lcd");

+ 2 - 0
drivers/gpu/drm/sun4i/sun4i_tcon.h

@@ -174,6 +174,8 @@ struct sun4i_tcon {
 	/* Associated crtc */
 	/* Associated crtc */
 	struct sun4i_crtc		*crtc;
 	struct sun4i_crtc		*crtc;
 
 
+	int				id;
+
 	/* TCON list management */
 	/* TCON list management */
 	struct list_head		list;
 	struct list_head		list;
 };
 };