ovlygk104.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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. gk104_disp_ovly_mthd_base = {
  29. .mthd = 0x0000,
  30. .data = {
  31. { 0x0080, 0x665080 },
  32. { 0x0084, 0x665084 },
  33. { 0x0088, 0x665088 },
  34. { 0x008c, 0x66508c },
  35. { 0x0090, 0x665090 },
  36. { 0x0094, 0x665094 },
  37. { 0x00a0, 0x6650a0 },
  38. { 0x00a4, 0x6650a4 },
  39. { 0x00b0, 0x6650b0 },
  40. { 0x00b4, 0x6650b4 },
  41. { 0x00b8, 0x6650b8 },
  42. { 0x00c0, 0x6650c0 },
  43. { 0x00c4, 0x6650c4 },
  44. { 0x00e0, 0x6650e0 },
  45. { 0x00e4, 0x6650e4 },
  46. { 0x00e8, 0x6650e8 },
  47. { 0x0100, 0x665100 },
  48. { 0x0104, 0x665104 },
  49. { 0x0108, 0x665108 },
  50. { 0x010c, 0x66510c },
  51. { 0x0110, 0x665110 },
  52. { 0x0118, 0x665118 },
  53. { 0x011c, 0x66511c },
  54. { 0x0120, 0x665120 },
  55. { 0x0124, 0x665124 },
  56. { 0x0130, 0x665130 },
  57. { 0x0134, 0x665134 },
  58. { 0x0138, 0x665138 },
  59. { 0x013c, 0x66513c },
  60. { 0x0140, 0x665140 },
  61. { 0x0144, 0x665144 },
  62. { 0x0148, 0x665148 },
  63. { 0x014c, 0x66514c },
  64. { 0x0150, 0x665150 },
  65. { 0x0154, 0x665154 },
  66. { 0x0158, 0x665158 },
  67. { 0x015c, 0x66515c },
  68. { 0x0160, 0x665160 },
  69. { 0x0164, 0x665164 },
  70. { 0x0168, 0x665168 },
  71. { 0x016c, 0x66516c },
  72. { 0x0400, 0x665400 },
  73. { 0x0404, 0x665404 },
  74. { 0x0408, 0x665408 },
  75. { 0x040c, 0x66540c },
  76. { 0x0410, 0x665410 },
  77. {}
  78. }
  79. };
  80. const struct nv50_disp_chan_mthd
  81. gk104_disp_ovly_chan_mthd = {
  82. .name = "Overlay",
  83. .addr = 0x001000,
  84. .prev = -0x020000,
  85. .data = {
  86. { "Global", 1, &gk104_disp_ovly_mthd_base },
  87. {}
  88. }
  89. };
  90. const struct nv50_disp_dmac_oclass
  91. gk104_disp_ovly_oclass = {
  92. .base.oclass = GK104_DISP_OVERLAY_CONTROL_DMA,
  93. .base.minver = 0,
  94. .base.maxver = 0,
  95. .ctor = nv50_disp_ovly_new,
  96. .func = &gf119_disp_dmac_func,
  97. .mthd = &gk104_disp_ovly_chan_mthd,
  98. .chid = 5,
  99. };