si_reg.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * Copyright 2010 Advanced Micro Devices, Inc.
  3. *
  4. * Permission is hereby granted, free of charge, to any person obtaining a
  5. * copy of this software and associated documentation files (the "Software"),
  6. * to deal in the Software without restriction, including without limitation
  7. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  8. * and/or sell copies of the Software, and to permit persons to whom the
  9. * Software is furnished to do so, subject to the following conditions:
  10. *
  11. * The above copyright notice and this permission notice shall be included in
  12. * all copies or substantial portions of the Software.
  13. *
  14. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  17. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  18. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  19. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  20. * OTHER DEALINGS IN THE SOFTWARE.
  21. *
  22. * Authors: Alex Deucher
  23. */
  24. #ifndef __SI_REG_H__
  25. #define __SI_REG_H__
  26. /* SI */
  27. #define SI_DC_GPIO_HPD_MASK 0x65b0
  28. #define SI_DC_GPIO_HPD_A 0x65b4
  29. #define SI_DC_GPIO_HPD_EN 0x65b8
  30. #define SI_DC_GPIO_HPD_Y 0x65bc
  31. #define SI_GRPH_CONTROL 0x6804
  32. # define SI_GRPH_DEPTH(x) (((x) & 0x3) << 0)
  33. # define SI_GRPH_DEPTH_8BPP 0
  34. # define SI_GRPH_DEPTH_16BPP 1
  35. # define SI_GRPH_DEPTH_32BPP 2
  36. # define SI_GRPH_NUM_BANKS(x) (((x) & 0x3) << 2)
  37. # define SI_ADDR_SURF_2_BANK 0
  38. # define SI_ADDR_SURF_4_BANK 1
  39. # define SI_ADDR_SURF_8_BANK 2
  40. # define SI_ADDR_SURF_16_BANK 3
  41. # define SI_GRPH_Z(x) (((x) & 0x3) << 4)
  42. # define SI_GRPH_BANK_WIDTH(x) (((x) & 0x3) << 6)
  43. # define SI_ADDR_SURF_BANK_WIDTH_1 0
  44. # define SI_ADDR_SURF_BANK_WIDTH_2 1
  45. # define SI_ADDR_SURF_BANK_WIDTH_4 2
  46. # define SI_ADDR_SURF_BANK_WIDTH_8 3
  47. # define SI_GRPH_FORMAT(x) (((x) & 0x7) << 8)
  48. /* 8 BPP */
  49. # define SI_GRPH_FORMAT_INDEXED 0
  50. /* 16 BPP */
  51. # define SI_GRPH_FORMAT_ARGB1555 0
  52. # define SI_GRPH_FORMAT_ARGB565 1
  53. # define SI_GRPH_FORMAT_ARGB4444 2
  54. # define SI_GRPH_FORMAT_AI88 3
  55. # define SI_GRPH_FORMAT_MONO16 4
  56. # define SI_GRPH_FORMAT_BGRA5551 5
  57. /* 32 BPP */
  58. # define SI_GRPH_FORMAT_ARGB8888 0
  59. # define SI_GRPH_FORMAT_ARGB2101010 1
  60. # define SI_GRPH_FORMAT_32BPP_DIG 2
  61. # define SI_GRPH_FORMAT_8B_ARGB2101010 3
  62. # define SI_GRPH_FORMAT_BGRA1010102 4
  63. # define SI_GRPH_FORMAT_8B_BGRA1010102 5
  64. # define SI_GRPH_FORMAT_RGB111110 6
  65. # define SI_GRPH_FORMAT_BGR101111 7
  66. # define SI_GRPH_BANK_HEIGHT(x) (((x) & 0x3) << 11)
  67. # define SI_ADDR_SURF_BANK_HEIGHT_1 0
  68. # define SI_ADDR_SURF_BANK_HEIGHT_2 1
  69. # define SI_ADDR_SURF_BANK_HEIGHT_4 2
  70. # define SI_ADDR_SURF_BANK_HEIGHT_8 3
  71. # define SI_GRPH_TILE_SPLIT(x) (((x) & 0x7) << 13)
  72. # define SI_ADDR_SURF_TILE_SPLIT_64B 0
  73. # define SI_ADDR_SURF_TILE_SPLIT_128B 1
  74. # define SI_ADDR_SURF_TILE_SPLIT_256B 2
  75. # define SI_ADDR_SURF_TILE_SPLIT_512B 3
  76. # define SI_ADDR_SURF_TILE_SPLIT_1KB 4
  77. # define SI_ADDR_SURF_TILE_SPLIT_2KB 5
  78. # define SI_ADDR_SURF_TILE_SPLIT_4KB 6
  79. # define SI_GRPH_MACRO_TILE_ASPECT(x) (((x) & 0x3) << 18)
  80. # define SI_ADDR_SURF_MACRO_TILE_ASPECT_1 0
  81. # define SI_ADDR_SURF_MACRO_TILE_ASPECT_2 1
  82. # define SI_ADDR_SURF_MACRO_TILE_ASPECT_4 2
  83. # define SI_ADDR_SURF_MACRO_TILE_ASPECT_8 3
  84. # define SI_GRPH_ARRAY_MODE(x) (((x) & 0x7) << 20)
  85. # define SI_GRPH_ARRAY_LINEAR_GENERAL 0
  86. # define SI_GRPH_ARRAY_LINEAR_ALIGNED 1
  87. # define SI_GRPH_ARRAY_1D_TILED_THIN1 2
  88. # define SI_GRPH_ARRAY_2D_TILED_THIN1 4
  89. # define SI_GRPH_PIPE_CONFIG(x) (((x) & 0x1f) << 24)
  90. # define SI_ADDR_SURF_P2 0
  91. # define SI_ADDR_SURF_P4_8x16 4
  92. # define SI_ADDR_SURF_P4_16x16 5
  93. # define SI_ADDR_SURF_P4_16x32 6
  94. # define SI_ADDR_SURF_P4_32x32 7
  95. # define SI_ADDR_SURF_P8_16x16_8x16 8
  96. # define SI_ADDR_SURF_P8_16x32_8x16 9
  97. # define SI_ADDR_SURF_P8_32x32_8x16 10
  98. # define SI_ADDR_SURF_P8_16x32_16x16 11
  99. # define SI_ADDR_SURF_P8_32x32_16x16 12
  100. # define SI_ADDR_SURF_P8_32x32_16x32 13
  101. # define SI_ADDR_SURF_P8_32x64_32x32 14
  102. #endif