Path: blob/main/sys/compat/linuxkpi/common/include/linux/aperture.h
39604 views
/* SPDX-License-Identifier: MIT */12#ifndef _LINUX_APERTURE_H_3#define _LINUX_APERTURE_H_45#include <linux/types.h>67#define CONFIG_APERTURE_HELPERS89struct pci_dev;10struct platform_device;1112#if defined(CONFIG_APERTURE_HELPERS)13int devm_aperture_acquire_for_platform_device(struct platform_device *pdev,14resource_size_t base,15resource_size_t size);1617int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size,18const char *name);1920int __aperture_remove_legacy_vga_devices(struct pci_dev *pdev);2122int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name);23#else24static inline int devm_aperture_acquire_for_platform_device(struct platform_device *pdev,25resource_size_t base,26resource_size_t size)27{28return 0;29}3031static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size,32const char *name)33{34return 0;35}3637static inline int __aperture_remove_legacy_vga_devices(struct pci_dev *pdev)38{39return 0;40}4142static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name)43{44return 0;45}46#endif4748/**49* aperture_remove_all_conflicting_devices - remove all existing framebuffers50* @name: a descriptive name of the requesting driver51*52* This function removes all graphics device drivers. Use this function on systems53* that can have their framebuffer located anywhere in memory.54*55* Returns:56* 0 on success, or a negative errno code otherwise57*/58static inline int aperture_remove_all_conflicting_devices(const char *name)59{60return aperture_remove_conflicting_devices(0, (resource_size_t)-1, name);61}6263#endif646566