head.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 "disp.h"
  5. #include "atom.h"
  6. #include "lut.h"
  7. #include "nouveau_crtc.h"
  8. struct nv50_head {
  9. const struct nv50_head_func *func;
  10. struct nouveau_crtc base;
  11. struct nv50_lut olut;
  12. };
  13. int nv50_head_create(struct drm_device *, int index);
  14. void nv50_head_flush_set(struct nv50_head *, struct nv50_head_atom *);
  15. void nv50_head_flush_clr(struct nv50_head *, struct nv50_head_atom *, bool y);
  16. struct nv50_head_func {
  17. void (*view)(struct nv50_head *, struct nv50_head_atom *);
  18. void (*mode)(struct nv50_head *, struct nv50_head_atom *);
  19. void (*olut)(struct nv50_head *, struct nv50_head_atom *);
  20. void (*olut_set)(struct nv50_head *, struct nv50_head_atom *);
  21. void (*olut_clr)(struct nv50_head *);
  22. void (*core_calc)(struct nv50_head *, struct nv50_head_atom *);
  23. void (*core_set)(struct nv50_head *, struct nv50_head_atom *);
  24. void (*core_clr)(struct nv50_head *);
  25. int (*curs_layout)(struct nv50_head *, struct nv50_wndw_atom *,
  26. struct nv50_head_atom *);
  27. int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *,
  28. struct nv50_head_atom *);
  29. void (*curs_set)(struct nv50_head *, struct nv50_head_atom *);
  30. void (*curs_clr)(struct nv50_head *);
  31. void (*base)(struct nv50_head *, struct nv50_head_atom *);
  32. void (*ovly)(struct nv50_head *, struct nv50_head_atom *);
  33. void (*dither)(struct nv50_head *, struct nv50_head_atom *);
  34. void (*procamp)(struct nv50_head *, struct nv50_head_atom *);
  35. void (*or)(struct nv50_head *, struct nv50_head_atom *);
  36. };
  37. extern const struct nv50_head_func head507d;
  38. void head507d_view(struct nv50_head *, struct nv50_head_atom *);
  39. void head507d_mode(struct nv50_head *, struct nv50_head_atom *);
  40. void head507d_olut(struct nv50_head *, struct nv50_head_atom *);
  41. void head507d_core_calc(struct nv50_head *, struct nv50_head_atom *);
  42. void head507d_core_clr(struct nv50_head *);
  43. int head507d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
  44. struct nv50_head_atom *);
  45. int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
  46. struct nv50_head_atom *);
  47. void head507d_base(struct nv50_head *, struct nv50_head_atom *);
  48. void head507d_ovly(struct nv50_head *, struct nv50_head_atom *);
  49. void head507d_dither(struct nv50_head *, struct nv50_head_atom *);
  50. void head507d_procamp(struct nv50_head *, struct nv50_head_atom *);
  51. extern const struct nv50_head_func head827d;
  52. extern const struct nv50_head_func head907d;
  53. void head907d_view(struct nv50_head *, struct nv50_head_atom *);
  54. void head907d_mode(struct nv50_head *, struct nv50_head_atom *);
  55. void head907d_olut(struct nv50_head *, struct nv50_head_atom *);
  56. void head907d_olut_set(struct nv50_head *, struct nv50_head_atom *);
  57. void head907d_olut_clr(struct nv50_head *);
  58. void head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
  59. void head907d_core_clr(struct nv50_head *);
  60. void head907d_curs_set(struct nv50_head *, struct nv50_head_atom *);
  61. void head907d_curs_clr(struct nv50_head *);
  62. void head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
  63. void head907d_procamp(struct nv50_head *, struct nv50_head_atom *);
  64. void head907d_or(struct nv50_head *, struct nv50_head_atom *);
  65. extern const struct nv50_head_func head917d;
  66. int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
  67. struct nv50_head_atom *);
  68. extern const struct nv50_head_func headc37d;
  69. #endif