ltdc.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright (C) STMicroelectronics SA 2017
  3. *
  4. * Authors: Philippe Cornu <philippe.cornu@st.com>
  5. * Yannick Fertre <yannick.fertre@st.com>
  6. * Fabien Dessenne <fabien.dessenne@st.com>
  7. * Mickael Reulier <mickael.reulier@st.com>
  8. *
  9. * License terms: GNU General Public License (GPL), version 2
  10. */
  11. #ifndef _LTDC_H_
  12. #define _LTDC_H_
  13. struct ltdc_caps {
  14. u32 hw_version; /* hardware version */
  15. u32 nb_layers; /* number of supported layers */
  16. u32 reg_ofs; /* register offset for applicable regs */
  17. u32 bus_width; /* bus width (32 or 64 bits) */
  18. const u32 *pix_fmt_hw; /* supported pixel formats */
  19. };
  20. struct ltdc_device {
  21. struct drm_fbdev_cma *fbdev;
  22. void __iomem *regs;
  23. struct clk *pixel_clk; /* lcd pixel clock */
  24. struct drm_bridge *bridge;
  25. bool is_panel_bridge;
  26. struct mutex err_lock; /* protecting error_status */
  27. struct ltdc_caps caps;
  28. u32 error_status;
  29. u32 irq_status;
  30. };
  31. int ltdc_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe);
  32. void ltdc_crtc_disable_vblank(struct drm_device *dev, unsigned int pipe);
  33. int ltdc_load(struct drm_device *ddev);
  34. void ltdc_unload(struct drm_device *ddev);
  35. #endif