dcb.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef __NVBIOS_DCB_H__
  2. #define __NVBIOS_DCB_H__
  3. enum dcb_output_type {
  4. DCB_OUTPUT_ANALOG = 0x0,
  5. DCB_OUTPUT_TV = 0x1,
  6. DCB_OUTPUT_TMDS = 0x2,
  7. DCB_OUTPUT_LVDS = 0x3,
  8. DCB_OUTPUT_DP = 0x6,
  9. DCB_OUTPUT_EOL = 0xe,
  10. DCB_OUTPUT_UNUSED = 0xf,
  11. DCB_OUTPUT_ANY = -1,
  12. };
  13. struct dcb_output {
  14. int index; /* may not be raw dcb index if merging has happened */
  15. u16 hasht;
  16. u16 hashm;
  17. enum dcb_output_type type;
  18. uint8_t i2c_index;
  19. uint8_t heads;
  20. uint8_t connector;
  21. uint8_t bus;
  22. uint8_t location;
  23. uint8_t or;
  24. uint8_t link;
  25. bool duallink_possible;
  26. uint8_t extdev;
  27. union {
  28. struct sor_conf {
  29. int link;
  30. } sorconf;
  31. struct {
  32. int maxfreq;
  33. } crtconf;
  34. struct {
  35. struct sor_conf sor;
  36. bool use_straps_for_mode;
  37. bool use_acpi_for_edid;
  38. bool use_power_scripts;
  39. } lvdsconf;
  40. struct {
  41. bool has_component_output;
  42. } tvconf;
  43. struct {
  44. struct sor_conf sor;
  45. int link_nr;
  46. int link_bw;
  47. } dpconf;
  48. struct {
  49. struct sor_conf sor;
  50. int slave_addr;
  51. } tmdsconf;
  52. };
  53. bool i2c_upper_default;
  54. };
  55. u16 dcb_table(struct nvkm_bios *, u8 *ver, u8 *hdr, u8 *ent, u8 *len);
  56. u16 dcb_outp(struct nvkm_bios *, u8 idx, u8 *ver, u8 *len);
  57. u16 dcb_outp_parse(struct nvkm_bios *, u8 idx, u8 *, u8 *,
  58. struct dcb_output *);
  59. u16 dcb_outp_match(struct nvkm_bios *, u16 type, u16 mask, u8 *, u8 *,
  60. struct dcb_output *);
  61. int dcb_outp_foreach(struct nvkm_bios *, void *data, int (*exec)
  62. (struct nvkm_bios *, void *, int index, u16 entry));
  63. #endif