head507d.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. /*
  2. * Copyright 2018 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. #include "head.h"
  23. #include "core.h"
  24. #include <nvif/push507c.h>
  25. #include <nvhw/class/cl507d.h>
  26. int
  27. head507d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
  28. {
  29. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  30. const int i = head->base.index;
  31. int ret;
  32. if ((ret = PUSH_WAIT(push, 2)))
  33. return ret;
  34. PUSH_MTHD(push, NV507D, HEAD_SET_PROCAMP(i),
  35. NVDEF(NV507D, HEAD_SET_PROCAMP, COLOR_SPACE, RGB) |
  36. NVDEF(NV507D, HEAD_SET_PROCAMP, CHROMA_LPF, AUTO) |
  37. NVVAL(NV507D, HEAD_SET_PROCAMP, SAT_COS, asyh->procamp.sat.cos) |
  38. NVVAL(NV507D, HEAD_SET_PROCAMP, SAT_SINE, asyh->procamp.sat.sin) |
  39. NVDEF(NV507D, HEAD_SET_PROCAMP, TRANSITION, HARD));
  40. return 0;
  41. }
  42. int
  43. head507d_dither(struct nv50_head *head, struct nv50_head_atom *asyh)
  44. {
  45. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  46. const int i = head->base.index;
  47. int ret;
  48. if ((ret = PUSH_WAIT(push, 2)))
  49. return ret;
  50. PUSH_MTHD(push, NV507D, HEAD_SET_DITHER_CONTROL(i),
  51. NVVAL(NV507D, HEAD_SET_DITHER_CONTROL, ENABLE, asyh->dither.enable) |
  52. NVVAL(NV507D, HEAD_SET_DITHER_CONTROL, BITS, asyh->dither.bits) |
  53. NVVAL(NV507D, HEAD_SET_DITHER_CONTROL, MODE, asyh->dither.mode) |
  54. NVVAL(NV507D, HEAD_SET_DITHER_CONTROL, PHASE, 0));
  55. return 0;
  56. }
  57. int
  58. head507d_ovly(struct nv50_head *head, struct nv50_head_atom *asyh)
  59. {
  60. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  61. const int i = head->base.index;
  62. u32 bounds = 0;
  63. int ret;
  64. if (asyh->ovly.cpp) {
  65. switch (asyh->ovly.cpp) {
  66. case 4: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break;
  67. case 2: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break;
  68. default:
  69. WARN_ON(1);
  70. break;
  71. }
  72. bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, USABLE, TRUE);
  73. } else {
  74. bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16);
  75. }
  76. if ((ret = PUSH_WAIT(push, 2)))
  77. return ret;
  78. PUSH_MTHD(push, NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS(i), bounds);
  79. return 0;
  80. }
  81. int
  82. head507d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
  83. {
  84. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  85. const int i = head->base.index;
  86. u32 bounds = 0;
  87. int ret;
  88. if (asyh->base.cpp) {
  89. switch (asyh->base.cpp) {
  90. case 8: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_64); break;
  91. case 4: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_32); break;
  92. case 2: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_16); break;
  93. case 1: bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, PIXEL_DEPTH, BPP_8); break;
  94. default:
  95. WARN_ON(1);
  96. break;
  97. }
  98. bounds |= NVDEF(NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS, USABLE, TRUE);
  99. }
  100. if ((ret = PUSH_WAIT(push, 2)))
  101. return ret;
  102. PUSH_MTHD(push, NV507D, HEAD_SET_BASE_CHANNEL_USAGE_BOUNDS(i), bounds);
  103. return 0;
  104. }
  105. static int
  106. head507d_curs_clr(struct nv50_head *head)
  107. {
  108. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  109. const int i = head->base.index;
  110. int ret;
  111. if ((ret = PUSH_WAIT(push, 2)))
  112. return ret;
  113. PUSH_MTHD(push, NV507D, HEAD_SET_CONTROL_CURSOR(i),
  114. NVDEF(NV507D, HEAD_SET_CONTROL_CURSOR, ENABLE, DISABLE) |
  115. NVDEF(NV507D, HEAD_SET_CONTROL_CURSOR, FORMAT, A8R8G8B8) |
  116. NVDEF(NV507D, HEAD_SET_CONTROL_CURSOR, SIZE, W64_H64));
  117. return 0;
  118. }
  119. static int
  120. head507d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
  121. {
  122. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  123. const int i = head->base.index;
  124. int ret;
  125. if ((ret = PUSH_WAIT(push, 3)))
  126. return ret;
  127. PUSH_MTHD(push, NV507D, HEAD_SET_CONTROL_CURSOR(i),
  128. NVDEF(NV507D, HEAD_SET_CONTROL_CURSOR, ENABLE, ENABLE) |
  129. NVVAL(NV507D, HEAD_SET_CONTROL_CURSOR, FORMAT, asyh->curs.format) |
  130. NVVAL(NV507D, HEAD_SET_CONTROL_CURSOR, SIZE, asyh->curs.layout) |
  131. NVVAL(NV507D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_X, 0) |
  132. NVVAL(NV507D, HEAD_SET_CONTROL_CURSOR, HOT_SPOT_Y, 0) |
  133. NVDEF(NV507D, HEAD_SET_CONTROL_CURSOR, COMPOSITION, ALPHA_BLEND) |
  134. NVDEF(NV507D, HEAD_SET_CONTROL_CURSOR, SUB_OWNER, NONE),
  135. HEAD_SET_OFFSET_CURSOR(i), asyh->curs.offset >> 8);
  136. return 0;
  137. }
  138. int
  139. head507d_curs_format(struct nv50_head *head, struct nv50_wndw_atom *asyw,
  140. struct nv50_head_atom *asyh)
  141. {
  142. switch (asyw->image.format) {
  143. case 0xcf: asyh->curs.format = NV507D_HEAD_SET_CONTROL_CURSOR_FORMAT_A8R8G8B8; break;
  144. default:
  145. WARN_ON(1);
  146. return -EINVAL;
  147. }
  148. return 0;
  149. }
  150. int
  151. head507d_curs_layout(struct nv50_head *head, struct nv50_wndw_atom *asyw,
  152. struct nv50_head_atom *asyh)
  153. {
  154. switch (asyw->image.w) {
  155. case 32: asyh->curs.layout = NV507D_HEAD_SET_CONTROL_CURSOR_SIZE_W32_H32; break;
  156. case 64: asyh->curs.layout = NV507D_HEAD_SET_CONTROL_CURSOR_SIZE_W64_H64; break;
  157. default:
  158. return -EINVAL;
  159. }
  160. return 0;
  161. }
  162. int
  163. head507d_core_clr(struct nv50_head *head)
  164. {
  165. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  166. const int i = head->base.index;
  167. int ret;
  168. if ((ret = PUSH_WAIT(push, 2)))
  169. return ret;
  170. PUSH_MTHD(push, NV507D, HEAD_SET_CONTEXT_DMA_ISO(i), 0x00000000);
  171. return 0;
  172. }
  173. static int
  174. head507d_core_set(struct nv50_head *head, struct nv50_head_atom *asyh)
  175. {
  176. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  177. const int i = head->base.index;
  178. int ret;
  179. if ((ret = PUSH_WAIT(push, 9)))
  180. return ret;
  181. PUSH_MTHD(push, NV507D, HEAD_SET_OFFSET(i, 0),
  182. NVVAL(NV507D, HEAD_SET_OFFSET, ORIGIN, asyh->core.offset >> 8));
  183. PUSH_MTHD(push, NV507D, HEAD_SET_SIZE(i),
  184. NVVAL(NV507D, HEAD_SET_SIZE, WIDTH, asyh->core.w) |
  185. NVVAL(NV507D, HEAD_SET_SIZE, HEIGHT, asyh->core.h),
  186. HEAD_SET_STORAGE(i),
  187. NVVAL(NV507D, HEAD_SET_STORAGE, BLOCK_HEIGHT, asyh->core.blockh) |
  188. NVVAL(NV507D, HEAD_SET_STORAGE, PITCH, asyh->core.pitch >> 8) |
  189. NVVAL(NV507D, HEAD_SET_STORAGE, PITCH, asyh->core.blocks) |
  190. NVVAL(NV507D, HEAD_SET_STORAGE, MEMORY_LAYOUT, asyh->core.layout),
  191. HEAD_SET_PARAMS(i),
  192. NVVAL(NV507D, HEAD_SET_PARAMS, FORMAT, asyh->core.format) |
  193. NVVAL(NV507D, HEAD_SET_PARAMS, KIND, asyh->core.kind) |
  194. NVDEF(NV507D, HEAD_SET_PARAMS, PART_STRIDE, PARTSTRIDE_256),
  195. HEAD_SET_CONTEXT_DMA_ISO(i),
  196. NVVAL(NV507D, HEAD_SET_CONTEXT_DMA_ISO, HANDLE, asyh->core.handle));
  197. PUSH_MTHD(push, NV507D, HEAD_SET_VIEWPORT_POINT_IN(i, 0),
  198. NVVAL(NV507D, HEAD_SET_VIEWPORT_POINT_IN, X, asyh->core.x) |
  199. NVVAL(NV507D, HEAD_SET_VIEWPORT_POINT_IN, Y, asyh->core.y));
  200. /* EVO will complain with INVALID_STATE if we have an
  201. * active cursor and (re)specify HeadSetContextDmaIso
  202. * without also updating HeadSetOffsetCursor.
  203. */
  204. asyh->set.curs = asyh->curs.visible;
  205. asyh->set.olut = asyh->olut.handle != 0;
  206. return 0;
  207. }
  208. void
  209. head507d_core_calc(struct nv50_head *head, struct nv50_head_atom *asyh)
  210. {
  211. struct nv50_disp *disp = nv50_disp(head->base.base.dev);
  212. if ((asyh->core.visible = (asyh->base.cpp != 0))) {
  213. asyh->core.x = asyh->base.x;
  214. asyh->core.y = asyh->base.y;
  215. asyh->core.w = asyh->base.w;
  216. asyh->core.h = asyh->base.h;
  217. } else
  218. if ((asyh->core.visible = (asyh->ovly.cpp != 0)) ||
  219. (asyh->core.visible = asyh->curs.visible)) {
  220. /*XXX: We need to either find some way of having the
  221. * primary base layer appear black, while still
  222. * being able to display the other layers, or we
  223. * need to allocate a dummy black surface here.
  224. */
  225. asyh->core.x = 0;
  226. asyh->core.y = 0;
  227. asyh->core.w = asyh->state.mode.hdisplay;
  228. asyh->core.h = asyh->state.mode.vdisplay;
  229. }
  230. asyh->core.handle = disp->core->chan.vram.handle;
  231. asyh->core.offset = 0;
  232. asyh->core.format = NV507D_HEAD_SET_PARAMS_FORMAT_A8R8G8B8;
  233. asyh->core.kind = NV507D_HEAD_SET_PARAMS_KIND_KIND_PITCH;
  234. asyh->core.layout = NV507D_HEAD_SET_STORAGE_MEMORY_LAYOUT_PITCH;
  235. asyh->core.blockh = NV507D_HEAD_SET_STORAGE_BLOCK_HEIGHT_ONE_GOB;
  236. asyh->core.blocks = 0;
  237. asyh->core.pitch = ALIGN(asyh->core.w, 64) * 4;
  238. }
  239. static int
  240. head507d_olut_clr(struct nv50_head *head)
  241. {
  242. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  243. const int i = head->base.index;
  244. int ret;
  245. if ((ret = PUSH_WAIT(push, 2)))
  246. return ret;
  247. PUSH_MTHD(push, NV507D, HEAD_SET_BASE_LUT_LO(i),
  248. NVDEF(NV507D, HEAD_SET_BASE_LUT_LO, ENABLE, DISABLE));
  249. return 0;
  250. }
  251. static int
  252. head507d_olut_set(struct nv50_head *head, struct nv50_head_atom *asyh)
  253. {
  254. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  255. const int i = head->base.index;
  256. int ret;
  257. if ((ret = PUSH_WAIT(push, 3)))
  258. return ret;
  259. PUSH_MTHD(push, NV507D, HEAD_SET_BASE_LUT_LO(i),
  260. NVDEF(NV507D, HEAD_SET_BASE_LUT_LO, ENABLE, ENABLE) |
  261. NVVAL(NV507D, HEAD_SET_BASE_LUT_LO, MODE, asyh->olut.mode) |
  262. NVVAL(NV507D, HEAD_SET_BASE_LUT_LO, ORIGIN, 0),
  263. HEAD_SET_BASE_LUT_HI(i),
  264. NVVAL(NV507D, HEAD_SET_BASE_LUT_HI, ORIGIN, asyh->olut.offset >> 8));
  265. return 0;
  266. }
  267. static void
  268. head507d_olut_load(struct drm_color_lut *in, int size, void __iomem *mem)
  269. {
  270. for (; size--; in++, mem += 8) {
  271. writew(drm_color_lut_extract(in-> red, 11) << 3, mem + 0);
  272. writew(drm_color_lut_extract(in->green, 11) << 3, mem + 2);
  273. writew(drm_color_lut_extract(in-> blue, 11) << 3, mem + 4);
  274. }
  275. /* INTERPOLATE modes require a "next" entry to interpolate with,
  276. * so we replicate the last entry to deal with this for now.
  277. */
  278. writew(readw(mem - 8), mem + 0);
  279. writew(readw(mem - 6), mem + 2);
  280. writew(readw(mem - 4), mem + 4);
  281. }
  282. bool
  283. head507d_olut(struct nv50_head *head, struct nv50_head_atom *asyh, int size)
  284. {
  285. if (size != 256)
  286. return false;
  287. if (asyh->base.cpp == 1)
  288. asyh->olut.mode = NV507D_HEAD_SET_BASE_LUT_LO_MODE_LORES;
  289. else
  290. asyh->olut.mode = NV507D_HEAD_SET_BASE_LUT_LO_MODE_HIRES;
  291. asyh->olut.load = head507d_olut_load;
  292. return true;
  293. }
  294. int
  295. head507d_mode(struct nv50_head *head, struct nv50_head_atom *asyh)
  296. {
  297. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  298. struct nv50_head_mode *m = &asyh->mode;
  299. const int i = head->base.index;
  300. int ret;
  301. if ((ret = PUSH_WAIT(push, 13)))
  302. return ret;
  303. PUSH_MTHD(push, NV507D, HEAD_SET_PIXEL_CLOCK(i),
  304. NVVAL(NV507D, HEAD_SET_PIXEL_CLOCK, FREQUENCY, m->clock) |
  305. NVDEF(NV507D, HEAD_SET_PIXEL_CLOCK, MODE, CLK_CUSTOM) |
  306. NVDEF(NV507D, HEAD_SET_PIXEL_CLOCK, ADJ1000DIV1001, FALSE) |
  307. NVDEF(NV507D, HEAD_SET_PIXEL_CLOCK, NOT_DRIVER, FALSE),
  308. HEAD_SET_CONTROL(i),
  309. NVVAL(NV507D, HEAD_SET_CONTROL, STRUCTURE, m->interlace));
  310. PUSH_MTHD(push, NV507D, HEAD_SET_OVERSCAN_COLOR(i),
  311. NVVAL(NV507D, HEAD_SET_OVERSCAN_COLOR, RED, 0) |
  312. NVVAL(NV507D, HEAD_SET_OVERSCAN_COLOR, GRN, 0) |
  313. NVVAL(NV507D, HEAD_SET_OVERSCAN_COLOR, BLU, 0),
  314. HEAD_SET_RASTER_SIZE(i),
  315. NVVAL(NV507D, HEAD_SET_RASTER_SIZE, WIDTH, m->h.active) |
  316. NVVAL(NV507D, HEAD_SET_RASTER_SIZE, HEIGHT, m->v.active),
  317. HEAD_SET_RASTER_SYNC_END(i),
  318. NVVAL(NV507D, HEAD_SET_RASTER_SYNC_END, X, m->h.synce) |
  319. NVVAL(NV507D, HEAD_SET_RASTER_SYNC_END, Y, m->v.synce),
  320. HEAD_SET_RASTER_BLANK_END(i),
  321. NVVAL(NV507D, HEAD_SET_RASTER_BLANK_END, X, m->h.blanke) |
  322. NVVAL(NV507D, HEAD_SET_RASTER_BLANK_END, Y, m->v.blanke),
  323. HEAD_SET_RASTER_BLANK_START(i),
  324. NVVAL(NV507D, HEAD_SET_RASTER_BLANK_START, X, m->h.blanks) |
  325. NVVAL(NV507D, HEAD_SET_RASTER_BLANK_START, Y, m->v.blanks),
  326. HEAD_SET_RASTER_VERT_BLANK2(i),
  327. NVVAL(NV507D, HEAD_SET_RASTER_VERT_BLANK2, YSTART, m->v.blank2s) |
  328. NVVAL(NV507D, HEAD_SET_RASTER_VERT_BLANK2, YEND, m->v.blank2e),
  329. HEAD_SET_RASTER_VERT_BLANK_DMI(i),
  330. NVVAL(NV507D, HEAD_SET_RASTER_VERT_BLANK_DMI, DURATION, m->v.blankus));
  331. PUSH_MTHD(push, NV507D, HEAD_SET_DEFAULT_BASE_COLOR(i),
  332. NVVAL(NV507D, HEAD_SET_DEFAULT_BASE_COLOR, RED, 0) |
  333. NVVAL(NV507D, HEAD_SET_DEFAULT_BASE_COLOR, GREEN, 0) |
  334. NVVAL(NV507D, HEAD_SET_DEFAULT_BASE_COLOR, BLUE, 0));
  335. return 0;
  336. }
  337. int
  338. head507d_view(struct nv50_head *head, struct nv50_head_atom *asyh)
  339. {
  340. struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
  341. const int i = head->base.index;
  342. int ret;
  343. if ((ret = PUSH_WAIT(push, 7)))
  344. return ret;
  345. PUSH_MTHD(push, NV507D, HEAD_SET_CONTROL_OUTPUT_SCALER(i),
  346. NVDEF(NV507D, HEAD_SET_CONTROL_OUTPUT_SCALER, VERTICAL_TAPS, TAPS_1) |
  347. NVDEF(NV507D, HEAD_SET_CONTROL_OUTPUT_SCALER, HORIZONTAL_TAPS, TAPS_1) |
  348. NVVAL(NV507D, HEAD_SET_CONTROL_OUTPUT_SCALER, HRESPONSE_BIAS, 0) |
  349. NVVAL(NV507D, HEAD_SET_CONTROL_OUTPUT_SCALER, VRESPONSE_BIAS, 0));
  350. PUSH_MTHD(push, NV507D, HEAD_SET_VIEWPORT_SIZE_IN(i),
  351. NVVAL(NV507D, HEAD_SET_VIEWPORT_SIZE_IN, WIDTH, asyh->view.iW) |
  352. NVVAL(NV507D, HEAD_SET_VIEWPORT_SIZE_IN, HEIGHT, asyh->view.iH));
  353. PUSH_MTHD(push, NV507D, HEAD_SET_VIEWPORT_SIZE_OUT(i),
  354. NVVAL(NV507D, HEAD_SET_VIEWPORT_SIZE_OUT, WIDTH, asyh->view.oW) |
  355. NVVAL(NV507D, HEAD_SET_VIEWPORT_SIZE_OUT, HEIGHT, asyh->view.oH),
  356. HEAD_SET_VIEWPORT_SIZE_OUT_MIN(i),
  357. NVVAL(NV507D, HEAD_SET_VIEWPORT_SIZE_OUT_MIN, WIDTH, asyh->view.oW) |
  358. NVVAL(NV507D, HEAD_SET_VIEWPORT_SIZE_OUT_MIN, HEIGHT, asyh->view.oH));
  359. return 0;
  360. }
  361. const struct nv50_head_func
  362. head507d = {
  363. .view = head507d_view,
  364. .mode = head507d_mode,
  365. .olut = head507d_olut,
  366. .olut_size = 256,
  367. .olut_set = head507d_olut_set,
  368. .olut_clr = head507d_olut_clr,
  369. .core_calc = head507d_core_calc,
  370. .core_set = head507d_core_set,
  371. .core_clr = head507d_core_clr,
  372. .curs_layout = head507d_curs_layout,
  373. .curs_format = head507d_curs_format,
  374. .curs_set = head507d_curs_set,
  375. .curs_clr = head507d_curs_clr,
  376. .base = head507d_base,
  377. .ovly = head507d_ovly,
  378. .dither = head507d_dither,
  379. .procamp = head507d_procamp,
  380. };