dpu_vbif.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #ifndef __DPU_VBIF_H__
  13. #define __DPU_VBIF_H__
  14. #include "dpu_kms.h"
  15. struct dpu_vbif_set_ot_params {
  16. u32 xin_id;
  17. u32 num;
  18. u32 width;
  19. u32 height;
  20. u32 frame_rate;
  21. bool rd;
  22. bool is_wfd;
  23. u32 vbif_idx;
  24. u32 clk_ctrl;
  25. };
  26. struct dpu_vbif_set_memtype_params {
  27. u32 xin_id;
  28. u32 vbif_idx;
  29. u32 clk_ctrl;
  30. bool is_cacheable;
  31. };
  32. /**
  33. * struct dpu_vbif_set_qos_params - QoS remapper parameter
  34. * @vbif_idx: vbif identifier
  35. * @xin_id: client interface identifier
  36. * @clk_ctrl: clock control identifier of the xin
  37. * @num: pipe identifier (debug only)
  38. * @is_rt: true if pipe is used in real-time use case
  39. */
  40. struct dpu_vbif_set_qos_params {
  41. u32 vbif_idx;
  42. u32 xin_id;
  43. u32 clk_ctrl;
  44. u32 num;
  45. bool is_rt;
  46. };
  47. /**
  48. * dpu_vbif_set_ot_limit - set OT limit for vbif client
  49. * @dpu_kms: DPU handler
  50. * @params: Pointer to OT configuration parameters
  51. */
  52. void dpu_vbif_set_ot_limit(struct dpu_kms *dpu_kms,
  53. struct dpu_vbif_set_ot_params *params);
  54. /**
  55. * dpu_vbif_set_qos_remap - set QoS priority level remap
  56. * @dpu_kms: DPU handler
  57. * @params: Pointer to QoS configuration parameters
  58. */
  59. void dpu_vbif_set_qos_remap(struct dpu_kms *dpu_kms,
  60. struct dpu_vbif_set_qos_params *params);
  61. /**
  62. * dpu_vbif_clear_errors - clear any vbif errors
  63. * @dpu_kms: DPU handler
  64. */
  65. void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms);
  66. /**
  67. * dpu_vbif_init_memtypes - initialize xin memory types for vbif
  68. * @dpu_kms: DPU handler
  69. */
  70. void dpu_vbif_init_memtypes(struct dpu_kms *dpu_kms);
  71. #ifdef CONFIG_DEBUG_FS
  72. int dpu_debugfs_vbif_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root);
  73. void dpu_debugfs_vbif_destroy(struct dpu_kms *dpu_kms);
  74. #else
  75. static inline int dpu_debugfs_vbif_init(struct dpu_kms *dpu_kms,
  76. struct dentry *debugfs_root)
  77. {
  78. return 0;
  79. }
  80. static inline void dpu_debugfs_vbif_destroy(struct dpu_kms *dpu_kms)
  81. {
  82. }
  83. #endif
  84. #endif /* __DPU_VBIF_H__ */