zx_vou.h 1017 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright 2016 Linaro Ltd.
  3. * Copyright 2016 ZTE Corporation.
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. */
  10. #ifndef __ZX_VOU_H__
  11. #define __ZX_VOU_H__
  12. #define VOU_CRTC_MASK 0x3
  13. /* VOU output interfaces */
  14. enum vou_inf_id {
  15. VOU_HDMI = 0,
  16. VOU_RGB_LCD = 1,
  17. VOU_TV_ENC = 2,
  18. VOU_MIPI_DSI = 3,
  19. VOU_LVDS = 4,
  20. VOU_VGA = 5,
  21. };
  22. enum vou_inf_data_sel {
  23. VOU_YUV444 = 0,
  24. VOU_RGB_101010 = 1,
  25. VOU_RGB_888 = 2,
  26. VOU_RGB_666 = 3,
  27. };
  28. struct vou_inf {
  29. enum vou_inf_id id;
  30. enum vou_inf_data_sel data_sel;
  31. u32 clocks_en_bits;
  32. u32 clocks_sel_bits;
  33. };
  34. void vou_inf_enable(const struct vou_inf *inf, struct drm_crtc *crtc);
  35. void vou_inf_disable(const struct vou_inf *inf, struct drm_crtc *crtc);
  36. int zx_vou_enable_vblank(struct drm_device *drm, unsigned int pipe);
  37. void zx_vou_disable_vblank(struct drm_device *drm, unsigned int pipe);
  38. #endif /* __ZX_VOU_H__ */