Commit 5fbcc670 authored by Daniel Vetter's avatar Daniel Vetter Committed by Thomas Zimmermann

video/aperture: Drop primary argument

With the preceding patches it's become defunct. Also I'm about to add
a different boolean argument, so it's better to keep the confusion
down to the absolute minimum.

v2: Since the hypervfb patch got droppped (it's only a pci device for
gen1 vm, not for gen2) there is one leftover user in an actual driver
left to touch.

v4:
- fixes to commit message
- fix Daniel's S-o-b address

v5:
- add back an S-o-b tag with Daniel's Intel address
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Signed-off-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Javier Martinez Canillas <javierm@redhat.com>
Cc: Helge Deller <deller@gmx.de>
Cc: linux-fbdev@vger.kernel.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Wei Liu <wei.liu@kernel.org>
Cc: Dexuan Cui <decui@microsoft.com>
Cc: linux-hyperv@vger.kernel.org
Reviewed-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230406132109.32050-7-tzimmermann@suse.de
parent f1d599d3
...@@ -168,7 +168,7 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware); ...@@ -168,7 +168,7 @@ EXPORT_SYMBOL(devm_aperture_acquire_from_firmware);
int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size, int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size,
const struct drm_driver *req_driver) const struct drm_driver *req_driver)
{ {
return aperture_remove_conflicting_devices(base, size, false, req_driver->name); return aperture_remove_conflicting_devices(base, size, req_driver->name);
} }
EXPORT_SYMBOL(drm_aperture_remove_conflicting_framebuffers); EXPORT_SYMBOL(drm_aperture_remove_conflicting_framebuffers);
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
* base = mem->start; * base = mem->start;
* size = resource_size(mem); * size = resource_size(mem);
* *
* ret = aperture_remove_conflicting_devices(base, size, false, "example"); * ret = aperture_remove_conflicting_devices(base, size, "example");
* if (ret) * if (ret)
* return ret; * return ret;
* *
...@@ -274,7 +274,6 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) ...@@ -274,7 +274,6 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size)
* aperture_remove_conflicting_devices - remove devices in the given range * aperture_remove_conflicting_devices - remove devices in the given range
* @base: the aperture's base address in physical memory * @base: the aperture's base address in physical memory
* @size: aperture size in bytes * @size: aperture size in bytes
* @primary: also kick vga16fb if present; only relevant for VGA devices
* @name: a descriptive name of the requesting driver * @name: a descriptive name of the requesting driver
* *
* This function removes devices that own apertures within @base and @size. * This function removes devices that own apertures within @base and @size.
...@@ -283,7 +282,7 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size) ...@@ -283,7 +282,7 @@ static void aperture_detach_devices(resource_size_t base, resource_size_t size)
* 0 on success, or a negative errno code otherwise * 0 on success, or a negative errno code otherwise
*/ */
int aperture_remove_conflicting_devices(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) const char *name)
{ {
/* /*
* If a driver asked to unregister a platform device registered by * If a driver asked to unregister a platform device registered by
...@@ -329,7 +328,7 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na ...@@ -329,7 +328,7 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *na
base = pci_resource_start(pdev, bar); base = pci_resource_start(pdev, bar);
size = pci_resource_len(pdev, bar); size = pci_resource_len(pdev, bar);
ret = aperture_remove_conflicting_devices(base, size, primary, name); ret = aperture_remove_conflicting_devices(base, size, name);
if (ret) if (ret)
return ret; return ret;
} }
......
...@@ -1073,7 +1073,7 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) ...@@ -1073,7 +1073,7 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info)
info->screen_size = dio_fb_size; info->screen_size = dio_fb_size;
getmem_done: getmem_done:
aperture_remove_conflicting_devices(base, size, false, KBUILD_MODNAME); aperture_remove_conflicting_devices(base, size, KBUILD_MODNAME);
if (gen2vm) { if (gen2vm) {
/* framebuffer is reallocated, clear screen_info to avoid misuse from kexec */ /* framebuffer is reallocated, clear screen_info to avoid misuse from kexec */
......
...@@ -14,7 +14,7 @@ int devm_aperture_acquire_for_platform_device(struct platform_device *pdev, ...@@ -14,7 +14,7 @@ int devm_aperture_acquire_for_platform_device(struct platform_device *pdev,
resource_size_t size); resource_size_t size);
int aperture_remove_conflicting_devices(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); const char *name);
int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name); int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name);
#else #else
...@@ -26,7 +26,7 @@ static inline int devm_aperture_acquire_for_platform_device(struct platform_devi ...@@ -26,7 +26,7 @@ static inline int devm_aperture_acquire_for_platform_device(struct platform_devi
} }
static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size,
bool primary, const char *name) const char *name)
{ {
return 0; return 0;
} }
...@@ -39,7 +39,6 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, ...@@ -39,7 +39,6 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev,
/** /**
* aperture_remove_all_conflicting_devices - remove all existing framebuffers * 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 * @name: a descriptive name of the requesting driver
* *
* This function removes all graphics device drivers. Use this function on systems * This function removes all graphics device drivers. Use this function on systems
...@@ -48,9 +47,9 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, ...@@ -48,9 +47,9 @@ static inline int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev,
* Returns: * Returns:
* 0 on success, or a negative errno code otherwise * 0 on success, or a negative errno code otherwise
*/ */
static inline int aperture_remove_all_conflicting_devices(bool primary, const char *name) static inline int aperture_remove_all_conflicting_devices(const char *name)
{ {
return aperture_remove_conflicting_devices(0, (resource_size_t)-1, primary, name); return aperture_remove_conflicting_devices(0, (resource_size_t)-1, name);
} }
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment