Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * Copyright (C) 2015 Free Electrons
0004  * Copyright (C) 2015 NextThing Co
0005  *
0006  * Maxime Ripard <maxime.ripard@free-electrons.com>
0007  */
0008 
0009 #ifndef _SUN4I_LAYER_H_
0010 #define _SUN4I_LAYER_H_
0011 
0012 struct sunxi_engine;
0013 
0014 struct sun4i_layer {
0015     struct drm_plane    plane;
0016     struct sun4i_drv    *drv;
0017     struct sun4i_backend    *backend;
0018     int         id;
0019 };
0020 
0021 struct sun4i_layer_state {
0022     struct drm_plane_state  state;
0023     unsigned int        pipe;
0024     bool            uses_frontend;
0025 };
0026 
0027 static inline struct sun4i_layer *
0028 plane_to_sun4i_layer(struct drm_plane *plane)
0029 {
0030     return container_of(plane, struct sun4i_layer, plane);
0031 }
0032 
0033 static inline struct sun4i_layer_state *
0034 state_to_sun4i_layer_state(struct drm_plane_state *state)
0035 {
0036     return container_of(state, struct sun4i_layer_state, state);
0037 }
0038 
0039 struct drm_plane **sun4i_layers_init(struct drm_device *drm,
0040                      struct sunxi_engine *engine);
0041 
0042 #endif /* _SUN4I_LAYER_H_ */