Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Thomas 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: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230406132109.32050-7-tzimmermann@suse.de

authored by

Daniel Vetter and committed by
Thomas Zimmermann
5fbcc670 f1d599d3

+9 -11
+1 -1
drivers/gpu/drm/drm_aperture.c
··· 168 168 int drm_aperture_remove_conflicting_framebuffers(resource_size_t base, resource_size_t size, 169 169 const struct drm_driver *req_driver) 170 170 { 171 - return aperture_remove_conflicting_devices(base, size, false, req_driver->name); 171 + return aperture_remove_conflicting_devices(base, size, req_driver->name); 172 172 } 173 173 EXPORT_SYMBOL(drm_aperture_remove_conflicting_framebuffers); 174 174
+3 -4
drivers/video/aperture.c
··· 43 43 * base = mem->start; 44 44 * size = resource_size(mem); 45 45 * 46 - * ret = aperture_remove_conflicting_devices(base, size, false, "example"); 46 + * ret = aperture_remove_conflicting_devices(base, size, "example"); 47 47 * if (ret) 48 48 * return ret; 49 49 * ··· 274 274 * aperture_remove_conflicting_devices - remove devices in the given range 275 275 * @base: the aperture's base address in physical memory 276 276 * @size: aperture size in bytes 277 - * @primary: also kick vga16fb if present; only relevant for VGA devices 278 277 * @name: a descriptive name of the requesting driver 279 278 * 280 279 * This function removes devices that own apertures within @base and @size. ··· 282 283 * 0 on success, or a negative errno code otherwise 283 284 */ 284 285 int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, 285 - bool primary, const char *name) 286 + const char *name) 286 287 { 287 288 /* 288 289 * If a driver asked to unregister a platform device registered by ··· 328 329 329 330 base = pci_resource_start(pdev, bar); 330 331 size = pci_resource_len(pdev, bar); 331 - ret = aperture_remove_conflicting_devices(base, size, primary, name); 332 + ret = aperture_remove_conflicting_devices(base, size, name); 332 333 if (ret) 333 334 return ret; 334 335 }
+1 -1
drivers/video/fbdev/hyperv_fb.c
··· 1073 1073 info->screen_size = dio_fb_size; 1074 1074 1075 1075 getmem_done: 1076 - aperture_remove_conflicting_devices(base, size, false, KBUILD_MODNAME); 1076 + aperture_remove_conflicting_devices(base, size, KBUILD_MODNAME); 1077 1077 1078 1078 if (gen2vm) { 1079 1079 /* framebuffer is reallocated, clear screen_info to avoid misuse from kexec */
+4 -5
include/linux/aperture.h
··· 14 14 resource_size_t size); 15 15 16 16 int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, 17 - bool primary, const char *name); 17 + const char *name); 18 18 19 19 int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const char *name); 20 20 #else ··· 26 26 } 27 27 28 28 static inline int aperture_remove_conflicting_devices(resource_size_t base, resource_size_t size, 29 - bool primary, const char *name) 29 + const char *name) 30 30 { 31 31 return 0; 32 32 } ··· 39 39 40 40 /** 41 41 * aperture_remove_all_conflicting_devices - remove all existing framebuffers 42 - * @primary: also kick vga16fb if present; only relevant for VGA devices 43 42 * @name: a descriptive name of the requesting driver 44 43 * 45 44 * This function removes all graphics device drivers. Use this function on systems ··· 47 48 * Returns: 48 49 * 0 on success, or a negative errno code otherwise 49 50 */ 50 - static inline int aperture_remove_all_conflicting_devices(bool primary, const char *name) 51 + static inline int aperture_remove_all_conflicting_devices(const char *name) 51 52 { 52 - return aperture_remove_conflicting_devices(0, (resource_size_t)-1, primary, name); 53 + return aperture_remove_conflicting_devices(0, (resource_size_t)-1, name); 53 54 } 54 55 55 56 #endif