Commit | Line | Data |
---|---|---|
2874c5fd | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
9026e0d1 MR |
2 | /* |
3 | * Copyright (C) 2015 Free Electrons | |
4 | * Copyright (C) 2015 NextThing Co | |
5 | * | |
6 | * Maxime Ripard <maxime.ripard@free-electrons.com> | |
9026e0d1 MR |
7 | */ |
8 | ||
9 | #ifndef _SUN4I_LAYER_H_ | |
10 | #define _SUN4I_LAYER_H_ | |
11 | ||
87969338 IZ |
12 | struct sunxi_engine; |
13 | ||
9026e0d1 MR |
14 | struct sun4i_layer { |
15 | struct drm_plane plane; | |
16 | struct sun4i_drv *drv; | |
ace6c095 | 17 | struct sun4i_backend *backend; |
9026e0d1 MR |
18 | int id; |
19 | }; | |
20 | ||
d540f82a MR |
21 | struct sun4i_layer_state { |
22 | struct drm_plane_state state; | |
8f1f2553 | 23 | unsigned int pipe; |
ca07b210 | 24 | bool uses_frontend; |
d540f82a MR |
25 | }; |
26 | ||
9026e0d1 MR |
27 | static inline struct sun4i_layer * |
28 | plane_to_sun4i_layer(struct drm_plane *plane) | |
29 | { | |
30 | return container_of(plane, struct sun4i_layer, plane); | |
31 | } | |
32 | ||
d540f82a MR |
33 | static inline struct sun4i_layer_state * |
34 | state_to_sun4i_layer_state(struct drm_plane_state *state) | |
35 | { | |
36 | return container_of(state, struct sun4i_layer_state, state); | |
37 | } | |
38 | ||
7921e147 | 39 | struct drm_plane **sun4i_layers_init(struct drm_device *drm, |
87969338 | 40 | struct sunxi_engine *engine); |
9026e0d1 MR |
41 | |
42 | #endif /* _SUN4I_LAYER_H_ */ |