1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NOUVEAU_ACPI_H__ 3 #define __NOUVEAU_ACPI_H__ 4 5 #define ROM_BIOS_PAGE 4096 6 7 #if defined(CONFIG_ACPI) && defined(CONFIG_X86) 8 bool nouveau_is_optimus(void); 9 bool nouveau_is_v1_dsm(void); 10 void nouveau_register_dsm_handler(void); 11 void nouveau_unregister_dsm_handler(void); 12 void nouveau_switcheroo_optimus_dsm(void); 13 void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); 14 bool nouveau_acpi_video_backlight_use_native(void); 15 void nouveau_acpi_video_register_backlight(void); 16 #else nouveau_is_optimus(void)17static inline bool nouveau_is_optimus(void) { return false; }; nouveau_is_v1_dsm(void)18static inline bool nouveau_is_v1_dsm(void) { return false; }; nouveau_register_dsm_handler(void)19static inline void nouveau_register_dsm_handler(void) {} nouveau_unregister_dsm_handler(void)20static inline void nouveau_unregister_dsm_handler(void) {} nouveau_switcheroo_optimus_dsm(void)21static inline void nouveau_switcheroo_optimus_dsm(void) {} nouveau_acpi_edid(struct drm_device * dev,struct drm_connector * connector)22static inline void *nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return NULL; } nouveau_acpi_video_backlight_use_native(void)23static inline bool nouveau_acpi_video_backlight_use_native(void) { return true; } nouveau_acpi_video_register_backlight(void)24static inline void nouveau_acpi_video_register_backlight(void) {} 25 #endif 26 27 #endif 28