rcar_du_crtc.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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_group;
  19. struct rcar_du_plane;
  20. struct rcar_du_crtc {
  21. struct drm_crtc crtc;
  22. struct clk *clock;
  23. unsigned int mmio_offset;
  24. unsigned int index;
  25. bool started;
  26. struct drm_pending_vblank_event *event;
  27. unsigned int outputs;
  28. int dpms;
  29. struct rcar_du_group *group;
  30. struct rcar_du_plane *plane;
  31. };
  32. int rcar_du_crtc_create(struct rcar_du_group *rgrp, unsigned int index);
  33. void rcar_du_crtc_enable_vblank(struct rcar_du_crtc *rcrtc, bool enable);
  34. void rcar_du_crtc_cancel_page_flip(struct rcar_du_crtc *rcrtc,
  35. struct drm_file *file);
  36. void rcar_du_crtc_suspend(struct rcar_du_crtc *rcrtc);
  37. void rcar_du_crtc_resume(struct rcar_du_crtc *rcrtc);
  38. void rcar_du_crtc_route_output(struct drm_crtc *crtc, unsigned int output);
  39. void rcar_du_crtc_update_planes(struct drm_crtc *crtc);
  40. #endif /* __RCAR_DU_CRTC_H__ */