sun4i_layer.h 834 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * Copyright (C) 2015 Free Electrons
  3. * Copyright (C) 2015 NextThing Co
  4. *
  5. * Maxime Ripard <maxime.ripard@free-electrons.com>
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2 of
  10. * the License, or (at your option) any later version.
  11. */
  12. #ifndef _SUN4I_LAYER_H_
  13. #define _SUN4I_LAYER_H_
  14. struct sun4i_layer {
  15. struct drm_plane plane;
  16. struct sun4i_drv *drv;
  17. struct sun4i_backend *backend;
  18. int id;
  19. };
  20. static inline struct sun4i_layer *
  21. plane_to_sun4i_layer(struct drm_plane *plane)
  22. {
  23. return container_of(plane, struct sun4i_layer, plane);
  24. }
  25. struct sun4i_layer **sun4i_layers_init(struct drm_device *drm,
  26. struct sun4i_backend *backend);
  27. #endif /* _SUN4I_LAYER_H_ */