drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder
authorChen-Yu Tsai <wens@csie.org>
Thu, 23 Feb 2017 08:05:41 +0000 (16:05 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 7 Mar 2017 21:18:24 +0000 (22:18 +0100)
commitb9c8506cb88b974522133d7eccc3d924ed29cf23
tree0976365af3e7620062e237b7ab99ee5f9de8d443
parent78428d672c2ecdb54c72ae427071c239650cb6c7
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>
drivers/gpu/drm/sun4i/sun4i_rgb.c
drivers/gpu/drm/sun4i/sun4i_rgb.h
drivers/gpu/drm/sun4i/sun4i_tcon.c