Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / drivers / gpu / drm / sun4i / sun4i_layer.h
blob5219cae9393e7a2df22ae7552baf4ebad986777f
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Copyright (C) 2015 Free Electrons
4 * Copyright (C) 2015 NextThing Co
6 * Maxime Ripard <maxime.ripard@free-electrons.com>
7 */
9 #ifndef _SUN4I_LAYER_H_
10 #define _SUN4I_LAYER_H_
12 struct sunxi_engine;
14 struct sun4i_layer {
15 struct drm_plane plane;
16 struct sun4i_drv *drv;
17 struct sun4i_backend *backend;
18 int id;
21 struct sun4i_layer_state {
22 struct drm_plane_state state;
23 unsigned int pipe;
24 bool uses_frontend;
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_ */