Re: [PATCH 6/8] video/aperture: Drop primary argument

2023-04-05 Thread Javier Martinez Canillas
Daniel Vetter  writes:

> With the preceeding 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.
>
> Signed-off-by: Daniel Vetter 
> Cc: Thomas Zimmermann 
> Cc: Javier Martinez Canillas 
> Cc: Helge Deller 
> Cc: linux-fb...@vger.kernel.org
> Cc: Maarten Lankhorst 
> Cc: Maxime Ripard 
> Cc: "K. Y. Srinivasan" 
> Cc: Haiyang Zhang 
> Cc: Wei Liu 
> Cc: Dexuan Cui 
> Cc: linux-hyp...@vger.kernel.org
> ---
>  drivers/gpu/drm/drm_aperture.c  | 2 +-
>  drivers/video/aperture.c| 7 +++
>  drivers/video/fbdev/hyperv_fb.c | 2 +-
>  include/linux/aperture.h| 9 -
>  4 files changed, 9 insertions(+), 11 deletions(-)
>

Reviewed-by: Javier Martinez Canillas 

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat



[PATCH 6/8] video/aperture: Drop primary argument

2023-04-04 Thread Daniel Vetter
With the preceeding 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.

Signed-off-by: Daniel Vetter 
Cc: Thomas Zimmermann 
Cc: Javier Martinez Canillas 
Cc: Helge Deller 
Cc: linux-fb...@vger.kernel.org
Cc: Maarten Lankhorst 
Cc: Maxime Ripard 
Cc: "K. Y. Srinivasan" 
Cc: Haiyang Zhang 
Cc: Wei Liu 
Cc: Dexuan Cui 
Cc: linux-hyp...@vger.kernel.org
---
 drivers/gpu/drm/drm_aperture.c  | 2 +-
 drivers/video/aperture.c| 7 +++
 drivers/video/fbdev/hyperv_fb.c | 2 +-
 include/linux/aperture.h| 9 -
 4 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/drm_aperture.c b/drivers/gpu/drm/drm_aperture.c
index 697cffbfd603..5729f3bb4398 100644
--- a/drivers/gpu/drm/drm_aperture.c
+++ b/drivers/gpu/drm/drm_aperture.c
@@ -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,
 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);
 
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c
index ec9387d94049..8f1437339e49 100644
--- a/drivers/video/aperture.c
+++ b/drivers/video/aperture.c
@@ -43,7 +43,7 @@
  * base = mem->start;
  * size = resource_size(mem);
  *
- * ret = aperture_remove_conflicting_devices(base, size, false, 
"example");
+ * ret = aperture_remove_conflicting_devices(base, size, 
"example");
  * if (ret)
  * return ret;
  *
@@ -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
  * @base: the aperture's base address in physical memory
  * @size: aperture size in bytes
- * @primary: also kick vga16fb if present; only relevant for VGA devices
  * @name: a descriptive name of the requesting driver
  *
  * 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)
  * 0 on success, or a negative errno code otherwise
  */
 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
@@ -328,7 +327,7 @@ int aperture_remove_conflicting_pci_devices(struct pci_dev 
*pdev, const char *na
 
base = pci_resource_start(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)
return ret;
}
diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c
index ec3f6cf05f8c..54f433e09ab8 100644
--- a/drivers/video/fbdev/hyperv_fb.c
+++ b/drivers/video/fbdev/hyperv_fb.c
@@ -1073,7 +1073,7 @@ static int hvfb_getmem(struct hv_device *hdev, struct 
fb_info *info)
info->screen_size = dio_fb_size;
 
 getmem_done:
-   aperture_remove_conflicting_devices(base, size, false, KBUILD_MODNAME);
+   aperture_remove_conflicting_devices(base, size, KBUILD_MODNAME);
 
if (gen2vm) {
/* framebuffer is reallocated, clear screen_info to avoid 
misuse from kexec */
diff --git a/include/linux/aperture.h b/include/linux/aperture.h
index 442f15a57cad..7248727753be 100644
--- a/include/linux/aperture.h
+++ b/include/linux/aperture.h
@@ -14,7 +14,7 @@ int devm_aperture_acquire_for_platform_device(struct 
platform_device *pdev,
  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);
 #else
@@ -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,
- bool primary, const char 
*name)
+