Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: "Pankaj Bharadiya" <pankaj.laxminarayan.bharadiya@intel.com>,
	jani.nikula@linux.intel.com, daniel@ffwll.ch,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David (ChunMing) Zhou" <David1.Zhou@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Russell King" <linux@armlinux.org.uk>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Inki Dae" <inki.dae@samsung.com>,
	"Joonyoung Shim" <jy0922.shim@samsung.com>,
	"Seung-Woo Kim" <sw0312.kim@samsung.com>,
	"Kyungmin Park" <kyungmin.park@samsung.com>,
	"Kukjin Kim" <kgene@kernel.org>,
	"Krzysztof Kozlowski" <krzk@kernel.org>,
	"Patrik Jakobsson" <patrik.r.jakobsson@gmail.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Rob Clark" <robdclark@gmail.com>, "Sean Paul" <sean@poorly.run>,
	"Ben Skeggs" <bskeggs@redhat.com>,
	"Tomi Valkeinen" <tomi.valkeinen@ti.com>,
	"Sandy Huang" <hjc@rock-chips.com>,
	"Heiko Stübner" <heiko@sntech.de>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Paul Kocialkowski" <paul.kocialkowski@bootlin.com>,
	"Emil Velikov" <emil.velikov@collabora.com>,
	"Andrey Grodzovsky" <andrey.grodzovsky@amd.com>,
	"Sam Ravnborg" <sam@ravnborg.org>,
	"Chris Wilson" <chris@chris-wilson.co.uk>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Matthew Auld" <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
Date: Mon, 2 Mar 2020 14:44:39 +0100	[thread overview]
Message-ID: <0bd2ca42-399c-e840-9561-3416e5ddf399@suse.de> (raw)
In-Reply-To: <20200302125649.61443-2-pankaj.laxminarayan.bharadiya@intel.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 10221 bytes --]

Hi

