rcar_du_group.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * rcar_du_group.c -- R-Car Display Unit Planes and CRTCs Group
  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_GROUP_H__
  14. #define __RCAR_DU_GROUP_H__
  15. #include "rcar_du_plane.h"
  16. struct rcar_du_device;
  17. /*
  18. * struct rcar_du_group - CRTCs and planes group
  19. * @dev: the DU device
  20. * @mmio_offset: registers offset in the device memory map
  21. * @index: group index
  22. * @use_count: number of users of the group (rcar_du_group_(get|put))
  23. * @used_crtcs: number of CRTCs currently in use
  24. * @planes: planes handled by the group
  25. */
  26. struct rcar_du_group {
  27. struct rcar_du_device *dev;
  28. unsigned int mmio_offset;
  29. unsigned int index;
  30. unsigned int use_count;
  31. unsigned int used_crtcs;
  32. struct rcar_du_planes planes;
  33. };
  34. u32 rcar_du_group_read(struct rcar_du_group *rgrp, u32 reg);
  35. void rcar_du_group_write(struct rcar_du_group *rgrp, u32 reg, u32 data);
  36. int rcar_du_group_get(struct rcar_du_group *rgrp);
  37. void rcar_du_group_put(struct rcar_du_group *rgrp);
  38. void rcar_du_group_start_stop(struct rcar_du_group *rgrp, bool start);
  39. void rcar_du_group_restart(struct rcar_du_group *rgrp);
  40. int rcar_du_group_set_routing(struct rcar_du_group *rgrp);
  41. #endif /* __RCAR_DU_GROUP_H__ */