sun4i_crtc.h 880 B

12345678910111213141516171819202122232425262728293031323334
  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_CRTC_H_
  13. #define _SUN4I_CRTC_H_
  14. struct sun4i_crtc {
  15. struct drm_crtc crtc;
  16. struct drm_pending_vblank_event *event;
  17. struct sunxi_engine *engine;
  18. struct sun4i_tcon *tcon;
  19. };
  20. static inline struct sun4i_crtc *drm_crtc_to_sun4i_crtc(struct drm_crtc *crtc)
  21. {
  22. return container_of(crtc, struct sun4i_crtc, crtc);
  23. }
  24. struct sun4i_crtc *sun4i_crtc_init(struct drm_device *drm,
  25. struct sunxi_engine *engine,
  26. struct sun4i_tcon *tcon);
  27. #endif /* _SUN4I_CRTC_H_ */