drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder

The RGB encoder represents channel 0 of the TCON. Instead of fetching
the pointer to its TCON from the main sun4i_drv structure, pass it in
as part of the init call, save it, and use it directly in the encoder
and connector callbacks.

We can also drop the otherwise unused sun4i_drv pointer.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
这个提交包含在:
Chen-Yu Tsai
2017-02-23 16:05:41 +08:00
提交者 Maxime Ripard
父节点 78428d672c
当前提交 b9c8506cb8
修改 3 个文件,包含 11 行新增20 行删除

查看文件

@@ -530,7 +530,7 @@ static int sun4i_tcon_bind(struct device *dev, struct device *master,
goto err_free_clocks;
}
ret = sun4i_rgb_init(drm);
ret = sun4i_rgb_init(drm, tcon);
if (ret < 0)
goto err_free_clocks;