lcdif_drv.h 855 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright (C) 2022 Marek Vasut <marex@denx.de>
  4. *
  5. * i.MX8MP/i.MXRT LCDIFv3 LCD controller driver.
  6. */
  7. #ifndef __LCDIF_DRV_H__
  8. #define __LCDIF_DRV_H__
  9. #include <drm/drm_bridge.h>
  10. #include <drm/drm_crtc.h>
  11. #include <drm/drm_device.h>
  12. #include <drm/drm_plane.h>
  13. struct clk;
  14. struct lcdif_drm_private {
  15. void __iomem *base; /* registers */
  16. struct clk *clk;
  17. struct clk *clk_axi;
  18. struct clk *clk_disp_axi;
  19. unsigned int irq;
  20. struct drm_device *drm;
  21. struct {
  22. struct drm_plane primary;
  23. /* i.MXRT does support overlay planes, add them here. */
  24. } planes;
  25. struct drm_crtc crtc;
  26. };
  27. static inline struct lcdif_drm_private *
  28. to_lcdif_drm_private(struct drm_device *drm)
  29. {
  30. return drm->dev_private;
  31. }
  32. int lcdif_kms_init(struct lcdif_drm_private *lcdif);
  33. #endif /* __LCDIF_DRV_H__ */