mtk_drm_drv.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2015 MediaTek Inc.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #ifndef MTK_DRM_DRV_H
  14. #define MTK_DRM_DRV_H
  15. #include <linux/io.h>
  16. #include "mtk_drm_ddp_comp.h"
  17. #define MAX_CRTC 2
  18. #define MAX_CONNECTOR 2
  19. struct device;
  20. struct device_node;
  21. struct drm_crtc;
  22. struct drm_device;
  23. struct drm_fb_helper;
  24. struct drm_property;
  25. struct regmap;
  26. struct mtk_drm_private {
  27. struct drm_device *drm;
  28. struct device *dma_dev;
  29. struct drm_crtc *crtc[MAX_CRTC];
  30. unsigned int num_pipes;
  31. struct device_node *mutex_node;
  32. struct device *mutex_dev;
  33. void __iomem *config_regs;
  34. struct device_node *comp_node[DDP_COMPONENT_ID_MAX];
  35. struct mtk_ddp_comp *ddp_comp[DDP_COMPONENT_ID_MAX];
  36. struct {
  37. struct drm_atomic_state *state;
  38. struct work_struct work;
  39. struct mutex lock;
  40. } commit;
  41. struct drm_atomic_state *suspend_state;
  42. };
  43. extern struct platform_driver mtk_ddp_driver;
  44. extern struct platform_driver mtk_disp_ovl_driver;
  45. extern struct platform_driver mtk_disp_rdma_driver;
  46. extern struct platform_driver mtk_dpi_driver;
  47. extern struct platform_driver mtk_dsi_driver;
  48. extern struct platform_driver mtk_mipi_tx_driver;
  49. #endif /* MTK_DRM_DRV_H */