rcar_du_crtc.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * rcar_du_crtc.h -- R-Car Display Unit CRTCs
  3. *
  4. * Copyright (C) 2013 Renesas Corporation
  5. *
  6. * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #ifndef __RCAR_DU_CRTC_H__
  14. #define __RCAR_DU_CRTC_H__
  15. #include <linux/mutex.h>
  16. #include <drm/drmP.h>
  17. #include <drm/drm_crtc.h>
  18. struct rcar_du_device;
  19. struct rcar_du_plane;
  20. struct rcar_du_crtc {
  21. struct drm_crtc crtc;
  22. unsigned int mmio_offset;
  23. unsigned int index;
  24. bool started;
  25. struct drm_pending_vblank_event *event;
  26. unsigned int outputs;
  27. int dpms;
  28. struct rcar_du_plane *plane;
  29. };
  30. int rcar_du_crtc_create(struct rcar_du_device *rcdu, unsigned int index);
  31. void rcar_du_crtc_enable_vblank(struct rcar_du_crtc *rcrtc, bool enable);
  32. void rcar_du_crtc_irq(struct rcar_du_crtc *rcrtc);
  33. void rcar_du_crtc_cancel_page_flip(struct rcar_du_crtc *rcrtc,
  34. struct drm_file *file);
  35. void rcar_du_crtc_suspend(struct rcar_du_crtc *rcrtc);
  36. void rcar_du_crtc_resume(struct rcar_du_crtc *rcrtc);
  37. void rcar_du_crtc_route_output(struct drm_crtc *crtc, unsigned int output);
  38. void rcar_du_crtc_update_planes(struct drm_crtc *crtc);
  39. #endif /* __RCAR_DU_CRTC_H__ */