video.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef __ACPI_VIDEO_H
  2. #define __ACPI_VIDEO_H
  3. #include <linux/errno.h> /* for ENODEV */
  4. struct acpi_device;
  5. #define ACPI_VIDEO_CLASS "video"
  6. #define ACPI_VIDEO_DISPLAY_CRT 1
  7. #define ACPI_VIDEO_DISPLAY_TV 2
  8. #define ACPI_VIDEO_DISPLAY_DVI 3
  9. #define ACPI_VIDEO_DISPLAY_LCD 4
  10. #define ACPI_VIDEO_DISPLAY_LEGACY_MONITOR 0x0100
  11. #define ACPI_VIDEO_DISPLAY_LEGACY_PANEL 0x0110
  12. #define ACPI_VIDEO_DISPLAY_LEGACY_TV 0x0200
  13. enum acpi_backlight_type {
  14. acpi_backlight_undef = -1,
  15. acpi_backlight_none = 0,
  16. acpi_backlight_video,
  17. acpi_backlight_vendor,
  18. acpi_backlight_native,
  19. };
  20. #if IS_ENABLED(CONFIG_ACPI_VIDEO)
  21. extern int acpi_video_register(void);
  22. extern void acpi_video_unregister(void);
  23. extern int acpi_video_get_edid(struct acpi_device *device, int type,
  24. int device_id, void **edid);
  25. extern enum acpi_backlight_type acpi_video_get_backlight_type(void);
  26. extern void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type);
  27. #else
  28. static inline int acpi_video_register(void) { return 0; }
  29. static inline void acpi_video_unregister(void) { return; }
  30. static inline int acpi_video_get_edid(struct acpi_device *device, int type,
  31. int device_id, void **edid)
  32. {
  33. return -ENODEV;
  34. }
  35. static inline enum acpi_backlight_type acpi_video_get_backlight_type(void)
  36. {
  37. return acpi_backlight_vendor;
  38. }
  39. static inline void acpi_video_set_dmi_backlight_type(enum acpi_backlight_type type)
  40. {
  41. }
  42. #endif
  43. #endif