mtk_drm_ddp.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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_DDP_H
  14. #define MTK_DRM_DDP_H
  15. #include "mtk_drm_ddp_comp.h"
  16. struct regmap;
  17. struct device;
  18. struct mtk_disp_mutex;
  19. void mtk_ddp_add_comp_to_path(void __iomem *config_regs,
  20. enum mtk_ddp_comp_id cur,
  21. enum mtk_ddp_comp_id next);
  22. void mtk_ddp_remove_comp_from_path(void __iomem *config_regs,
  23. enum mtk_ddp_comp_id cur,
  24. enum mtk_ddp_comp_id next);
  25. struct mtk_disp_mutex *mtk_disp_mutex_get(struct device *dev, unsigned int id);
  26. int mtk_disp_mutex_prepare(struct mtk_disp_mutex *mutex);
  27. void mtk_disp_mutex_add_comp(struct mtk_disp_mutex *mutex,
  28. enum mtk_ddp_comp_id id);
  29. void mtk_disp_mutex_enable(struct mtk_disp_mutex *mutex);
  30. void mtk_disp_mutex_disable(struct mtk_disp_mutex *mutex);
  31. void mtk_disp_mutex_remove_comp(struct mtk_disp_mutex *mutex,
  32. enum mtk_ddp_comp_id id);
  33. void mtk_disp_mutex_unprepare(struct mtk_disp_mutex *mutex);
  34. void mtk_disp_mutex_put(struct mtk_disp_mutex *mutex);
  35. void mtk_disp_mutex_acquire(struct mtk_disp_mutex *mutex);
  36. void mtk_disp_mutex_release(struct mtk_disp_mutex *mutex);
  37. #endif /* MTK_DRM_DDP_H */