linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	DRI Development <dri-devel@lists.freedesktop.org>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Helge Deller <deller@gmx.de>,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 10/11] video/aperture: Drop primary argument
Date: Wed, 11 Jan 2023 17:09:54 +0100	[thread overview]
Message-ID: <2cf4eeef-2b38-ef4c-f807-4e32378fed13@suse.de> (raw)
In-Reply-To: <20230111154112.90575-10-daniel.vetter@ffwll.ch>


[-- Attachment #1.1: Type: text/plain, Size: 5344 bytes --]

Hi

Am 11.01.23 um 16:41 schrieb 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.

OK, maybe my earlier comments about the use of 'primary' in some 
function calls were not correct. Ignore them then.

> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 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
> ---
>   drivers/gpu/drm/drm_aperture.c | 2 +-
>   drivers/video/aperture.c       | 7 +++----
>   include/linux/aperture.h       | 9 ++++-----
>   3 files changed, 8 insertions(+), 10 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 03f8a5e95238..ba565515480d 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/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)
> +						      const char *name)
>   {
>   	return 0;
>   }
> @@ -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
> - * @primary: also kick vga16fb if present; only relevant for VGA devices
>    * @name: a descriptive name of the requesting driver
>    *
>    * 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,
>    * Returns:
>    * 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

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

  reply	other threads:[~2023-01-11 16:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 15:41 [PATCH 01/11] drm/ast: Use drm_aperture_remove_conflicting_pci_framebuffers Daniel Vetter
2023-01-11 15:41 ` [PATCH 03/11] drm/aperture: Remove primary argument Daniel Vetter
2023-01-11 15:49   ` Thomas Zimmermann
2023-01-11 15:41 ` [PATCH 04/11] video/aperture: use generic code to figure out the vga default device Daniel Vetter
2023-01-11 15:59   ` Thomas Zimmermann
2023-01-11 16:51     ` Daniel Vetter
2023-01-11 15:41 ` [PATCH 05/11] video/aperture: Only kick vgacon when the pdev is decoding vga Daniel Vetter
2023-01-11 16:03   ` Thomas Zimmermann
2023-01-11 16:55     ` Daniel Vetter
2023-01-11 15:41 ` [PATCH 06/11] staging/lynxfb: Use pci aperture helper Daniel Vetter
2023-01-11 16:05   ` Thomas Zimmermann
2023-01-11 15:41 ` [PATCH 07/11] fbdev/radeon: use pci aperture helpers Daniel Vetter
2023-01-11 15:41 ` [PATCH 09/11] video/aperture: Move vga handling to pci function Daniel Vetter
2023-01-11 15:41 ` [PATCH 10/11] video/aperture: Drop primary argument Daniel Vetter
2023-01-11 16:09   ` Thomas Zimmermann [this message]
2023-01-11 15:48 ` [PATCH 01/11] drm/ast: Use drm_aperture_remove_conflicting_pci_framebuffers Thomas Zimmermann
2023-01-11 17:02   ` Daniel Vetter
2023-01-12  9:41 ` Thomas Zimmermann
2023-04-04 14:45 ` Thomas Zimmermann
2023-04-18  0:53   ` Jammy Huang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2cf4eeef-2b38-ef4c-f807-4e32378fed13@suse.de \
    --to=tzimmermann@suse.de \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=deller@gmx.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=javierm@redhat.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).