Ben Skeggs | c007706 | 2012-07-26 08:51:21 +1000 | [diff] [blame] | 1 | #ifndef __NOUVEAU_ACPI_H__ |
| 2 | #define __NOUVEAU_ACPI_H__ |
| 3 | |
| 4 | #define ROM_BIOS_PAGE 4096 |
| 5 | |
Ben Hutchings | a91ed42 | 2013-02-20 02:57:32 +0000 | [diff] [blame] | 6 | #if defined(CONFIG_ACPI) && defined(CONFIG_X86) |
Dave Airlie | c839d74 | 2012-11-02 11:04:27 +1000 | [diff] [blame] | 7 | bool nouveau_is_optimus(void); |
| 8 | bool nouveau_is_v1_dsm(void); |
Ben Skeggs | c007706 | 2012-07-26 08:51:21 +1000 | [diff] [blame] | 9 | void nouveau_register_dsm_handler(void); |
| 10 | void nouveau_unregister_dsm_handler(void); |
| 11 | void nouveau_switcheroo_optimus_dsm(void); |
| 12 | int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); |
Ben Skeggs | 26c9e8e | 2015-08-20 14:54:23 +1000 | [diff] [blame] | 13 | bool nouveau_acpi_rom_supported(struct device *); |
Ben Skeggs | c007706 | 2012-07-26 08:51:21 +1000 | [diff] [blame] | 14 | void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); |
| 15 | #else |
Dave Airlie | c839d74 | 2012-11-02 11:04:27 +1000 | [diff] [blame] | 16 | static inline bool nouveau_is_optimus(void) { return false; }; |
| 17 | static inline bool nouveau_is_v1_dsm(void) { return false; }; |
Ben Skeggs | c007706 | 2012-07-26 08:51:21 +1000 | [diff] [blame] | 18 | static inline void nouveau_register_dsm_handler(void) {} |
| 19 | static inline void nouveau_unregister_dsm_handler(void) {} |
| 20 | static inline void nouveau_switcheroo_optimus_dsm(void) {} |
Ben Skeggs | 26c9e8e | 2015-08-20 14:54:23 +1000 | [diff] [blame] | 21 | static inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; } |
Ben Skeggs | c007706 | 2012-07-26 08:51:21 +1000 | [diff] [blame] | 22 | static inline int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len) { return -EINVAL; } |
| 23 | static inline void *nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return NULL; } |
| 24 | #endif |
| 25 | |
| 26 | #endif |