blob: 2f03653aff86cf0cb8730acde70b0c965cbf2b8f [file] [log] [blame]
Ben Skeggsc0077062012-07-26 08:51:21 +10001#ifndef __NOUVEAU_ACPI_H__
2#define __NOUVEAU_ACPI_H__
3
4#define ROM_BIOS_PAGE 4096
5
Ben Hutchingsa91ed422013-02-20 02:57:32 +00006#if defined(CONFIG_ACPI) && defined(CONFIG_X86)
Dave Airliec839d742012-11-02 11:04:27 +10007bool nouveau_is_optimus(void);
8bool nouveau_is_v1_dsm(void);
Ben Skeggsc0077062012-07-26 08:51:21 +10009void nouveau_register_dsm_handler(void);
10void nouveau_unregister_dsm_handler(void);
11void nouveau_switcheroo_optimus_dsm(void);
12int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len);
Ben Skeggs26c9e8e2015-08-20 14:54:23 +100013bool nouveau_acpi_rom_supported(struct device *);
Ben Skeggsc0077062012-07-26 08:51:21 +100014void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *);
15#else
Dave Airliec839d742012-11-02 11:04:27 +100016static inline bool nouveau_is_optimus(void) { return false; };
17static inline bool nouveau_is_v1_dsm(void) { return false; };
Ben Skeggsc0077062012-07-26 08:51:21 +100018static inline void nouveau_register_dsm_handler(void) {}
19static inline void nouveau_unregister_dsm_handler(void) {}
20static inline void nouveau_switcheroo_optimus_dsm(void) {}
Ben Skeggs26c9e8e2015-08-20 14:54:23 +100021static inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; }
Ben Skeggsc0077062012-07-26 08:51:21 +100022static inline int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len) { return -EINVAL; }
23static inline void *nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return NULL; }
24#endif
25
26#endif