radeon_share.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /*
  2. * Copyright 2008 Advanced Micro Devices, Inc.
  3. * Copyright 2008 Red Hat Inc.
  4. * Copyright 2009 Jerome Glisse.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  19. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  20. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  21. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  22. * OTHER DEALINGS IN THE SOFTWARE.
  23. *
  24. * Authors: Dave Airlie
  25. * Alex Deucher
  26. * Jerome Glisse
  27. */
  28. #ifndef __RADEON_SHARE_H__
  29. #define __RADEON_SHARE_H__
  30. /* Common */
  31. struct radeon_device;
  32. struct radeon_cs_parser;
  33. int radeon_clocks_init(struct radeon_device *rdev);
  34. void radeon_clocks_fini(struct radeon_device *rdev);
  35. void radeon_scratch_init(struct radeon_device *rdev);
  36. void radeon_surface_init(struct radeon_device *rdev);
  37. int radeon_cs_parser_init(struct radeon_cs_parser *p, void *data);
  38. /* R100, RV100, RS100, RV200, RS200, R200, RV250, RS300, RV280 */
  39. void r100_vram_init_sizes(struct radeon_device *rdev);
  40. /* R300, R350, RV350, RV380 */
  41. struct r300_asic {
  42. const unsigned *reg_safe_bm;
  43. unsigned reg_safe_bm_size;
  44. };
  45. /* RS690, RS740 */
  46. void rs690_line_buffer_adjust(struct radeon_device *rdev,
  47. struct drm_display_mode *mode1,
  48. struct drm_display_mode *mode2);
  49. /* RV515 */
  50. void rv515_bandwidth_avivo_update(struct radeon_device *rdev);
  51. /* R600, RV610, RV630, RV620, RV635, RV670, RS780, RS880 */
  52. bool r600_card_posted(struct radeon_device *rdev);
  53. void r600_cp_stop(struct radeon_device *rdev);
  54. void r600_ring_init(struct radeon_device *rdev, unsigned ring_size);
  55. int r600_cp_resume(struct radeon_device *rdev);
  56. int r600_count_pipe_bits(uint32_t val);
  57. int r600_gart_clear_page(struct radeon_device *rdev, int i);
  58. int r600_mc_wait_for_idle(struct radeon_device *rdev);
  59. void r600_pcie_gart_tlb_flush(struct radeon_device *rdev);
  60. int r600_ib_test(struct radeon_device *rdev);
  61. int r600_ring_test(struct radeon_device *rdev);
  62. int r600_wb_init(struct radeon_device *rdev);
  63. void r600_wb_fini(struct radeon_device *rdev);
  64. void r600_scratch_init(struct radeon_device *rdev);
  65. int r600_blit_init(struct radeon_device *rdev);
  66. void r600_blit_fini(struct radeon_device *rdev);
  67. int r600_cp_init_microcode(struct radeon_device *rdev);
  68. struct r600_asic {
  69. unsigned max_pipes;
  70. unsigned max_tile_pipes;
  71. unsigned max_simds;
  72. unsigned max_backends;
  73. unsigned max_gprs;
  74. unsigned max_threads;
  75. unsigned max_stack_entries;
  76. unsigned max_hw_contexts;
  77. unsigned max_gs_threads;
  78. unsigned sx_max_export_size;
  79. unsigned sx_max_export_pos_size;
  80. unsigned sx_max_export_smx_size;
  81. unsigned sq_num_cf_insts;
  82. };
  83. /* RV770, RV7300, RV710 */
  84. struct rv770_asic {
  85. unsigned max_pipes;
  86. unsigned max_tile_pipes;
  87. unsigned max_simds;
  88. unsigned max_backends;
  89. unsigned max_gprs;
  90. unsigned max_threads;
  91. unsigned max_stack_entries;
  92. unsigned max_hw_contexts;
  93. unsigned max_gs_threads;
  94. unsigned sx_max_export_size;
  95. unsigned sx_max_export_pos_size;
  96. unsigned sx_max_export_smx_size;
  97. unsigned sq_num_cf_insts;
  98. unsigned sx_num_of_sets;
  99. unsigned sc_prim_fifo_size;
  100. unsigned sc_hiz_tile_fifo_size;
  101. unsigned sc_earlyz_tile_fifo_fize;
  102. };
  103. #endif