rcar_du_kms.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /*
  2. * rcar_du_kms.h -- R-Car Display Unit Mode Setting
  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_KMS_H__
  14. #define __RCAR_DU_KMS_H__
  15. #include <linux/types.h>
  16. #include <drm/drm_crtc.h>
  17. struct rcar_du_device;
  18. struct rcar_du_format_info {
  19. u32 fourcc;
  20. unsigned int bpp;
  21. unsigned int planes;
  22. unsigned int pnmr;
  23. unsigned int edf;
  24. };
  25. struct rcar_du_encoder {
  26. struct drm_encoder encoder;
  27. unsigned int output;
  28. };
  29. #define to_rcar_encoder(e) \
  30. container_of(e, struct rcar_du_encoder, encoder)
  31. struct rcar_du_connector {
  32. struct drm_connector connector;
  33. struct rcar_du_encoder *encoder;
  34. };
  35. #define to_rcar_connector(c) \
  36. container_of(c, struct rcar_du_connector, connector)
  37. const struct rcar_du_format_info *rcar_du_format_info(u32 fourcc);
  38. struct drm_encoder *
  39. rcar_du_connector_best_encoder(struct drm_connector *connector);
  40. void rcar_du_encoder_mode_prepare(struct drm_encoder *encoder);
  41. void rcar_du_encoder_mode_set(struct drm_encoder *encoder,
  42. struct drm_display_mode *mode,
  43. struct drm_display_mode *adjusted_mode);
  44. void rcar_du_encoder_mode_commit(struct drm_encoder *encoder);
  45. int rcar_du_modeset_init(struct rcar_du_device *rcdu);
  46. #endif /* __RCAR_DU_KMS_H__ */