basegf119.c 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /*
  2. * Copyright 2012 Red Hat 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: Ben Skeggs
  23. */
  24. #include "dmacnv50.h"
  25. #include "rootnv50.h"
  26. #include <nvif/class.h>
  27. static const struct nv50_disp_mthd_list
  28. gf119_disp_base_mthd_base = {
  29. .mthd = 0x0000,
  30. .addr = 0x000000,
  31. .data = {
  32. { 0x0080, 0x661080 },
  33. { 0x0084, 0x661084 },
  34. { 0x0088, 0x661088 },
  35. { 0x008c, 0x66108c },
  36. { 0x0090, 0x661090 },
  37. { 0x0094, 0x661094 },
  38. { 0x00a0, 0x6610a0 },
  39. { 0x00a4, 0x6610a4 },
  40. { 0x00c0, 0x6610c0 },
  41. { 0x00c4, 0x6610c4 },
  42. { 0x00c8, 0x6610c8 },
  43. { 0x00cc, 0x6610cc },
  44. { 0x00e0, 0x6610e0 },
  45. { 0x00e4, 0x6610e4 },
  46. { 0x00e8, 0x6610e8 },
  47. { 0x00ec, 0x6610ec },
  48. { 0x00fc, 0x6610fc },
  49. { 0x0100, 0x661100 },
  50. { 0x0104, 0x661104 },
  51. { 0x0108, 0x661108 },
  52. { 0x010c, 0x66110c },
  53. { 0x0110, 0x661110 },
  54. { 0x0114, 0x661114 },
  55. { 0x0118, 0x661118 },
  56. { 0x011c, 0x66111c },
  57. { 0x0130, 0x661130 },
  58. { 0x0134, 0x661134 },
  59. { 0x0138, 0x661138 },
  60. { 0x013c, 0x66113c },
  61. { 0x0140, 0x661140 },
  62. { 0x0144, 0x661144 },
  63. { 0x0148, 0x661148 },
  64. { 0x014c, 0x66114c },
  65. { 0x0150, 0x661150 },
  66. { 0x0154, 0x661154 },
  67. { 0x0158, 0x661158 },
  68. { 0x015c, 0x66115c },
  69. { 0x0160, 0x661160 },
  70. { 0x0164, 0x661164 },
  71. { 0x0168, 0x661168 },
  72. { 0x016c, 0x66116c },
  73. {}
  74. }
  75. };
  76. static const struct nv50_disp_mthd_list
  77. gf119_disp_base_mthd_image = {
  78. .mthd = 0x0020,
  79. .addr = 0x000020,
  80. .data = {
  81. { 0x0400, 0x661400 },
  82. { 0x0404, 0x661404 },
  83. { 0x0408, 0x661408 },
  84. { 0x040c, 0x66140c },
  85. { 0x0410, 0x661410 },
  86. {}
  87. }
  88. };
  89. const struct nv50_disp_chan_mthd
  90. gf119_disp_base_chan_mthd = {
  91. .name = "Base",
  92. .addr = 0x001000,
  93. .prev = -0x020000,
  94. .data = {
  95. { "Global", 1, &gf119_disp_base_mthd_base },
  96. { "Image", 2, &gf119_disp_base_mthd_image },
  97. {}
  98. }
  99. };
  100. const struct nv50_disp_dmac_oclass
  101. gf119_disp_base_oclass = {
  102. .base.oclass = GF110_DISP_BASE_CHANNEL_DMA,
  103. .base.minver = 0,
  104. .base.maxver = 0,
  105. .ctor = nv50_disp_base_new,
  106. .func = &gf119_disp_dmac_func,
  107. .mthd = &gf119_disp_base_chan_mthd,
  108. .chid = 1,
  109. };