From 05bdbfb561ed6a3b1e414f691592bc9ed92d781d Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 31 Aug 2023 04:28:38 +0000 Subject: [PATCH] drm/aperture: Remove primary argument From Daniel Vetter 437e99f2a1e933348c4cedb2c7ce6f0ad81b935e in linux-6.1.y/6.1.50 62aeaeaa1b267c5149abee6b45967a5df3feed58 in mainline linux --- sys/dev/pci/drm/drm_aperture.c | 11 +++-------- sys/dev/pci/drm/include/drm/drm_aperture.h | 7 +++---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/dev/pci/drm/drm_aperture.c b/sys/dev/pci/drm/drm_aperture.c index 2dcbd2491a9..bb0922f8603 100644 --- a/sys/dev/pci/drm/drm_aperture.c +++ b/sys/dev/pci/drm/drm_aperture.c @@ -32,17 +32,13 @@ * * static int remove_conflicting_framebuffers(struct pci_dev *pdev) * { - * bool primary = false; * resource_size_t base, size; * int ret; * * base = pci_resource_start(pdev, 0); * size = pci_resource_len(pdev, 0); - * #ifdef CONFIG_X86 - * primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; - * #endif * - * return drm_aperture_remove_conflicting_framebuffers(base, size, primary, + * return drm_aperture_remove_conflicting_framebuffers(base, size, * &example_driver); * } * @@ -165,7 +161,6 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware); * drm_aperture_remove_conflicting_framebuffers - remove existing framebuffers in the given range * @base: the aperture's base address in physical memory * @size: aperture size in bytes - * @primary: also kick vga16fb if present * @req_driver: requesting DRM driver * * This function removes graphics device drivers which use the memory range described by @@ -175,9 +170,9 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware); * 0 on success, or a negative errno code otherwise */ int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size, - bool primary, const struct drm_driver *req_driver) + const struct drm_driver *req_driver) { - return aperture_remove_conflicting_devices(base, size, primary, req_driver->name); + return aperture_remove_conflicting_devices(base, size, false, req_driver->name); } EXPORT_SYMBOL(drm_aperture_remove_conflicting_framebuffers); diff --git a/sys/dev/pci/drm/include/drm/drm_aperture.h b/sys/dev/pci/drm/include/drm/drm_aperture.h index 7096703c394..cbe33b49fd5 100644 --- a/sys/dev/pci/drm/include/drm/drm_aperture.h +++ b/sys/dev/pci/drm/include/drm/drm_aperture.h @@ -13,14 +13,13 @@ int devm_aperture_acquire_from_firmware(struct drm_device *dev, resource_size_t resource_size_t size); int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size, - bool primary, const struct drm_driver *req_driver); + const struct drm_driver *req_driver); int drm_aperture_remove_conflicting_pci_framebuffers(struct pci_dev *pdev, const struct drm_driver *req_driver); /** * drm_aperture_remove_framebuffers - remove all existing framebuffers - * @primary: also kick vga16fb if present * @req_driver: requesting DRM driver * * This function removes all graphics device drivers. Use this function on systems @@ -30,9 +29,9 @@ int drm_aperture_remove_conflicting_pci_framebuffers(struct pci_dev *pdev, * 0 on success, or a negative errno code otherwise */ static inline int -drm_aperture_remove_framebuffers(bool primary, const struct drm_driver *req_driver) +drm_aperture_remove_framebuffers(const struct drm_driver *req_driver) { - return drm_aperture_remove_conflicting_framebuffers(0, (resource_size_t)-1, primary, + return drm_aperture_remove_conflicting_framebuffers(0, (resource_size_t)-1, req_driver); } -- 2.20.1