Am 02.03.20 um 13:56 schrieb Pankaj Bharadiya:
> The max connector argument for drm_fb_helper_init() isn't used anymore
> hence remove it.
> 
> All the drm_fb_helper_init() calls are modified with below sementic
> patch.
> 
> @@
> expression E1, E2, E3;
> @@
> -  drm_fb_helper_init(E1,E2, E3)
> +  drm_fb_helper_init(E1,E2)
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        | 3 +--
>  drivers/gpu/drm/armada/armada_fbdev.c         | 2 +-
>  drivers/gpu/drm/drm_fb_helper.c               | 6 ++----
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 2 +-
>  drivers/gpu/drm/gma500/framebuffer.c          | 2 +-
>  drivers/gpu/drm/i915/display/intel_fbdev.c    | 2 +-
>  drivers/gpu/drm/msm/msm_fbdev.c               | 2 +-
>  drivers/gpu/drm/nouveau/nouveau_fbcon.c       | 2 +-
>  drivers/gpu/drm/omapdrm/omap_fbdev.c          | 2 +-
>  drivers/gpu/drm/radeon/radeon_fb.c            | 3 +--
>  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 2 +-
>  drivers/gpu/drm/tegra/fb.c                    | 2 +-
>  include/drm/drm_fb_helper.h                   | 6 ++----
>  13 files changed, 15 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index 2672dc64a310..579d614c7b70 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -336,8 +336,7 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
>  	drm_fb_helper_prepare(adev->ddev, &rfbdev->helper,
>  			&amdgpu_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(adev->ddev, &rfbdev->helper,
> -				 AMDGPUFB_CONN_LIMIT);
> +	ret = drm_fb_helper_init(adev->ddev, &rfbdev->helper);
>  	if (ret) {
>  		kfree(rfbdev);
>  		return ret;
> diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
> index ac8a78bfda03..6254353c00ae 100644
> --- a/drivers/gpu/drm/armada/armada_fbdev.c
> +++ b/drivers/gpu/drm/armada/armada_fbdev.c
> @@ -129,7 +129,7 @@ int armada_fbdev_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, fbh, &armada_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, fbh, 1);
> +	ret = drm_fb_helper_init(dev, fbh);
>  	if (ret) {
>  		DRM_ERROR("failed to initialize drm fb helper\n");
>  		goto err_fb_helper;
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 490a99de6ec1..a9771de4d17e 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -450,7 +450,6 @@ EXPORT_SYMBOL(drm_fb_helper_prepare);
>   * drm_fb_helper_init - initialize a &struct drm_fb_helper
>   * @dev: drm device
>   * @fb_helper: driver-allocated fbdev helper structure to initialize
> - * @max_conn_count: max connector count (not used)
>   *
>   * This allocates the structures for the fbdev helper with the given limits.
>   * Note that this won't yet touch the hardware (through the driver interfaces)
> @@ -463,8 +462,7 @@ EXPORT_SYMBOL(drm_fb_helper_prepare);
>   * Zero if everything went ok, nonzero otherwise.
>   */
>  int drm_fb_helper_init(struct drm_device *dev,
> -		       struct drm_fb_helper *fb_helper,
> -		       int max_conn_count)
> +		       struct drm_fb_helper *fb_helper)
>  {
>  	int ret;
>  
> @@ -2125,7 +2123,7 @@ static int drm_fbdev_client_hotplug(struct drm_client_dev *client)
>  
>  	drm_fb_helper_prepare(dev, fb_helper, &drm_fb_helper_generic_funcs);
>  
> -	ret = drm_fb_helper_init(dev, fb_helper, 0);
> +	ret = drm_fb_helper_init(dev, fb_helper);
>  	if (ret)
>  		goto err;
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index 647a1fd1d815..5afecb6a30ad 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -200,7 +200,7 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, helper, &exynos_drm_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, helper, MAX_CONNECTOR);
> +	ret = drm_fb_helper_init(dev, helper);
>  	if (ret < 0) {
>  		DRM_DEV_ERROR(dev->dev,
>  			      "failed to initialize drm fb helper.\n");
> diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
> index 1459076d1980..fe892e1243db 100644
> --- a/drivers/gpu/drm/gma500/framebuffer.c
> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> @@ -513,7 +513,7 @@ int psb_fbdev_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, fb_helper, &psb_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, fb_helper, INTELFB_CONN_LIMIT);
> +	ret = drm_fb_helper_init(dev, fb_helper);
>  	if (ret)
>  		goto free;
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index b6ee0d902003..8f65963266a3 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -452,7 +452,7 @@ int intel_fbdev_init(struct drm_device *dev)
>  	if (!intel_fbdev_init_bios(dev, ifbdev))
>  		ifbdev->preferred_bpp = 32;
>  
> -	ret = drm_fb_helper_init(dev, &ifbdev->helper, 4);
> +	ret = drm_fb_helper_init(dev, &ifbdev->helper);
>  	if (ret) {
>  		kfree(ifbdev);
>  		return ret;
> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> index db48867df47d..b4f44146d9de 100644
> --- a/drivers/gpu/drm/msm/msm_fbdev.c
> +++ b/drivers/gpu/drm/msm/msm_fbdev.c
> @@ -160,7 +160,7 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, helper, &msm_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, helper, priv->num_connectors);
> +	ret = drm_fb_helper_init(dev, helper);
>  	if (ret) {
>  		DRM_DEV_ERROR(dev->dev, "could not init fbdev: ret=%d\n", ret);
>  		goto fail;
> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> index 0c5cdda3c336..21fc7c63e2f7 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> @@ -558,7 +558,7 @@ nouveau_fbcon_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, &fbcon->helper, &nouveau_fbcon_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, &fbcon->helper, 4);
> +	ret = drm_fb_helper_init(dev, &fbcon->helper);
>  	if (ret)
>  		goto free;
>  
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index b06e5cbfd03a..eba57ac31cc6 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -242,7 +242,7 @@ void omap_fbdev_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, helper, &omap_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, helper, priv->num_pipes);
> +	ret = drm_fb_helper_init(dev, helper);
>  	if (ret)
>  		goto fail;
>  
> diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> index ec0b7d6c994d..85548cf2529a 100644
> --- a/drivers/gpu/drm/radeon/radeon_fb.c
> +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> @@ -354,8 +354,7 @@ int radeon_fbdev_init(struct radeon_device *rdev)
>  	drm_fb_helper_prepare(rdev->ddev, &rfbdev->helper,
>  			      &radeon_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper,
> -				 RADEONFB_CONN_LIMIT);
> +	ret = drm_fb_helper_init(rdev->ddev, &rfbdev->helper);
>  	if (ret)
>  		goto free;
>  
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> index 521fe42ac5e2..6ad4cce17089 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> @@ -124,7 +124,7 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
>  
>  	drm_fb_helper_prepare(dev, helper, &rockchip_drm_fb_helper_funcs);
>  
> -	ret = drm_fb_helper_init(dev, helper, ROCKCHIP_MAX_CONNECTOR);
> +	ret = drm_fb_helper_init(dev, helper);
>  	if (ret < 0) {
>  		DRM_DEV_ERROR(dev->dev,
>  			      "Failed to initialize drm fb helper - %d.\n",
> diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
> index 84f0e01e3428..feefe62be8dd 100644
> --- a/drivers/gpu/drm/tegra/fb.c
> +++ b/drivers/gpu/drm/tegra/fb.c
> @@ -314,7 +314,7 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,
>  	struct drm_device *drm = fbdev->base.dev;
>  	int err;
>  
> -	err = drm_fb_helper_init(drm, &fbdev->base, max_connectors);
> +	err = drm_fb_helper_init(drm, &fbdev->base);
>  	if (err < 0) {
>  		dev_err(drm->dev, "failed to initialize DRM FB helper: %d\n",
>  			err);
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 1c6633da0f91..62e8dda6d1d1 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -213,8 +213,7 @@ drm_fb_helper_from_client(struct drm_client_dev *client)
>  #ifdef CONFIG_DRM_FBDEV_EMULATION
>  void drm_fb_helper_prepare(struct drm_device *dev, struct drm_fb_helper *helper,
>  			   const struct drm_fb_helper_funcs *funcs);
> -int drm_fb_helper_init(struct drm_device *dev,
> -		       struct drm_fb_helper *helper, int max_conn);
> +int drm_fb_helper_init(struct drm_device *dev, struct drm_fb_helper *helper);
>  void drm_fb_helper_fini(struct drm_fb_helper *helper);
>  int drm_fb_helper_blank(int blank, struct fb_info *info);
>  int drm_fb_helper_pan_display(struct fb_var_screeninfo *var,
> @@ -279,8 +278,7 @@ static inline void drm_fb_helper_prepare(struct drm_device *dev,
>  }
>  
>  static inline int drm_fb_helper_init(struct drm_device *dev,
> -		       struct drm_fb_helper *helper,
> -		       int max_conn)
> +		       struct drm_fb_helper *helper)
>  {
>  	/* So drivers can use it to free the struct */
>  	helper->dev = dev;
> 

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


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

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2020-03-02 13:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 12:56 [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup Pankaj Bharadiya
2020-03-02 12:56 ` [Intel-gfx] [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init Pankaj Bharadiya
2020-03-02 13:44   ` Thomas Zimmermann [this message]
2020-03-02 21:38   ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions Pankaj Bharadiya
2020-03-02 21:41   ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls Pankaj Bharadiya
2020-03-02 21:41   ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 4/9] drm/i915/display: " Pankaj Bharadiya
2020-03-02 21:42   ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls Pankaj Bharadiya
2020-03-02 21:42   ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning Pankaj Bharadiya
2020-03-02 13:30   ` Laurent Pinchart
2020-03-03 18:58     ` Lyude Paul
2020-03-02 12:56 ` [Intel-gfx] [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach Pankaj Bharadiya
2020-03-02 13:27   ` Laurent Pinchart
2020-03-02 12:56 ` [Intel-gfx] [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions Pankaj Bharadiya
2020-03-02 13:27   ` Laurent Pinchart
2020-03-02 21:43   ` Alex Deucher
2020-03-02 12:56 ` [Intel-gfx] [PATCH 9/9] drm/todo: Update drm_fb_helper tasks Pankaj Bharadiya
2020-03-02 13:29   ` Laurent Pinchart
2020-03-02 21:35     ` Daniel Vetter
2020-03-02 14:29 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: drm_fb_helper cleanup Patchwork
2020-03-02 14:47 ` [Intel-gfx] ✗ Fi.CI.DOCS: " Patchwork
2020-03-02 15:04 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2020-03-02 15:58 ` [Intel-gfx] [PATCH 0/9] " Emil Velikov
2020-03-02 16:17   ` Emil Velikov

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=0bd2ca42-399c-e840-9561-3416e5ddf399@suse.de \
    --to=tzimmermann@suse.de \
    --cc=David1.Zhou@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=andrey.grodzovsky@amd.com \
    --cc=bskeggs@redhat.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=christian.koenig@amd.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=inki.dae@samsung.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=jonathanh@nvidia.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux@armlinux.org.uk \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=matthew.auld@intel.com \
    --cc=mripard@kernel.org \
    --cc=pankaj.laxminarayan.bharadiya@intel.com \
    --cc=patrik.r.jakobsson@gmail.com \
    --cc=paul.kocialkowski@bootlin.com \
    --cc=robdclark@gmail.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    --cc=sw0312.kim@samsung.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ti.com \
    --cc=ville.syrjala@linux.intel.com \
    /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