-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This contain the hdmi code and the aperture code like in linux. Differential Revision: https://reviews.freebsd.org/D44925 Reviewed by: bz Obtained from: drm-kmod Sponsored by: Beckhoff Automation GmbH & Co. KG
- Loading branch information
Showing
5 changed files
with
446 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/* SPDX-License-Identifier: MIT */ | ||
|
||
#ifndef _LINUX_APERTURE_H_ | ||
#define _LINUX_APERTURE_H_ | ||
|
||
#include <linux/types.h> | ||
|
||
#define CONFIG_APERTURE_HELPERS | ||
|
||
struct pci_dev; | ||
struct platform_device; | ||
|
||
#if defined(CONFIG_APERTURE_HELPERS) | ||
int devm_aperture_acquire_for_platform_device(struct platform_device *pdev, | ||
resource_size_t base, | ||
resource_size_t size); | ||
|
||
int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, | ||
bool primary, const char *name); | ||
|
||
int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name); | ||
#else | ||
static inline int devm_aperture_acquire_for_platform_device(struct platform_device *pdev, | ||
resource_size_t base, | ||
resource_size_t size) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, | ||
bool primary, const char *name) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name) | ||
{ | ||
return 0; | ||
} | ||
#endif | ||
|
||
/** | ||
* aperture_remove_all_conflicting_devices - remove all existing framebuffers | ||
* @primary: also kick vga16fb if present; only relevant for VGA devices | ||
* @name: a descriptive name of the requesting driver | ||
* | ||
* This function removes all graphics device drivers. Use this function on systems | ||
* that can have their framebuffer located anywhere in memory. | ||
* | ||
* Returns: | ||
* 0 on success, or a negative errno code otherwise | ||
*/ | ||
static inline int aperture_remove_all_conflicting_devices(bool primary, const char *name) | ||
{ | ||
return aperture_remove_conflicting_devices(0, (resource_size_t)-1, primary, name); | ||
} | ||
|
||
#endif |
Oops, something went wrong.