drm/sun4i: Drop primary layer pointer from sun4i_drv
authorChen-Yu Tsai <wens@csie.org>
Thu, 23 Feb 2017 08:05:38 +0000 (16:05 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Tue, 7 Mar 2017 21:18:23 +0000 (22:18 +0100)
commitdcd215801b0279f0a021516526cf7c0b67d5302e
treefd3463cb32215a5aa15b10b974953b03aa0fac53
parent46cce6dac316a707309b374d9b6786b4269e7274
drm/sun4i: Drop primary layer pointer from sun4i_drv

The current layer init code keeps a pointer to the primary plane layer
in sun4i_drv. When we eventually support multiple display pipelines,
this would force us to keep track of primary planes for all crtcs. And
these pointers only get used at bind time.

Instead, have the crtc init code iterate through the returned layers
to find the primary and cursor layers. And drop the pointer from the
sun4i_drv structure.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
drivers/gpu/drm/sun4i/sun4i_crtc.c
drivers/gpu/drm/sun4i/sun4i_drv.h
drivers/gpu/drm/sun4i/sun4i_layer.c