11.5Sriastrad/* $NetBSD: nouveau_acpi.h,v 1.5 2025/03/06 01:14:51 riastradh Exp $ */ 21.2Sriastrad 31.3Sriastrad/* SPDX-License-Identifier: MIT */ 41.1Sriastrad#ifndef __NOUVEAU_ACPI_H__ 51.1Sriastrad#define __NOUVEAU_ACPI_H__ 61.1Sriastrad 71.4Sriastrad#include <linux/acpi.h> 81.4Sriastrad 91.1Sriastrad#define ROM_BIOS_PAGE 4096 101.1Sriastrad 111.5Sriastrad#if defined(CONFIG_ACPI) 121.1Sriastradbool nouveau_is_optimus(void); 131.1Sriastradbool nouveau_is_v1_dsm(void); 141.1Sriastradvoid nouveau_register_dsm_handler(void); 151.1Sriastradvoid nouveau_unregister_dsm_handler(void); 161.1Sriastradvoid nouveau_switcheroo_optimus_dsm(void); 171.1Sriastradint nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len); 181.4Sriastrad#ifdef __NetBSD__ 191.4Sriastradbool nouveau_acpi_rom_supported(struct acpi_devnode *); 201.4Sriastrad#else 211.2Sriastradbool nouveau_acpi_rom_supported(struct device *); 221.4Sriastrad#endif 231.1Sriastradvoid *nouveau_acpi_edid(struct drm_device *, struct drm_connector *); 241.1Sriastrad#else 251.1Sriastradstatic inline bool nouveau_is_optimus(void) { return false; }; 261.1Sriastradstatic inline bool nouveau_is_v1_dsm(void) { return false; }; 271.1Sriastradstatic inline void nouveau_register_dsm_handler(void) {} 281.1Sriastradstatic inline void nouveau_unregister_dsm_handler(void) {} 291.1Sriastradstatic inline void nouveau_switcheroo_optimus_dsm(void) {} 301.4Sriastrad#ifdef __NetBSD__ 311.4Sriastradstatic inline bool nouveau_acpi_rom_supported(struct acpi_devnode *acpidev) { return false; } 321.4Sriastrad#else 331.2Sriastradstatic inline bool nouveau_acpi_rom_supported(struct device *dev) { return false; } 341.4Sriastrad#endif 351.1Sriastradstatic inline int nouveau_acpi_get_bios_chunk(uint8_t *bios, int offset, int len) { return -EINVAL; } 361.1Sriastradstatic inline void *nouveau_acpi_edid(struct drm_device *dev, struct drm_connector *connector) { return NULL; } 371.1Sriastrad#endif 381.1Sriastrad 391.1Sriastrad#endif 40