1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (C) 2015 Free Electrons
4 * Copyright (C) 2015 NextThing Co
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
9 #ifndef _SUN4I_LAYER_H_
10 #define _SUN4I_LAYER_H_
15 struct drm_plane plane
;
16 struct sun4i_drv
*drv
;
17 struct sun4i_backend
*backend
;
21 struct sun4i_layer_state
{
22 struct drm_plane_state state
;
27 static inline struct sun4i_layer
*
28 plane_to_sun4i_layer(struct drm_plane
*plane
)
30 return container_of(plane
, struct sun4i_layer
, plane
);
33 static inline struct sun4i_layer_state
*
34 state_to_sun4i_layer_state(struct drm_plane_state
*state
)
36 return container_of(state
, struct sun4i_layer_state
, state
);
39 struct drm_plane
**sun4i_layers_init(struct drm_device
*drm
,
40 struct sunxi_engine
*engine
);
42 #endif /* _SUN4I_LAYER_H_ */