mtk_layering_rule.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* *
  2. * Copyright (C) 2016 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.
  11. * See http://www.gnu.org/licenses/gpl-2.0.html for more details.
  12. */
  13. #ifndef __LAYER_STRATEGY_EX__
  14. #define __LAYER_STRATEGY_EX__
  15. #include "mtk_layering_rule_base.h"
  16. #include "mtk_drm_helper.h"
  17. /* #include "lcm_drv.h" */
  18. #define MAX_PHY_OVL_CNT (12)
  19. /* #define HAS_LARB_HRT */
  20. #define HRT_AEE_LAYER_MASK 0xFFFFFFBF
  21. enum DISP_DEBUG_LEVEL {
  22. DISP_DEBUG_LEVEL_CRITICAL = 0,
  23. DISP_DEBUG_LEVEL_ERR,
  24. DISP_DEBUG_LEVEL_WARN,
  25. DISP_DEBUG_LEVEL_DEBUG,
  26. DISP_DEBUG_LEVEL_INFO,
  27. };
  28. enum HRT_LEVEL {
  29. HRT_LEVEL_LEVEL0 = 0,
  30. HRT_LEVEL_LEVEL1,
  31. HRT_LEVEL_LEVEL2,
  32. HRT_LEVEL_LEVEL3,
  33. HRT_LEVEL_NUM,
  34. HRT_LEVEL_DEFAULT = HRT_LEVEL_NUM + 1,
  35. };
  36. enum HRT_TB_TYPE {
  37. HRT_TB_TYPE_GENERAL0 = 0,
  38. HRT_TB_TYPE_GENERAL1,
  39. HRT_TB_TYPE_RPO_L0,
  40. HRT_TB_TYPE_SINGLE_LAYER,
  41. HRT_TB_NUM,
  42. };
  43. enum HRT_BOUND_TYPE {
  44. HRT_BOUND_TYPE_LP4 = 0,
  45. HRT_BOUND_NUM,
  46. };
  47. void mtk_layering_rule_init(struct drm_device *dev);
  48. void mtk_update_layering_opt_by_disp_opt(enum MTK_DRM_HELPER_OPT opt,
  49. int value);
  50. unsigned int _layering_rule_get_hrt_idx(void);
  51. unsigned long long _layering_get_frame_bw(struct drm_crtc *crtc,
  52. struct drm_display_mode *mode);
  53. // int layering_get_valid_hrt(void);
  54. // void copy_hrt_bound_table(int is_larb, int *hrt_table);
  55. #endif