mtk_drm_drv.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. unsigned int num_pipes;
  30. struct device_node *mutex_node;
  31. struct device *mutex_dev;
  32. void __iomem *config_regs;
  33. struct device_node *comp_node[DDP_COMPONENT_ID_MAX];
  34. struct mtk_ddp_comp *ddp_comp[DDP_COMPONENT_ID_MAX];
  35. struct {
  36. struct drm_atomic_state *state;
  37. struct work_struct work;
  38. struct mutex lock;
  39. } commit;
  40. struct drm_atomic_state *suspend_state;
  41. };
  42. extern struct platform_driver mtk_ddp_driver;
  43. extern struct platform_driver mtk_disp_ovl_driver;
  44. extern struct platform_driver mtk_disp_rdma_driver;
  45. extern struct platform_driver mtk_dpi_driver;
  46. extern struct platform_driver mtk_dsi_driver;
  47. extern struct platform_driver mtk_mipi_tx_driver;
  48. #endif /* MTK_DRM_DRV_H */