sun8i_layer.h 940 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * Copyright (C) Icenowy Zheng <icenowy@aosc.io>
  3. *
  4. * Based on sun4i_layer.h, which is:
  5. * Copyright (C) 2015 Free Electrons
  6. * Copyright (C) 2015 NextThing Co
  7. *
  8. * Maxime Ripard <maxime.ripard@free-electrons.com>
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. */
  15. #ifndef _SUN8I_LAYER_H_
  16. #define _SUN8I_LAYER_H_
  17. struct sunxi_engine;
  18. struct sun8i_layer {
  19. struct drm_plane plane;
  20. struct sun4i_drv *drv;
  21. struct sun8i_mixer *mixer;
  22. int id;
  23. };
  24. static inline struct sun8i_layer *
  25. plane_to_sun8i_layer(struct drm_plane *plane)
  26. {
  27. return container_of(plane, struct sun8i_layer, plane);
  28. }
  29. struct drm_plane **sun8i_layers_init(struct drm_device *drm,
  30. struct sunxi_engine *engine);
  31. #endif /* _SUN8I_LAYER_H_ */