mtk_debug.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /*
  2. * Copyright (C) 2019 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 __MTKFB_DEBUG_H
  14. #define __MTKFB_DEBUG_H
  15. #define LOGGER_BUFFER_SIZE (16 * 1024)
  16. #define ERROR_BUFFER_COUNT 4
  17. #define FENCE_BUFFER_COUNT 22
  18. #define DEBUG_BUFFER_COUNT 30
  19. #define DUMP_BUFFER_COUNT 10
  20. #define STATUS_BUFFER_COUNT 1
  21. #if defined(CONFIG_MT_ENG_BUILD) || !defined(CONFIG_MTK_GMO_RAM_OPTIMIZE)
  22. #define DEBUG_BUFFER_SIZE \
  23. (4096 + \
  24. (ERROR_BUFFER_COUNT + FENCE_BUFFER_COUNT + DEBUG_BUFFER_COUNT + \
  25. DUMP_BUFFER_COUNT + STATUS_BUFFER_COUNT) * \
  26. LOGGER_BUFFER_SIZE)
  27. #else
  28. #define DEBUG_BUFFER_SIZE 10240
  29. #endif
  30. extern int mtk_disp_hrt_bw_dbg(void);
  31. #ifdef _DRM_P_H_
  32. struct disp_rect {
  33. u32 x;
  34. u32 y;
  35. u32 width;
  36. u32 height;
  37. };
  38. void disp_dbg_probe(void);
  39. void disp_dbg_init(struct drm_device *drm_dev);
  40. void disp_dbg_deinit(void);
  41. int mtk_dprec_mmp_dump_ovl_layer(struct mtk_plane_state *plane_state);
  42. int disp_met_set(void *data, u64 val);
  43. void mtk_drm_idlemgr_kick_ext(const char *source);
  44. unsigned int mtk_dbg_get_lfr_mode_value(void);
  45. unsigned int mtk_dbg_get_lfr_type_value(void);
  46. unsigned int mtk_dbg_get_lfr_enable_value(void);
  47. unsigned int mtk_dbg_get_lfr_update_value(void);
  48. unsigned int mtk_dbg_get_lfr_vse_dis_value(void);
  49. unsigned int mtk_dbg_get_lfr_skip_num_value(void);
  50. unsigned int mtk_dbg_get_lfr_dbg_value(void);
  51. #endif
  52. #endif