drm/aperture: Remove primary argument
authorjsg <jsg@openbsd.org>
Thu, 31 Aug 2023 04:28:38 +0000 (04:28 +0000)
committerjsg <jsg@openbsd.org>
Thu, 31 Aug 2023 04:28:38 +0000 (04:28 +0000)
From Daniel Vetter
437e99f2a1e933348c4cedb2c7ce6f0ad81b935e in linux-6.1.y/6.1.50
62aeaeaa1b267c5149abee6b45967a5df3feed58 in mainline linux

sys/dev/pci/drm/drm_aperture.c
sys/dev/pci/drm/include/drm/drm_aperture.h

index 2dcbd24..bb0922f 100644 (file)
  *
  *     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);
 
index 7096703..cbe33b4 100644 (file)
@@ -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);
 }