head.h 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #ifndef __NV50_KMS_HEAD_H__
  2. #define __NV50_KMS_HEAD_H__
  3. #define nv50_head(c) container_of((c), struct nv50_head, base.base)
  4. #include <linux/workqueue.h>
  5. #include "disp.h"
  6. #include "atom.h"
  7. #include "crc.h"
  8. #include "lut.h"
  9. #include "nouveau_crtc.h"
  10. #include "nouveau_encoder.h"
  11. struct nv50_head {
  12. const struct nv50_head_func *func;
  13. struct nouveau_crtc base;
  14. struct nv50_crc crc;
  15. struct nv50_lut olut;
  16. struct nv50_msto *msto;
  17. };
  18. struct nv50_head *nv50_head_create(struct drm_device *, int index);
  19. void nv50_head_flush_set(struct nv50_head *head, struct nv50_head_atom *asyh);
  20. void nv50_head_flush_set_wndw(struct nv50_head *head, struct nv50_head_atom *asyh);
  21. void nv50_head_flush_clr(struct nv50_head *head,
  22. struct nv50_head_atom *asyh, bool flush);
  23. struct nv50_head_func {
  24. int (*view)(struct nv50_head *, struct nv50_head_atom *);
  25. int (*mode)(struct nv50_head *, struct nv50_head_atom *);
  26. bool (*olut)(struct nv50_head *, struct nv50_head_atom *, int);
  27. bool (*ilut_check)(int size);
  28. bool olut_identity;
  29. int olut_size;
  30. int (*olut_set)(struct nv50_head *, struct nv50_head_atom *);
  31. int (*olut_clr)(struct nv50_head *);
  32. void (*core_calc)(struct nv50_head *, struct nv50_head_atom *);
  33. int (*core_set)(struct nv50_head *, struct nv50_head_atom *);
  34. int (*core_clr)(struct nv50_head *);
  35. int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *,
  36. struct nv50_head_atom *);
  37. int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *,
  38. struct nv50_head_atom *);
  39. int (*curs_set)(struct nv50_head *, struct nv50_head_atom *);
  40. int (*curs_clr)(struct nv50_head *);
  41. int (*base)(struct nv50_head *, struct nv50_head_atom *);
  42. int (*ovly)(struct nv50_head *, struct nv50_head_atom *);
  43. int (*dither)(struct nv50_head *, struct nv50_head_atom *);
  44. int (*procamp)(struct nv50_head *, struct nv50_head_atom *);
  45. int (*or)(struct nv50_head *, struct nv50_head_atom *);
  46. void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *);
  47. };
  48. extern const struct nv50_head_func head507d;
  49. int head507d_view(struct nv50_head *, struct nv50_head_atom *);
  50. int head507d_mode(struct nv50_head *, struct nv50_head_atom *);
  51. bool head507d_olut(struct nv50_head *, struct nv50_head_atom *, int);
  52. void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *);
  53. int head507d_core_clr(struct nv50_head *);
  54. int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
  55. struct nv50_head_atom *);
  56. int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
  57. struct nv50_head_atom *);
  58. int head507d_base(struct nv50_head *, struct nv50_head_atom *);
  59. int head507d_ovly(struct nv50_head *, struct nv50_head_atom *);
  60. int head507d_dither(struct nv50_head *, struct nv50_head_atom *);
  61. int head507d_procamp(struct nv50_head *, struct nv50_head_atom *);
  62. extern const struct nv50_head_func head827d;
  63. extern const struct nv50_head_func head907d;
  64. int head907d_view(struct nv50_head *, struct nv50_head_atom *);
  65. int head907d_mode(struct nv50_head *, struct nv50_head_atom *);
  66. bool head907d_olut(struct nv50_head *, struct nv50_head_atom *, int);
  67. bool head907d_ilut_check(int size);
  68. int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *);
  69. int head907d_olut_clr(struct nv50_head *);
  70. int head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
  71. int head907d_core_clr(struct nv50_head *);
  72. int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *);
  73. int head907d_curs_clr(struct nv50_head *);
  74. int head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
  75. int head907d_procamp(struct nv50_head *, struct nv50_head_atom *);
  76. int head907d_or(struct nv50_head *, struct nv50_head_atom *);
  77. extern const struct nv50_head_func head917d;
  78. int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
  79. struct nv50_head_atom *);
  80. extern const struct nv50_head_func headc37d;
  81. int headc37d_view(struct nv50_head *, struct nv50_head_atom *);
  82. int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
  83. struct nv50_head_atom *);
  84. int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *);
  85. int headc37d_curs_clr(struct nv50_head *);
  86. int headc37d_dither(struct nv50_head *, struct nv50_head_atom *);
  87. void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *);
  88. extern const struct nv50_head_func headc57d;
  89. #endif