]> git.proxmox.com Git - mirror_ubuntu-kernels.git/blame - drivers/gpu/drm/nouveau/nouveau_acpi.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-kernels.git] / drivers / gpu / drm / nouveau / nouveau_acpi.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
c0077061
BS
2#ifndef __NOUVEAU_ACPI_H__
3#define __NOUVEAU_ACPI_H__
4
5#define ROM_BIOS_PAGE 4096
6
a91ed42d 7#if defined(CONFIG_ACPI) && defined(CONFIG_X86)
c839d748
DA
8bool nouveau_is_optimus(void);
9bool nouveau_is_v1_dsm(void);
c0077061
BS
10void nouveau_register_dsm_handler(void);
11void nouveau_unregister_dsm_handler(void);
12void nouveau_switcheroo_optimus_dsm(void);
13int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len);
26c9e8ef 14bool nouveau_acpi_rom_supported(struct device *);
c0077061
BS
15void *nouveau_acpi_edid(struct drm_device *, struct drm_connector *);
16#else
c839d748
DA
17static inline bool nouveau_is_optimus(void) { return false; };
18static inline bool nouveau_is_v1_dsm(void) { return false; };
c0077061
BS
19static inline void nouveau_register_dsm_handler(void) {}
20static inline void nouveau_unregister_dsm_handler(void) {}
21static inline void nouveau_switcheroo_optimus_dsm(void) {}
26c9e8ef 22static inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; }
c0077061
BS
23static inline int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len) { return -EINVAL; }
24static inline void *nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return NULL; }
25#endif
26
27#endif