ltdc.h 1.1 KB

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