aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/sun4i/sun4i_layer.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/sun4i/sun4i_layer.h')
-rw-r--r--drivers/gpu/drm/sun4i/sun4i_layer.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.h b/drivers/gpu/drm/sun4i/sun4i_layer.h
index 4e84f438b346..75b4868ba87c 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.h
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.h
@@ -22,12 +22,23 @@ struct sun4i_layer {
22 int id; 22 int id;
23}; 23};
24 24
25struct sun4i_layer_state {
26 struct drm_plane_state state;
27 bool uses_frontend;
28};
29
25static inline struct sun4i_layer * 30static inline struct sun4i_layer *
26plane_to_sun4i_layer(struct drm_plane *plane) 31plane_to_sun4i_layer(struct drm_plane *plane)
27{ 32{
28 return container_of(plane, struct sun4i_layer, plane); 33 return container_of(plane, struct sun4i_layer, plane);
29} 34}
30 35
36static inline struct sun4i_layer_state *
37state_to_sun4i_layer_state(struct drm_plane_state *state)
38{
39 return container_of(state, struct sun4i_layer_state, state);
40}
41
31struct drm_plane **sun4i_layers_init(struct drm_device *drm, 42struct drm_plane **sun4i_layers_init(struct drm_device *drm,
32 struct sunxi_engine *engine); 43 struct sunxi_engine *engine);
33 44