All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/9] drm: drm_fb_helper cleanup.
@ 2020-03-02 12:56 ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel; +Cc: pankaj.laxminarayan.bharadiya

This series addresses below drm_fb_helper tasks from
Documentation/gpu/todo.rst.

- The max connector argument for drm_fb_helper_init() isn't used
  anymore and can be removed.

- The helper doesn't keep an array of connectors anymore so these can
  be removed: drm_fb_helper_single_add_all_connectors(),
  drm_fb_helper_add_one_connector() and
  drm_fb_helper_remove_one_connector().

Pankaj Bharadiya (9):
  drm: Remove unused arg from drm_fb_helper_init
  drm/radeon: remove radeon_fb_{add,remove}_connector functions
  drm/amdgpu: Remove drm_fb_helper_{add,remove}_one_connector calls
  drm/i915/display: Remove drm_fb_helper_{add,remove}_one_connector calls
  drm: Remove drm_fb_helper add, add all and remove connector calls
  drm/nouveau: Fix unused variable warning
  drm/bridge: remove unused variable warning in tc358764_detach
  drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
  drm/todo: Update drm_fb_helper tasks

 Documentation/gpu/todo.rst                    | 15 +++--------
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        |  5 +---
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 13 ---------
 drivers/gpu/drm/armada/armada_fbdev.c         |  8 +-----
 drivers/gpu/drm/bridge/tc358764.c             |  3 ---
 drivers/gpu/drm/drm_fb_helper.c               |  6 ++---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       |  1 -
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 10 +------
 drivers/gpu/drm/gma500/framebuffer.c          |  6 +----
 drivers/gpu/drm/i915/display/intel_dp_mst.c   | 12 ---------
 drivers/gpu/drm/i915/display/intel_fbdev.c    |  4 +--
 drivers/gpu/drm/msm/msm_fbdev.c               |  6 +----
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  7 -----
 drivers/gpu/drm/nouveau/nouveau_fbcon.c       |  6 +----
 drivers/gpu/drm/omapdrm/omap_fbdev.c          |  6 +----
 drivers/gpu/drm/radeon/radeon_dp_mst.c        | 10 -------
 drivers/gpu/drm/radeon/radeon_fb.c            | 19 +------------
 drivers/gpu/drm/radeon/radeon_mode.h          |  3 ---
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c |  9 +------
 drivers/gpu/drm/tegra/fb.c                    |  8 +-----
 include/drm/drm_fb_helper.h                   | 27 ++-----------------
 21 files changed, 19 insertions(+), 165 deletions(-)

-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup.
@ 2020-03-02 12:56 ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel

This series addresses below drm_fb_helper tasks from
Documentation/gpu/todo.rst.

- The max connector argument for drm_fb_helper_init() isn't used
  anymore and can be removed.

- The helper doesn't keep an array of connectors anymore so these can
  be removed: drm_fb_helper_single_add_all_connectors(),
  drm_fb_helper_add_one_connector() and
  drm_fb_helper_remove_one_connector().

Pankaj Bharadiya (9):
  drm: Remove unused arg from drm_fb_helper_init
  drm/radeon: remove radeon_fb_{add,remove}_connector functions
  drm/amdgpu: Remove drm_fb_helper_{add,remove}_one_connector calls
  drm/i915/display: Remove drm_fb_helper_{add,remove}_one_connector calls
  drm: Remove drm_fb_helper add, add all and remove connector calls
  drm/nouveau: Fix unused variable warning
  drm/bridge: remove unused variable warning in tc358764_detach
  drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
  drm/todo: Update drm_fb_helper tasks

 Documentation/gpu/todo.rst                    | 15 +++--------
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        |  5 +---
 .../display/amdgpu_dm/amdgpu_dm_mst_types.c   | 13 ---------
 drivers/gpu/drm/armada/armada_fbdev.c         |  8 +-----
 drivers/gpu/drm/bridge/tc358764.c             |  3 ---
 drivers/gpu/drm/drm_fb_helper.c               |  6 ++---
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       |  1 -
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 10 +------
 drivers/gpu/drm/gma500/framebuffer.c          |  6 +----
 drivers/gpu/drm/i915/display/intel_dp_mst.c   | 12 ---------
 drivers/gpu/drm/i915/display/intel_fbdev.c    |  4 +--
 drivers/gpu/drm/msm/msm_fbdev.c               |  6 +----
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  7 -----
 drivers/gpu/drm/nouveau/nouveau_fbcon.c       |  6 +----
 drivers/gpu/drm/omapdrm/omap_fbdev.c          |  6 +----
 drivers/gpu/drm/radeon/radeon_dp_mst.c        | 10 -------
 drivers/gpu/drm/radeon/radeon_fb.c            | 19 +------------
 drivers/gpu/drm/radeon/radeon_mode.h          |  3 ---
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c |  9 +------
 drivers/gpu/drm/tegra/fb.c                    |  8 +-----
 include/drm/drm_fb_helper.h                   | 27 ++-----------------
 21 files changed, 19 insertions(+), 165 deletions(-)

-- 
2.20.1

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie,
	Russell King, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski, Patrik Jakobsson,
	Joonas Lahtinen, Rodrigo Vivi, Rob Clark, Sean Paul, Ben Skeggs,
	Tomi Valkeinen, Sandy Huang, Heiko Stübner, Thierry Reding,
	Jonathan Hunter, Paul Kocialkowski, Emil Velikov,
	Andrey Grodzovsky, Pankaj Bharadiya, Sam Ravnborg, Chris Wilson,
	Ville Syrjälä,
	Matthew Auld

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>
---
 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;
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie,
	Russell King, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, Inki Dae, Joonyoung Shim, Seung-Woo Kim,
	Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski, Patrik Jakobsson,
	Joonas Lahtinen, Rodrigo Vivi, Rob Clark, Sean Paul, Ben Skeggs,
	Tomi Valkeinen, Sandy Huang, Heiko Stübner, Thierry Reding,
	Jonathan Hunter, Paul Kocialkowski, Emil Velikov,
	Andrey Grodzovsky, Pankaj Bharadiya, Sam Ravnborg, Chris Wilson,
	Ville Syrjälä,
	Matthew Auld

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>
---
 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;
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie
  Cc: pankaj.laxminarayan.bharadiya

drm_fb_helper_{add,remove}_one_connector() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 10 ----------
 drivers/gpu/drm/radeon/radeon_fb.c     | 12 ------------
 drivers/gpu/drm/radeon/radeon_mode.h   |  3 ---
 3 files changed, 25 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 28eef9282874..5a9fb0ad175a 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -303,23 +303,13 @@ static struct drm_connector *radeon_dp_add_mst_connector(struct drm_dp_mst_topol
 
 static void radeon_dp_register_mst_connector(struct drm_connector *connector)
 {
-	struct drm_device *dev = connector->dev;
-	struct radeon_device *rdev = dev->dev_private;
-
-	radeon_fb_add_connector(rdev, connector);
-
 	drm_connector_register(connector);
 }
 
 static void radeon_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 					    struct drm_connector *connector)
 {
-	struct radeon_connector *master = container_of(mgr, struct radeon_connector, mst_mgr);
-	struct drm_device *dev = master->base.dev;
-	struct radeon_device *rdev = dev->dev_private;
-
 	drm_connector_unregister(connector);
-	radeon_fb_remove_connector(rdev, connector);
 	drm_connector_cleanup(connector);
 
 	kfree(connector);
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 85548cf2529a..1c02cd771d52 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -403,15 +403,3 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
 		return true;
 	return false;
 }
-
-void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector)
-{
-	if (rdev->mode_info.rfbdev)
-		drm_fb_helper_add_one_connector(&rdev->mode_info.rfbdev->helper, connector);
-}
-
-void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector)
-{
-	if (rdev->mode_info.rfbdev)
-		drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector);
-}
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 629567da29f1..c7f223743d46 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -986,9 +986,6 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
 
 void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id);
 
-void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector);
-void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector);
-
 void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id);
 
 int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled);
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie

drm_fb_helper_{add,remove}_one_connector() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/radeon/radeon_dp_mst.c | 10 ----------
 drivers/gpu/drm/radeon/radeon_fb.c     | 12 ------------
 drivers/gpu/drm/radeon/radeon_mode.h   |  3 ---
 3 files changed, 25 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
index 28eef9282874..5a9fb0ad175a 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
@@ -303,23 +303,13 @@ static struct drm_connector *radeon_dp_add_mst_connector(struct drm_dp_mst_topol
 
 static void radeon_dp_register_mst_connector(struct drm_connector *connector)
 {
-	struct drm_device *dev = connector->dev;
-	struct radeon_device *rdev = dev->dev_private;
-
-	radeon_fb_add_connector(rdev, connector);
-
 	drm_connector_register(connector);
 }
 
 static void radeon_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 					    struct drm_connector *connector)
 {
-	struct radeon_connector *master = container_of(mgr, struct radeon_connector, mst_mgr);
-	struct drm_device *dev = master->base.dev;
-	struct radeon_device *rdev = dev->dev_private;
-
 	drm_connector_unregister(connector);
-	radeon_fb_remove_connector(rdev, connector);
 	drm_connector_cleanup(connector);
 
 	kfree(connector);
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 85548cf2529a..1c02cd771d52 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -403,15 +403,3 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
 		return true;
 	return false;
 }
-
-void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector)
-{
-	if (rdev->mode_info.rfbdev)
-		drm_fb_helper_add_one_connector(&rdev->mode_info.rfbdev->helper, connector);
-}
-
-void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector)
-{
-	if (rdev->mode_info.rfbdev)
-		drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector);
-}
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index 629567da29f1..c7f223743d46 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -986,9 +986,6 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
 
 void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id);
 
-void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector);
-void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector);
-
 void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id);
 
 int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled);
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Harry Wentland,
	Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Mikita Lipski, Lyude Paul,
	Nicholas Kazlauskas, David Francis, Pankaj Bharadiya

drm_fb_helper_{add,remove}_one_connector() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 0ef0eeb16778..0c4faba8ed28 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -440,9 +440,6 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 					struct drm_connector *connector)
 {
-	struct amdgpu_dm_connector *master = container_of(mgr, struct amdgpu_dm_connector, mst_mgr);
-	struct drm_device *dev = master->base.dev;
-	struct amdgpu_device *adev = dev->dev_private;
 	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
 
 	DRM_INFO("DM_MST: Disabling connector: %p [id: %d] [master: %p]\n",
@@ -457,21 +454,11 @@ static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	}
 
 	drm_connector_unregister(connector);
-	if (adev->mode_info.rfbdev)
-		drm_fb_helper_remove_one_connector(&adev->mode_info.rfbdev->helper, connector);
 	drm_connector_put(connector);
 }
 
 static void dm_dp_mst_register_connector(struct drm_connector *connector)
 {
-	struct drm_device *dev = connector->dev;
-	struct amdgpu_device *adev = dev->dev_private;
-
-	if (adev->mode_info.rfbdev)
-		drm_fb_helper_add_one_connector(&adev->mode_info.rfbdev->helper, connector);
-	else
-		DRM_ERROR("adev->mode_info.rfbdev is NULL\n");
-
 	drm_connector_register(connector);
 }
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Harry Wentland,
	Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Mikita Lipski, Lyude Paul,
	Nicholas Kazlauskas, David Francis, Pankaj Bharadiya

drm_fb_helper_{add,remove}_one_connector() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 0ef0eeb16778..0c4faba8ed28 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -440,9 +440,6 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 					struct drm_connector *connector)
 {
-	struct amdgpu_dm_connector *master = container_of(mgr, struct amdgpu_dm_connector, mst_mgr);
-	struct drm_device *dev = master->base.dev;
-	struct amdgpu_device *adev = dev->dev_private;
 	struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
 
 	DRM_INFO("DM_MST: Disabling connector: %p [id: %d] [master: %p]\n",
@@ -457,21 +454,11 @@ static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 	}
 
 	drm_connector_unregister(connector);
-	if (adev->mode_info.rfbdev)
-		drm_fb_helper_remove_one_connector(&adev->mode_info.rfbdev->helper, connector);
 	drm_connector_put(connector);
 }
 
 static void dm_dp_mst_register_connector(struct drm_connector *connector)
 {
-	struct drm_device *dev = connector->dev;
-	struct amdgpu_device *adev = dev->dev_private;
-
-	if (adev->mode_info.rfbdev)
-		drm_fb_helper_add_one_connector(&adev->mode_info.rfbdev->helper, connector);
-	else
-		DRM_ERROR("adev->mode_info.rfbdev is NULL\n");
-
 	drm_connector_register(connector);
 }
 
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 4/9] drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Joonas Lahtinen,
	Rodrigo Vivi, David Airlie, Ville Syrjälä,
	José Roberto de Souza, Chris Wilson, Lucas De Marchi,
	Maarten Lankhorst
  Cc: pankaj.laxminarayan.bharadiya

drm_fb_helper_{add,remove}_one_connector() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index d7bfa7c350e9..b15404a3b1ca 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -721,27 +721,15 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
 
 static void intel_dp_register_mst_connector(struct drm_connector *connector)
 {
-	struct drm_i915_private *dev_priv = to_i915(connector->dev);
-
-	if (dev_priv->fbdev)
-		drm_fb_helper_add_one_connector(&dev_priv->fbdev->helper,
-						connector);
-
 	drm_connector_register(connector);
 }
 
 static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 					   struct drm_connector *connector)
 {
-	struct drm_i915_private *dev_priv = to_i915(connector->dev);
-
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);
 	drm_connector_unregister(connector);
 
-	if (dev_priv->fbdev)
-		drm_fb_helper_remove_one_connector(&dev_priv->fbdev->helper,
-						   connector);
-
 	drm_connector_put(connector);
 }
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 4/9] drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Joonas Lahtinen,
	Rodrigo Vivi, David Airlie, Ville Syrjälä,
	José Roberto de Souza, Chris Wilson, Lucas De Marchi,
	Maarten Lankhorst

drm_fb_helper_{add,remove}_one_connector() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp_mst.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
index d7bfa7c350e9..b15404a3b1ca 100644
--- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
@@ -721,27 +721,15 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
 
 static void intel_dp_register_mst_connector(struct drm_connector *connector)
 {
-	struct drm_i915_private *dev_priv = to_i915(connector->dev);
-
-	if (dev_priv->fbdev)
-		drm_fb_helper_add_one_connector(&dev_priv->fbdev->helper,
-						connector);
-
 	drm_connector_register(connector);
 }
 
 static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
 					   struct drm_connector *connector)
 {
-	struct drm_i915_private *dev_priv = to_i915(connector->dev);
-
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);
 	drm_connector_unregister(connector);
 
-	if (dev_priv->fbdev)
-		drm_fb_helper_remove_one_connector(&dev_priv->fbdev->helper,
-						   connector);
-
 	drm_connector_put(connector);
 }
 
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie,
	Russell King, Andrzej Hajda, Neil Armstrong, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Inki Dae, Joonyoung Shim,
	Seung-Woo Kim, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski,
	Patrik Jakobsson, Joonas Lahtinen, Rodrigo Vivi, Rob Clark,
	Sean Paul, Ben Skeggs, Tomi Valkeinen, Sandy Huang,
	Heiko Stübner, Thierry Reding, Jonathan Hunter,
	Paul Kocialkowski, Maxime Ripard, Pankaj Bharadiya,
	Andrey Grodzovsky, Sam Ravnborg, Chris Wilson,
	Ville Syrjälä,
	Lyude Paul, Mikita Lipski, Takashi Iwai

drm_fb_helper_{add,remove}_one_connector() and
drm_fb_helper_single_add_all_connectors() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

This removal is done using below sementic patch:

@@
@@

- drm_fb_helper_single_add_all_connectors(...);

@@
expression e1;
statement S;
@@
- e1 = drm_fb_helper_single_add_all_connectors(...);
- S

@@
@@

- drm_fb_helper_add_one_connector(...);

@@
@@

- drm_fb_helper_remove_one_connector(...);

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        | 2 --
 drivers/gpu/drm/armada/armada_fbdev.c         | 6 ------
 drivers/gpu/drm/bridge/tc358764.c             | 2 --
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       | 1 -
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 8 --------
 drivers/gpu/drm/gma500/framebuffer.c          | 4 ----
 drivers/gpu/drm/i915/display/intel_fbdev.c    | 2 --
 drivers/gpu/drm/msm/msm_fbdev.c               | 4 ----
 drivers/gpu/drm/nouveau/dispnv50/disp.c       | 4 ----
 drivers/gpu/drm/nouveau/nouveau_fbcon.c       | 4 ----
 drivers/gpu/drm/omapdrm/omap_fbdev.c          | 4 ----
 drivers/gpu/drm/radeon/radeon_fb.c            | 4 ----
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 7 -------
 drivers/gpu/drm/tegra/fb.c                    | 6 ------
 14 files changed, 58 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 579d614c7b70..9ae7b61f696a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -342,8 +342,6 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
 		return ret;
 	}
 
-	drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
-
 	/* disable all the possible outputs/crtcs before entering KMS mode */
 	if (!amdgpu_device_has_dc_support(adev))
 		drm_helper_disable_unused_functions(adev->ddev);
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index 6254353c00ae..f2dc371bd8e5 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -135,12 +135,6 @@ int armada_fbdev_init(struct drm_device *dev)
 		goto err_fb_helper;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(fbh);
-	if (ret) {
-		DRM_ERROR("failed to add fb connectors\n");
-		goto err_fb_setup;
-	}
-
 	ret = drm_fb_helper_initial_config(fbh, 32);
 	if (ret) {
 		DRM_ERROR("failed to set initial config\n");
diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
index 283e4a8dd923..530342dd4a34 100644
--- a/drivers/gpu/drm/bridge/tc358764.c
+++ b/drivers/gpu/drm/bridge/tc358764.c
@@ -375,7 +375,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
 	drm_connector_attach_encoder(&ctx->connector, bridge->encoder);
 	drm_panel_attach(ctx->panel, &ctx->connector);
 	ctx->connector.funcs->reset(&ctx->connector);
-	drm_fb_helper_add_one_connector(drm->fb_helper, &ctx->connector);
 	drm_connector_register(&ctx->connector);
 
 	return 0;
@@ -387,7 +386,6 @@ static void tc358764_detach(struct drm_bridge *bridge)
 	struct drm_device *drm = bridge->dev;
 
 	drm_connector_unregister(&ctx->connector);
-	drm_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector);
 	drm_panel_detach(ctx->panel);
 	ctx->panel = NULL;
 	drm_connector_put(&ctx->connector);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 669d3857502a..38e43d957ae0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1514,7 +1514,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
 		return 0;
 
 	connector->funcs->reset(connector);
-	drm_fb_helper_add_one_connector(drm->fb_helper, connector);
 	drm_connector_register(connector);
 	return 0;
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 5afecb6a30ad..e6ceaf36fb04 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -207,14 +207,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
 		goto err_init;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret < 0) {
-		DRM_DEV_ERROR(dev->dev,
-			      "failed to register drm_fb_helper_connector.\n");
-		goto err_setup;
-
-	}
-
 	ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
 	if (ret < 0) {
 		DRM_DEV_ERROR(dev->dev,
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index fe892e1243db..1d8f67e4795a 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -517,10 +517,6 @@ int psb_fbdev_init(struct drm_device *dev)
 	if (ret)
 		goto free;
 
-	ret = drm_fb_helper_single_add_all_connectors(fb_helper);
-	if (ret)
-		goto fini;
-
 	/* disable all the possible outputs/crtcs before entering KMS mode */
 	drm_helper_disable_unused_functions(dev);
 
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 8f65963266a3..3bc804212a99 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -461,8 +461,6 @@ int intel_fbdev_init(struct drm_device *dev)
 	dev_priv->fbdev = ifbdev;
 	INIT_WORK(&dev_priv->fbdev_suspend_work, intel_fbdev_suspend_worker);
 
-	drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
-
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index b4f44146d9de..47235f8c5922 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -166,10 +166,6 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
 		goto fail;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret)
-		goto fini;
-
 	/* the fw fb could be anywhere in memory */
 	drm_fb_helper_remove_conflicting_framebuffers(NULL, "msm", false);
 
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index a3dc2ba19fb2..97dd50e2917d 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1265,8 +1265,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
 
 	drm_connector_unregister(&mstc->connector);
 
-	drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
-
 	drm_connector_put(&mstc->connector);
 }
 
@@ -1275,8 +1273,6 @@ nv50_mstm_register_connector(struct drm_connector *connector)
 {
 	struct nouveau_drm *drm = nouveau_drm(connector->dev);
 
-	drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
-
 	drm_connector_register(connector);
 }
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 21fc7c63e2f7..24d543a01f43 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -562,10 +562,6 @@ nouveau_fbcon_init(struct drm_device *dev)
 	if (ret)
 		goto free;
 
-	ret = drm_fb_helper_single_add_all_connectors(&fbcon->helper);
-	if (ret)
-		goto fini;
-
 	if (preferred_bpp != 8 && preferred_bpp != 16 && preferred_bpp != 32) {
 		if (drm->client.device.info.ram_size <= 32 * 1024 * 1024)
 			preferred_bpp = 8;
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index eba57ac31cc6..09a84919ef73 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -246,10 +246,6 @@ void omap_fbdev_init(struct drm_device *dev)
 	if (ret)
 		goto fail;
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret)
-		goto fini;
-
 	ret = drm_fb_helper_initial_config(helper, 32);
 	if (ret)
 		goto fini;
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 1c02cd771d52..cf3156a65fc1 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -358,10 +358,6 @@ int radeon_fbdev_init(struct radeon_device *rdev)
 	if (ret)
 		goto free;
 
-	ret = drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
-	if (ret)
-		goto fini;
-
 	/* disable all the possible outputs/crtcs before entering KMS mode */
 	drm_helper_disable_unused_functions(rdev->ddev);
 
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index 6ad4cce17089..2fdc455c4ad7 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -132,13 +132,6 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
 		return ret;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret < 0) {
-		DRM_DEV_ERROR(dev->dev,
-			      "Failed to add connectors - %d.\n", ret);
-		goto err_drm_fb_helper_fini;
-	}
-
 	ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
 	if (ret < 0) {
 		DRM_DEV_ERROR(dev->dev,
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index feefe62be8dd..b8a328f53862 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -321,12 +321,6 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,
 		return err;
 	}
 
-	err = drm_fb_helper_single_add_all_connectors(&fbdev->base);
-	if (err < 0) {
-		dev_err(drm->dev, "failed to add connectors: %d\n", err);
-		goto fini;
-	}
-
 	err = drm_fb_helper_initial_config(&fbdev->base, preferred_bpp);
 	if (err < 0) {
 		dev_err(drm->dev, "failed to set initial configuration: %d\n",
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Alex Deucher,
	Christian König, David (ChunMing) Zhou, David Airlie,
	Russell King, Andrzej Hajda, Neil Armstrong, Laurent Pinchart,
	Jonas Karlman, Jernej Skrabec, Inki Dae, Joonyoung Shim,
	Seung-Woo Kim, Kyungmin Park, Kukjin Kim, Krzysztof Kozlowski,
	Patrik Jakobsson, Joonas Lahtinen, Rodrigo Vivi, Rob Clark,
	Sean Paul, Ben Skeggs, Tomi Valkeinen, Sandy Huang,
	Heiko Stübner, Thierry Reding, Jonathan Hunter,
	Paul Kocialkowski, Maxime Ripard, Pankaj Bharadiya,
	Andrey Grodzovsky, Sam Ravnborg, Chris Wilson,
	Ville Syrjälä,
	Lyude Paul, Mikita Lipski, Takashi Iwai

drm_fb_helper_{add,remove}_one_connector() and
drm_fb_helper_single_add_all_connectors() are dummy functions now
and serve no purpose. Hence remove their calls.

This is the preparatory step for removing the
drm_fb_helper_{add,remove}_one_connector() functions from
drm_fb_helper.h

This removal is done using below sementic patch:

@@
@@

- drm_fb_helper_single_add_all_connectors(...);

@@
expression e1;
statement S;
@@
- e1 = drm_fb_helper_single_add_all_connectors(...);
- S

@@
@@

- drm_fb_helper_add_one_connector(...);

@@
@@

- drm_fb_helper_remove_one_connector(...);

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        | 2 --
 drivers/gpu/drm/armada/armada_fbdev.c         | 6 ------
 drivers/gpu/drm/bridge/tc358764.c             | 2 --
 drivers/gpu/drm/exynos/exynos_drm_dsi.c       | 1 -
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 8 --------
 drivers/gpu/drm/gma500/framebuffer.c          | 4 ----
 drivers/gpu/drm/i915/display/intel_fbdev.c    | 2 --
 drivers/gpu/drm/msm/msm_fbdev.c               | 4 ----
 drivers/gpu/drm/nouveau/dispnv50/disp.c       | 4 ----
 drivers/gpu/drm/nouveau/nouveau_fbcon.c       | 4 ----
 drivers/gpu/drm/omapdrm/omap_fbdev.c          | 4 ----
 drivers/gpu/drm/radeon/radeon_fb.c            | 4 ----
 drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 7 -------
 drivers/gpu/drm/tegra/fb.c                    | 6 ------
 14 files changed, 58 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 579d614c7b70..9ae7b61f696a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -342,8 +342,6 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
 		return ret;
 	}
 
-	drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
-
 	/* disable all the possible outputs/crtcs before entering KMS mode */
 	if (!amdgpu_device_has_dc_support(adev))
 		drm_helper_disable_unused_functions(adev->ddev);
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index 6254353c00ae..f2dc371bd8e5 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -135,12 +135,6 @@ int armada_fbdev_init(struct drm_device *dev)
 		goto err_fb_helper;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(fbh);
-	if (ret) {
-		DRM_ERROR("failed to add fb connectors\n");
-		goto err_fb_setup;
-	}
-
 	ret = drm_fb_helper_initial_config(fbh, 32);
 	if (ret) {
 		DRM_ERROR("failed to set initial config\n");
diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
index 283e4a8dd923..530342dd4a34 100644
--- a/drivers/gpu/drm/bridge/tc358764.c
+++ b/drivers/gpu/drm/bridge/tc358764.c
@@ -375,7 +375,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
 	drm_connector_attach_encoder(&ctx->connector, bridge->encoder);
 	drm_panel_attach(ctx->panel, &ctx->connector);
 	ctx->connector.funcs->reset(&ctx->connector);
-	drm_fb_helper_add_one_connector(drm->fb_helper, &ctx->connector);
 	drm_connector_register(&ctx->connector);
 
 	return 0;
@@ -387,7 +386,6 @@ static void tc358764_detach(struct drm_bridge *bridge)
 	struct drm_device *drm = bridge->dev;
 
 	drm_connector_unregister(&ctx->connector);
-	drm_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector);
 	drm_panel_detach(ctx->panel);
 	ctx->panel = NULL;
 	drm_connector_put(&ctx->connector);
diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
index 669d3857502a..38e43d957ae0 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
@@ -1514,7 +1514,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
 		return 0;
 
 	connector->funcs->reset(connector);
-	drm_fb_helper_add_one_connector(drm->fb_helper, connector);
 	drm_connector_register(connector);
 	return 0;
 }
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index 5afecb6a30ad..e6ceaf36fb04 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -207,14 +207,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
 		goto err_init;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret < 0) {
-		DRM_DEV_ERROR(dev->dev,
-			      "failed to register drm_fb_helper_connector.\n");
-		goto err_setup;
-
-	}
-
 	ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
 	if (ret < 0) {
 		DRM_DEV_ERROR(dev->dev,
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index fe892e1243db..1d8f67e4795a 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -517,10 +517,6 @@ int psb_fbdev_init(struct drm_device *dev)
 	if (ret)
 		goto free;
 
-	ret = drm_fb_helper_single_add_all_connectors(fb_helper);
-	if (ret)
-		goto fini;
-
 	/* disable all the possible outputs/crtcs before entering KMS mode */
 	drm_helper_disable_unused_functions(dev);
 
diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
index 8f65963266a3..3bc804212a99 100644
--- a/drivers/gpu/drm/i915/display/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
@@ -461,8 +461,6 @@ int intel_fbdev_init(struct drm_device *dev)
 	dev_priv->fbdev = ifbdev;
 	INIT_WORK(&dev_priv->fbdev_suspend_work, intel_fbdev_suspend_worker);
 
-	drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
-
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
index b4f44146d9de..47235f8c5922 100644
--- a/drivers/gpu/drm/msm/msm_fbdev.c
+++ b/drivers/gpu/drm/msm/msm_fbdev.c
@@ -166,10 +166,6 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
 		goto fail;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret)
-		goto fini;
-
 	/* the fw fb could be anywhere in memory */
 	drm_fb_helper_remove_conflicting_framebuffers(NULL, "msm", false);
 
diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index a3dc2ba19fb2..97dd50e2917d 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1265,8 +1265,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
 
 	drm_connector_unregister(&mstc->connector);
 
-	drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
-
 	drm_connector_put(&mstc->connector);
 }
 
@@ -1275,8 +1273,6 @@ nv50_mstm_register_connector(struct drm_connector *connector)
 {
 	struct nouveau_drm *drm = nouveau_drm(connector->dev);
 
-	drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
-
 	drm_connector_register(connector);
 }
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 21fc7c63e2f7..24d543a01f43 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -562,10 +562,6 @@ nouveau_fbcon_init(struct drm_device *dev)
 	if (ret)
 		goto free;
 
-	ret = drm_fb_helper_single_add_all_connectors(&fbcon->helper);
-	if (ret)
-		goto fini;
-
 	if (preferred_bpp != 8 && preferred_bpp != 16 && preferred_bpp != 32) {
 		if (drm->client.device.info.ram_size <= 32 * 1024 * 1024)
 			preferred_bpp = 8;
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index eba57ac31cc6..09a84919ef73 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -246,10 +246,6 @@ void omap_fbdev_init(struct drm_device *dev)
 	if (ret)
 		goto fail;
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret)
-		goto fini;
-
 	ret = drm_fb_helper_initial_config(helper, 32);
 	if (ret)
 		goto fini;
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 1c02cd771d52..cf3156a65fc1 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -358,10 +358,6 @@ int radeon_fbdev_init(struct radeon_device *rdev)
 	if (ret)
 		goto free;
 
-	ret = drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
-	if (ret)
-		goto fini;
-
 	/* disable all the possible outputs/crtcs before entering KMS mode */
 	drm_helper_disable_unused_functions(rdev->ddev);
 
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
index 6ad4cce17089..2fdc455c4ad7 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
@@ -132,13 +132,6 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
 		return ret;
 	}
 
-	ret = drm_fb_helper_single_add_all_connectors(helper);
-	if (ret < 0) {
-		DRM_DEV_ERROR(dev->dev,
-			      "Failed to add connectors - %d.\n", ret);
-		goto err_drm_fb_helper_fini;
-	}
-
 	ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
 	if (ret < 0) {
 		DRM_DEV_ERROR(dev->dev,
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index feefe62be8dd..b8a328f53862 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -321,12 +321,6 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,
 		return err;
 	}
 
-	err = drm_fb_helper_single_add_all_connectors(&fbdev->base);
-	if (err < 0) {
-		dev_err(drm->dev, "failed to add connectors: %d\n", err);
-		goto fini;
-	}
-
 	err = drm_fb_helper_initial_config(&fbdev->base, preferred_bpp);
 	if (err < 0) {
 		dev_err(drm->dev, "failed to set initial configuration: %d\n",
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 6/9] drm/nouveau: Fix unused variable warning
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Ben Skeggs,
	David Airlie, Lyude Paul, Sean Paul, Manasi Navare, Dave Airlie,
	Pankaj Bharadiya, Takashi Iwai

nouveau_drm pointer is not getting used anymore in
nv50_mstm_{register,destroy}_connector functions, hence remove it.

This fixes below warning.

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_destroy_connector’:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable ‘drm’ [-Wunused-variable]
  struct nouveau_drm *drm = nouveau_drm(connector->dev);
                      ^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_register_connector’:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable ‘drm’ [-Wunused-variable]
  struct nouveau_drm *drm = nouveau_drm(connector->dev);
                      ^~~

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 97dd50e2917d..4e164ad8003f 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1260,7 +1260,6 @@ static void
 nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
 			    struct drm_connector *connector)
 {
-	struct nouveau_drm *drm = nouveau_drm(connector->dev);
 	struct nv50_mstc *mstc = nv50_mstc(connector);
 
 	drm_connector_unregister(&mstc->connector);
@@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
 static void
 nv50_mstm_register_connector(struct drm_connector *connector)
 {
-	struct nouveau_drm *drm = nouveau_drm(connector->dev);
-
 	drm_connector_register(connector);
 }
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Ben Skeggs,
	David Airlie, Lyude Paul, Sean Paul, Manasi Navare, Dave Airlie,
	Pankaj Bharadiya, Takashi Iwai

nouveau_drm pointer is not getting used anymore in
nv50_mstm_{register,destroy}_connector functions, hence remove it.

This fixes below warning.

drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_destroy_connector’:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable ‘drm’ [-Wunused-variable]
  struct nouveau_drm *drm = nouveau_drm(connector->dev);
                      ^~~
drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_register_connector’:
drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable ‘drm’ [-Wunused-variable]
  struct nouveau_drm *drm = nouveau_drm(connector->dev);
                      ^~~

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
index 97dd50e2917d..4e164ad8003f 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
@@ -1260,7 +1260,6 @@ static void
 nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
 			    struct drm_connector *connector)
 {
-	struct nouveau_drm *drm = nouveau_drm(connector->dev);
 	struct nv50_mstc *mstc = nv50_mstc(connector);
 
 	drm_connector_unregister(&mstc->connector);
@@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
 static void
 nv50_mstm_register_connector(struct drm_connector *connector)
 {
-	struct nouveau_drm *drm = nouveau_drm(connector->dev);
-
 	drm_connector_register(connector);
 }
 
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Andrzej Hajda,
	Neil Armstrong, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	David Airlie
  Cc: pankaj.laxminarayan.bharadiya

drm_device pointer is not getting used in tc358764_detach() anymore,
hence remove it.

This fixes below warning.

drivers/gpu/drm/bridge/tc358764.c: In function ‘tc358764_detach’:
drivers/gpu/drm/bridge/tc358764.c:386:21: warning: unused variable ‘drm’ [-Wunused-variable]
  struct drm_device *drm = bridge->dev;
                     ^~~

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/bridge/tc358764.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
index 530342dd4a34..5ac1430fab04 100644
--- a/drivers/gpu/drm/bridge/tc358764.c
+++ b/drivers/gpu/drm/bridge/tc358764.c
@@ -383,7 +383,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
 static void tc358764_detach(struct drm_bridge *bridge)
 {
 	struct tc358764 *ctx = bridge_to_tc358764(bridge);
-	struct drm_device *drm = bridge->dev;
 
 	drm_connector_unregister(&ctx->connector);
 	drm_panel_detach(ctx->panel);
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Andrzej Hajda,
	Neil Armstrong, Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
	David Airlie

drm_device pointer is not getting used in tc358764_detach() anymore,
hence remove it.

This fixes below warning.

drivers/gpu/drm/bridge/tc358764.c: In function ‘tc358764_detach’:
drivers/gpu/drm/bridge/tc358764.c:386:21: warning: unused variable ‘drm’ [-Wunused-variable]
  struct drm_device *drm = bridge->dev;
                     ^~~

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 drivers/gpu/drm/bridge/tc358764.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
index 530342dd4a34..5ac1430fab04 100644
--- a/drivers/gpu/drm/bridge/tc358764.c
+++ b/drivers/gpu/drm/bridge/tc358764.c
@@ -383,7 +383,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
 static void tc358764_detach(struct drm_bridge *bridge)
 {
 	struct tc358764 *ctx = bridge_to_tc358764(bridge);
-	struct drm_device *drm = bridge->dev;
 
 	drm_connector_unregister(&ctx->connector);
 	drm_panel_detach(ctx->panel);
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie
  Cc: pankaj.laxminarayan.bharadiya

drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()
and drm_fb_helper_remove_one_connector() doesn't keep an array of
connectors anymore and are just dummy. Now we have no callers to these
functions hence remove them.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 include/drm/drm_fb_helper.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 62e8dda6d1d1..208dbf87afa3 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -451,27 +451,6 @@ drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
 
 #endif
 
-/* TODO: There's a todo entry to remove these three */
-static inline int
-drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
-{
-	return 0;
-}
-
-static inline int
-drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
-				struct drm_connector *connector)
-{
-	return 0;
-}
-
-static inline int
-drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
-				   struct drm_connector *connector)
-{
-	return 0;
-}
-
 /**
  * drm_fb_helper_remove_conflicting_framebuffers - remove firmware-configured framebuffers
  * @a: memory range, users of which are to be removed
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie

drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()
and drm_fb_helper_remove_one_connector() doesn't keep an array of
connectors anymore and are just dummy. Now we have no callers to these
functions hence remove them.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 include/drm/drm_fb_helper.h | 21 ---------------------
 1 file changed, 21 deletions(-)

diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 62e8dda6d1d1..208dbf87afa3 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -451,27 +451,6 @@ drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
 
 #endif
 
-/* TODO: There's a todo entry to remove these three */
-static inline int
-drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
-{
-	return 0;
-}
-
-static inline int
-drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
-				struct drm_connector *connector)
-{
-	return 0;
-}
-
-static inline int
-drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
-				   struct drm_connector *connector)
-{
-	return 0;
-}
-
 /**
  * drm_fb_helper_remove_conflicting_framebuffers - remove firmware-configured framebuffers
  * @a: memory range, users of which are to be removed
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [PATCH 9/9] drm/todo: Update drm_fb_helper tasks
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  -1 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Jonathan Corbet
  Cc: pankaj.laxminarayan.bharadiya

Remove completed drm_fb_helper tasks from todo list.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 Documentation/gpu/todo.rst | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index ccf5e8e34222..98d8782e1440 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -362,17 +362,10 @@ Level: Starter
 drm_fb_helper tasks
 -------------------
 
-- drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
-  not the _force variant so it can bail out if there is a master. But first
-  these igt tests need to be fixed: kms_fbcon_fbt@psr and
-  kms_fbcon_fbt@psr-suspend.
-
-- The max connector argument for drm_fb_helper_init() isn't used anymore and
-  can be removed.
-
-- The helper doesn't keep an array of connectors anymore so these can be
-  removed: drm_fb_helper_single_add_all_connectors(),
-  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
+drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
+not the _force variant so it can bail out if there is a master. But first
+these igt tests need to be fixed: kms_fbcon_fbt@psr and
+kms_fbcon_fbt@psr-suspend.
 
 Level: Intermediate
 
-- 
2.20.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* [Intel-gfx] [PATCH 9/9] drm/todo: Update drm_fb_helper tasks
@ 2020-03-02 12:56   ` Pankaj Bharadiya
  0 siblings, 0 replies; 53+ messages in thread
From: Pankaj Bharadiya @ 2020-03-02 12:56 UTC (permalink / raw)
  To: jani.nikula, daniel, intel-gfx, dri-devel, David Airlie,
	Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	Jonathan Corbet

Remove completed drm_fb_helper tasks from todo list.

Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
---
 Documentation/gpu/todo.rst | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index ccf5e8e34222..98d8782e1440 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -362,17 +362,10 @@ Level: Starter
 drm_fb_helper tasks
 -------------------
 
-- drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
-  not the _force variant so it can bail out if there is a master. But first
-  these igt tests need to be fixed: kms_fbcon_fbt@psr and
-  kms_fbcon_fbt@psr-suspend.
-
-- The max connector argument for drm_fb_helper_init() isn't used anymore and
-  can be removed.
-
-- The helper doesn't keep an array of connectors anymore so these can be
-  removed: drm_fb_helper_single_add_all_connectors(),
-  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
+drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
+not the _force variant so it can bail out if there is a master. But first
+these igt tests need to be fixed: kms_fbcon_fbt@psr and
+kms_fbcon_fbt@psr-suspend.
 
 Level: Intermediate
 
-- 
2.20.1

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

^ permalink raw reply related	[flat|nested] 53+ messages in thread

* Re: [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 13:27     ` Laurent Pinchart
  -1 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:27 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Jernej Skrabec, Neil Armstrong, David Airlie, intel-gfx,
	Jonas Karlman, dri-devel, Andrzej Hajda

Hi Pankaj,

Thank you for the patch.

You can squash this with the patch that introduced the issue in the same
series. Otherwise we will be left with a compilation breakage in the
history, which could be annoying when bisecting issues.

On Mon, Mar 02, 2020 at 06:26:47PM +0530, Pankaj Bharadiya wrote:
> drm_device pointer is not getting used in tc358764_detach() anymore,
> hence remove it.
> 
> This fixes below warning.
> 
> drivers/gpu/drm/bridge/tc358764.c: In function ‘tc358764_detach’:
> drivers/gpu/drm/bridge/tc358764.c:386:21: warning: unused variable ‘drm’ [-Wunused-variable]
>   struct drm_device *drm = bridge->dev;
>                      ^~~
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  drivers/gpu/drm/bridge/tc358764.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
> index 530342dd4a34..5ac1430fab04 100644
> --- a/drivers/gpu/drm/bridge/tc358764.c
> +++ b/drivers/gpu/drm/bridge/tc358764.c
> @@ -383,7 +383,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
>  static void tc358764_detach(struct drm_bridge *bridge)
>  {
>  	struct tc358764 *ctx = bridge_to_tc358764(bridge);
> -	struct drm_device *drm = bridge->dev;
>  
>  	drm_connector_unregister(&ctx->connector);
>  	drm_panel_detach(ctx->panel);

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach
@ 2020-03-02 13:27     ` Laurent Pinchart
  0 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:27 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Jernej Skrabec, Neil Armstrong, David Airlie, intel-gfx,
	Jonas Karlman, dri-devel, Andrzej Hajda

Hi Pankaj,

Thank you for the patch.

You can squash this with the patch that introduced the issue in the same
series. Otherwise we will be left with a compilation breakage in the
history, which could be annoying when bisecting issues.

On Mon, Mar 02, 2020 at 06:26:47PM +0530, Pankaj Bharadiya wrote:
> drm_device pointer is not getting used in tc358764_detach() anymore,
> hence remove it.
> 
> This fixes below warning.
> 
> drivers/gpu/drm/bridge/tc358764.c: In function ‘tc358764_detach’:
> drivers/gpu/drm/bridge/tc358764.c:386:21: warning: unused variable ‘drm’ [-Wunused-variable]
>   struct drm_device *drm = bridge->dev;
>                      ^~~
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  drivers/gpu/drm/bridge/tc358764.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
> index 530342dd4a34..5ac1430fab04 100644
> --- a/drivers/gpu/drm/bridge/tc358764.c
> +++ b/drivers/gpu/drm/bridge/tc358764.c
> @@ -383,7 +383,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
>  static void tc358764_detach(struct drm_bridge *bridge)
>  {
>  	struct tc358764 *ctx = bridge_to_tc358764(bridge);
> -	struct drm_device *drm = bridge->dev;
>  
>  	drm_connector_unregister(&ctx->connector);
>  	drm_panel_detach(ctx->panel);

-- 
Regards,

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 13:27     ` Laurent Pinchart
  -1 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:27 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: Thomas Zimmermann, David Airlie, intel-gfx, dri-devel

Hi Pankaj,

Thank you for the patch.

On Mon, Mar 02, 2020 at 06:26:48PM +0530, Pankaj Bharadiya wrote:
> drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()
> and drm_fb_helper_remove_one_connector() doesn't keep an array of

s/doesn't/don't/

> connectors anymore and are just dummy. Now we have no callers to these
> functions hence remove them.
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

I like this :-)

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  include/drm/drm_fb_helper.h | 21 ---------------------
>  1 file changed, 21 deletions(-)
> 
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 62e8dda6d1d1..208dbf87afa3 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -451,27 +451,6 @@ drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
>  
>  #endif
>  
> -/* TODO: There's a todo entry to remove these three */
> -static inline int
> -drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
> -{
> -	return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
> -				struct drm_connector *connector)
> -{
> -	return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
> -				   struct drm_connector *connector)
> -{
> -	return 0;
> -}
> -
>  /**
>   * drm_fb_helper_remove_conflicting_framebuffers - remove firmware-configured framebuffers
>   * @a: memory range, users of which are to be removed

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
@ 2020-03-02 13:27     ` Laurent Pinchart
  0 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:27 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Maxime Ripard, Thomas Zimmermann, David Airlie, intel-gfx, dri-devel

Hi Pankaj,

Thank you for the patch.

On Mon, Mar 02, 2020 at 06:26:48PM +0530, Pankaj Bharadiya wrote:
> drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()
> and drm_fb_helper_remove_one_connector() doesn't keep an array of

s/doesn't/don't/

> connectors anymore and are just dummy. Now we have no callers to these
> functions hence remove them.
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

I like this :-)

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  include/drm/drm_fb_helper.h | 21 ---------------------
>  1 file changed, 21 deletions(-)
> 
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 62e8dda6d1d1..208dbf87afa3 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -451,27 +451,6 @@ drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
>  
>  #endif
>  
> -/* TODO: There's a todo entry to remove these three */
> -static inline int
> -drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
> -{
> -	return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
> -				struct drm_connector *connector)
> -{
> -	return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
> -				   struct drm_connector *connector)
> -{
> -	return 0;
> -}
> -
>  /**
>   * drm_fb_helper_remove_conflicting_framebuffers - remove firmware-configured framebuffers
>   * @a: memory range, users of which are to be removed

-- 
Regards,

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 9/9] drm/todo: Update drm_fb_helper tasks
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 13:29     ` Laurent Pinchart
  -1 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:29 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Thomas Zimmermann, Jonathan Corbet, David Airlie, intel-gfx, dri-devel

Hi Pankaj,

Thank you for the patch.

On Mon, Mar 02, 2020 at 06:26:49PM +0530, Pankaj Bharadiya wrote:
> Remove completed drm_fb_helper tasks from todo list.
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  Documentation/gpu/todo.rst | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> index ccf5e8e34222..98d8782e1440 100644
> --- a/Documentation/gpu/todo.rst
> +++ b/Documentation/gpu/todo.rst
> @@ -362,17 +362,10 @@ Level: Starter
>  drm_fb_helper tasks
>  -------------------
>  
> -- drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> -  not the _force variant so it can bail out if there is a master. But first
> -  these igt tests need to be fixed: kms_fbcon_fbt@psr and
> -  kms_fbcon_fbt@psr-suspend.
> -
> -- The max connector argument for drm_fb_helper_init() isn't used anymore and
> -  can be removed.
> -
> -- The helper doesn't keep an array of connectors anymore so these can be
> -  removed: drm_fb_helper_single_add_all_connectors(),
> -  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
> +drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> +not the _force variant so it can bail out if there is a master. But first
> +these igt tests need to be fixed: kms_fbcon_fbt@psr and
> +kms_fbcon_fbt@psr-suspend.

No need to reflow, you can keep the first list entry as-is and just
remove the next two. With this fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  Level: Intermediate
>  

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 9/9] drm/todo: Update drm_fb_helper tasks
@ 2020-03-02 13:29     ` Laurent Pinchart
  0 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:29 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Maxime Ripard, Thomas Zimmermann, Jonathan Corbet, David Airlie,
	intel-gfx, dri-devel

Hi Pankaj,

Thank you for the patch.

On Mon, Mar 02, 2020 at 06:26:49PM +0530, Pankaj Bharadiya wrote:
> Remove completed drm_fb_helper tasks from todo list.
> 
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  Documentation/gpu/todo.rst | 15 ++++-----------
>  1 file changed, 4 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> index ccf5e8e34222..98d8782e1440 100644
> --- a/Documentation/gpu/todo.rst
> +++ b/Documentation/gpu/todo.rst
> @@ -362,17 +362,10 @@ Level: Starter
>  drm_fb_helper tasks
>  -------------------
>  
> -- drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> -  not the _force variant so it can bail out if there is a master. But first
> -  these igt tests need to be fixed: kms_fbcon_fbt@psr and
> -  kms_fbcon_fbt@psr-suspend.
> -
> -- The max connector argument for drm_fb_helper_init() isn't used anymore and
> -  can be removed.
> -
> -- The helper doesn't keep an array of connectors anymore so these can be
> -  removed: drm_fb_helper_single_add_all_connectors(),
> -  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
> +drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> +not the _force variant so it can bail out if there is a master. But first
> +these igt tests need to be fixed: kms_fbcon_fbt@psr and
> +kms_fbcon_fbt@psr-suspend.

No need to reflow, you can keep the first list entry as-is and just
remove the next two. With this fixed,

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

>  Level: Intermediate
>  

-- 
Regards,

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 6/9] drm/nouveau: Fix unused variable warning
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 13:30     ` Laurent Pinchart
  -1 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:30 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David Airlie, intel-gfx, dri-devel, Manasi Navare, Sean Paul,
	Dave Airlie, Ben Skeggs

Hi Pankaj,

Thank you for the patch.

On Mon, Mar 02, 2020 at 06:26:46PM +0530, Pankaj Bharadiya wrote:
> nouveau_drm pointer is not getting used anymore in
> nv50_mstm_{register,destroy}_connector functions, hence remove it.
> 
> This fixes below warning.
> 
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_destroy_connector’:
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable ‘drm’ [-Wunused-variable]
>   struct nouveau_drm *drm = nouveau_drm(connector->dev);
>                       ^~~
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_register_connector’:
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable ‘drm’ [-Wunused-variable]
>   struct nouveau_drm *drm = nouveau_drm(connector->dev);
>                       ^~~

As commented on 7/9, you should squash this with the patch that
introduces the warnings.

> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 97dd50e2917d..4e164ad8003f 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1260,7 +1260,6 @@ static void
>  nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
>  			    struct drm_connector *connector)
>  {
> -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
>  	struct nv50_mstc *mstc = nv50_mstc(connector);
>  
>  	drm_connector_unregister(&mstc->connector);
> @@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
>  static void
>  nv50_mstm_register_connector(struct drm_connector *connector)
>  {
> -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
> -
>  	drm_connector_register(connector);
>  }
>  

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning
@ 2020-03-02 13:30     ` Laurent Pinchart
  0 siblings, 0 replies; 53+ messages in thread
From: Laurent Pinchart @ 2020-03-02 13:30 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David Airlie, intel-gfx, dri-devel, Takashi Iwai, Sean Paul,
	Dave Airlie, Ben Skeggs

Hi Pankaj,

Thank you for the patch.

On Mon, Mar 02, 2020 at 06:26:46PM +0530, Pankaj Bharadiya wrote:
> nouveau_drm pointer is not getting used anymore in
> nv50_mstm_{register,destroy}_connector functions, hence remove it.
> 
> This fixes below warning.
> 
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_destroy_connector’:
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable ‘drm’ [-Wunused-variable]
>   struct nouveau_drm *drm = nouveau_drm(connector->dev);
>                       ^~~
> drivers/gpu/drm/nouveau/dispnv50/disp.c: In function ‘nv50_mstm_register_connector’:
> drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable ‘drm’ [-Wunused-variable]
>   struct nouveau_drm *drm = nouveau_drm(connector->dev);
>                       ^~~

As commented on 7/9, you should squash this with the patch that
introduces the warnings.

> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 97dd50e2917d..4e164ad8003f 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1260,7 +1260,6 @@ static void
>  nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
>  			    struct drm_connector *connector)
>  {
> -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
>  	struct nv50_mstc *mstc = nv50_mstc(connector);
>  
>  	drm_connector_unregister(&mstc->connector);
> @@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
>  static void
>  nv50_mstm_register_connector(struct drm_connector *connector)
>  {
> -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
> -
>  	drm_connector_register(connector);
>  }
>  

-- 
Regards,

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 13:44     ` Thomas Zimmermann
  -1 siblings, 0 replies; 53+ messages in thread
From: Thomas Zimmermann @ 2020-03-02 13:44 UTC (permalink / raw)
  To: Pankaj Bharadiya, jani.nikula, daniel, intel-gfx, dri-devel,
	Alex Deucher, Christian König, David (ChunMing) Zhou,
	David Airlie, Russell King, Maarten Lankhorst, Maxime Ripard,
	Inki Dae, Joonyoung Shim, Seung-Woo Kim, Kyungmin Park,
	Kukjin Kim, Krzysztof Kozlowski, Patrik Jakobsson,
	Joonas Lahtinen, Rodrigo Vivi, Rob Clark, Sean Paul, Ben Skeggs,
	Tomi Valkeinen, Sandy Huang, Heiko Stübner, Thierry Reding,
	Jonathan Hunter, Paul Kocialkowski, Emil Velikov,
	Andrey Grodzovsky, Sam Ravnborg, Chris Wilson,
	Ville Syrjälä,
	Matthew Auld


[-- 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 --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
@ 2020-03-02 13:44     ` Thomas Zimmermann
  0 siblings, 0 replies; 53+ messages in thread
From: Thomas Zimmermann @ 2020-03-02 13:44 UTC (permalink / raw)
  To: Pankaj Bharadiya, jani.nikula, daniel, intel-gfx, dri-devel,
	Alex Deucher, Christian König, David (ChunMing) Zhou,
	David Airlie, Russell King, Maarten Lankhorst, Maxime Ripard,
	Inki Dae, Joonyoung Shim, Seung-Woo Kim, Kyungmin Park,
	Kukjin Kim, Krzysztof Kozlowski, Patrik Jakobsson,
	Joonas Lahtinen, Rodrigo Vivi, Rob Clark, Sean Paul, Ben Skeggs,
	Tomi Valkeinen, Sandy Huang, Heiko Stübner, Thierry Reding,
	Jonathan Hunter, Paul Kocialkowski, Emil Velikov,
	Andrey Grodzovsky, Sam Ravnborg, Chris Wilson,
	Ville Syrjälä,
	Matthew Auld


[-- 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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: drm_fb_helper cleanup.
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
                   ` (9 preceding siblings ...)
  (?)
@ 2020-03-02 14:29 ` Patchwork
  -1 siblings, 0 replies; 53+ messages in thread
From: Patchwork @ 2020-03-02 14:29 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: intel-gfx

== Series Details ==

Series: drm: drm_fb_helper cleanup.
URL   : https://patchwork.freedesktop.org/series/74140/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
b1b805dc68b7 drm: Remove unused arg from drm_fb_helper_init
175d46a47660 drm/radeon: remove radeon_fb_{add, remove}_connector functions
af557abd14c0 drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls
e5c6aa01171c drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls
603f81467e6f drm: Remove drm_fb_helper add, add all and remove connector calls
93f41559c3b8 drm/nouveau: Fix unused variable warning
8a9bc6fce8b9 drm/bridge: remove unused variable warning in tc358764_detach
c159742eb80c drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
-:7: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#7: 
drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()

total: 0 errors, 1 warnings, 0 checks, 27 lines checked
04d65ea03552 drm/todo: Update drm_fb_helper tasks

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [Intel-gfx] ✗ Fi.CI.DOCS: warning for drm: drm_fb_helper cleanup.
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
                   ` (10 preceding siblings ...)
  (?)
@ 2020-03-02 14:47 ` Patchwork
  -1 siblings, 0 replies; 53+ messages in thread
From: Patchwork @ 2020-03-02 14:47 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: intel-gfx

== Series Details ==

Series: drm: drm_fb_helper cleanup.
URL   : https://patchwork.freedesktop.org/series/74140/
State : warning

== Summary ==

$ make htmldocs 2>&1 > /dev/null | grep i915
Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c
Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c
Error: Cannot open file ./drivers/gpu/drm/i915/intel_csr.c
./drivers/gpu/drm/i915/i915_vma.h:1: warning: 'Virtual Memory Address' not found
./drivers/gpu/drm/i915/i915_gem_gtt.c:1: warning: 'Global GTT views' not found
WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -function csr support for dmc ./drivers/gpu/drm/i915/intel_csr.c' failed with return code 1
WARNING: kernel-doc './scripts/kernel-doc -rst -enable-lineno -internal ./drivers/gpu/drm/i915/intel_csr.c' failed with return code 2

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm: drm_fb_helper cleanup.
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
                   ` (11 preceding siblings ...)
  (?)
@ 2020-03-02 15:04 ` Patchwork
  -1 siblings, 0 replies; 53+ messages in thread
From: Patchwork @ 2020-03-02 15:04 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: intel-gfx

== Series Details ==

Series: drm: drm_fb_helper cleanup.
URL   : https://patchwork.freedesktop.org/series/74140/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8043 -> Patchwork_16779
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16779/index.html

Known issues
------------

  Here are the changes found in Patchwork_16779 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_flink_basic@flink-lifetime:
    - fi-tgl-y:           [PASS][1] -> [DMESG-WARN][2] ([CI#94] / [i915#402])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8043/fi-tgl-y/igt@gem_flink_basic@flink-lifetime.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16779/fi-tgl-y/igt@gem_flink_basic@flink-lifetime.html

  
#### Possible fixes ####

  * igt@i915_selftest@live@execlists:
    - fi-icl-y:           [DMESG-FAIL][3] ([fdo#108569]) -> [PASS][4]
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8043/fi-icl-y/igt@i915_selftest@live@execlists.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16779/fi-icl-y/igt@i915_selftest@live@execlists.html

  * igt@kms_addfb_basic@bad-pitch-999:
    - fi-tgl-y:           [DMESG-WARN][5] ([CI#94] / [i915#402]) -> [PASS][6] +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8043/fi-tgl-y/igt@kms_addfb_basic@bad-pitch-999.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16779/fi-tgl-y/igt@kms_addfb_basic@bad-pitch-999.html

  
#### Warnings ####

  * igt@runner@aborted:
    - fi-kbl-8809g:       [FAIL][7] ([i915#192] / [i915#193] / [i915#194]) -> [FAIL][8] ([i915#1209])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8043/fi-kbl-8809g/igt@runner@aborted.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16779/fi-kbl-8809g/igt@runner@aborted.html

  
  [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
  [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
  [i915#1209]: https://gitlab.freedesktop.org/drm/intel/issues/1209
  [i915#192]: https://gitlab.freedesktop.org/drm/intel/issues/192
  [i915#193]: https://gitlab.freedesktop.org/drm/intel/issues/193
  [i915#194]: https://gitlab.freedesktop.org/drm/intel/issues/194
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402


Participating hosts (48 -> 37)
------------------------------

  Additional (3): fi-glk-dsi fi-byt-n2820 fi-elk-e7500 
  Missing    (14): fi-ilk-m540 fi-bdw-5557u fi-tgl-dsi fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-ivb-3770 fi-cfl-8109u fi-skl-lmem fi-bdw-samus fi-snb-2600 


Build changes
-------------

  * CI: CI-20190529 -> None
  * Linux: CI_DRM_8043 -> Patchwork_16779

  CI-20190529: 20190529
  CI_DRM_8043: 7e5119254441cdf0764418bbf3f43f6547d30a8a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_5483: 1707153df224ffb6333c6c660a792b7f334eb3d3 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_16779: 04d65ea0355241103891c9df04e5be19ccdf5512 @ git://anongit.freedesktop.org/gfx-ci/linux


== Linux commits ==

04d65ea03552 drm/todo: Update drm_fb_helper tasks
c159742eb80c drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
8a9bc6fce8b9 drm/bridge: remove unused variable warning in tc358764_detach
93f41559c3b8 drm/nouveau: Fix unused variable warning
603f81467e6f drm: Remove drm_fb_helper add, add all and remove connector calls
e5c6aa01171c drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls
af557abd14c0 drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls
175d46a47660 drm/radeon: remove radeon_fb_{add, remove}_connector functions
b1b805dc68b7 drm: Remove unused arg from drm_fb_helper_init

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16779/index.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup.
  2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 15:58   ` Emil Velikov
  -1 siblings, 0 replies; 53+ messages in thread
From: Emil Velikov @ 2020-03-02 15:58 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: ML dri-devel, Intel Graphics Development

On Mon, 2 Mar 2020 at 13:08, Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> This series addresses below drm_fb_helper tasks from
> Documentation/gpu/todo.rst.
>
> - The max connector argument for drm_fb_helper_init() isn't used
>   anymore and can be removed.
>
> - The helper doesn't keep an array of connectors anymore so these can
>   be removed: drm_fb_helper_single_add_all_connectors(),
>   drm_fb_helper_add_one_connector() and
>   drm_fb_helper_remove_one_connector().
>
> Pankaj Bharadiya (9):
>   drm: Remove unused arg from drm_fb_helper_init
>   drm/radeon: remove radeon_fb_{add,remove}_connector functions
>   drm/amdgpu: Remove drm_fb_helper_{add,remove}_one_connector calls
>   drm/i915/display: Remove drm_fb_helper_{add,remove}_one_connector calls
>   drm: Remove drm_fb_helper add, add all and remove connector calls
>   drm/nouveau: Fix unused variable warning
>   drm/bridge: remove unused variable warning in tc358764_detach
>   drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
>   drm/todo: Update drm_fb_helper tasks
>
With 6/9 and 7/9 squashed into 1/9, as suggested by Laurent + the
wrapping retained as-is, the series is:
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

-Emil
P.S. I'm loving the diff stat :-)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup.
@ 2020-03-02 15:58   ` Emil Velikov
  0 siblings, 0 replies; 53+ messages in thread
From: Emil Velikov @ 2020-03-02 15:58 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: ML dri-devel, Intel Graphics Development

On Mon, 2 Mar 2020 at 13:08, Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> This series addresses below drm_fb_helper tasks from
> Documentation/gpu/todo.rst.
>
> - The max connector argument for drm_fb_helper_init() isn't used
>   anymore and can be removed.
>
> - The helper doesn't keep an array of connectors anymore so these can
>   be removed: drm_fb_helper_single_add_all_connectors(),
>   drm_fb_helper_add_one_connector() and
>   drm_fb_helper_remove_one_connector().
>
> Pankaj Bharadiya (9):
>   drm: Remove unused arg from drm_fb_helper_init
>   drm/radeon: remove radeon_fb_{add,remove}_connector functions
>   drm/amdgpu: Remove drm_fb_helper_{add,remove}_one_connector calls
>   drm/i915/display: Remove drm_fb_helper_{add,remove}_one_connector calls
>   drm: Remove drm_fb_helper add, add all and remove connector calls
>   drm/nouveau: Fix unused variable warning
>   drm/bridge: remove unused variable warning in tc358764_detach
>   drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
>   drm/todo: Update drm_fb_helper tasks
>
With 6/9 and 7/9 squashed into 1/9, as suggested by Laurent + the
wrapping retained as-is, the series is:
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

-Emil
P.S. I'm loving the diff stat :-)
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup.
  2020-03-02 15:58   ` Emil Velikov
@ 2020-03-02 16:17     ` Emil Velikov
  -1 siblings, 0 replies; 53+ messages in thread
From: Emil Velikov @ 2020-03-02 16:17 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: ML dri-devel, Intel Graphics Development

On Mon, 2 Mar 2020 at 15:58, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>
> On Mon, 2 Mar 2020 at 13:08, Pankaj Bharadiya
> <pankaj.laxminarayan.bharadiya@intel.com> wrote:
> >
> > This series addresses below drm_fb_helper tasks from
> > Documentation/gpu/todo.rst.
> >
> > - The max connector argument for drm_fb_helper_init() isn't used
> >   anymore and can be removed.
> >
> > - The helper doesn't keep an array of connectors anymore so these can
> >   be removed: drm_fb_helper_single_add_all_connectors(),
> >   drm_fb_helper_add_one_connector() and
> >   drm_fb_helper_remove_one_connector().
> >
> > Pankaj Bharadiya (9):
> >   drm: Remove unused arg from drm_fb_helper_init
> >   drm/radeon: remove radeon_fb_{add,remove}_connector functions
> >   drm/amdgpu: Remove drm_fb_helper_{add,remove}_one_connector calls
> >   drm/i915/display: Remove drm_fb_helper_{add,remove}_one_connector calls
> >   drm: Remove drm_fb_helper add, add all and remove connector calls
> >   drm/nouveau: Fix unused variable warning
> >   drm/bridge: remove unused variable warning in tc358764_detach
> >   drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
> >   drm/todo: Update drm_fb_helper tasks
> >
> With 6/9 and 7/9 squashed into 1/9, as suggested by Laurent + the
Oops s;into 1/9;respective the patches;g

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 0/9] drm: drm_fb_helper cleanup.
@ 2020-03-02 16:17     ` Emil Velikov
  0 siblings, 0 replies; 53+ messages in thread
From: Emil Velikov @ 2020-03-02 16:17 UTC (permalink / raw)
  To: Pankaj Bharadiya; +Cc: ML dri-devel, Intel Graphics Development

On Mon, 2 Mar 2020 at 15:58, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>
> On Mon, 2 Mar 2020 at 13:08, Pankaj Bharadiya
> <pankaj.laxminarayan.bharadiya@intel.com> wrote:
> >
> > This series addresses below drm_fb_helper tasks from
> > Documentation/gpu/todo.rst.
> >
> > - The max connector argument for drm_fb_helper_init() isn't used
> >   anymore and can be removed.
> >
> > - The helper doesn't keep an array of connectors anymore so these can
> >   be removed: drm_fb_helper_single_add_all_connectors(),
> >   drm_fb_helper_add_one_connector() and
> >   drm_fb_helper_remove_one_connector().
> >
> > Pankaj Bharadiya (9):
> >   drm: Remove unused arg from drm_fb_helper_init
> >   drm/radeon: remove radeon_fb_{add,remove}_connector functions
> >   drm/amdgpu: Remove drm_fb_helper_{add,remove}_one_connector calls
> >   drm/i915/display: Remove drm_fb_helper_{add,remove}_one_connector calls
> >   drm: Remove drm_fb_helper add, add all and remove connector calls
> >   drm/nouveau: Fix unused variable warning
> >   drm/bridge: remove unused variable warning in tc358764_detach
> >   drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
> >   drm/todo: Update drm_fb_helper tasks
> >
> With 6/9 and 7/9 squashed into 1/9, as suggested by Laurent + the
Oops s;into 1/9;respective the patches;g

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 9/9] drm/todo: Update drm_fb_helper tasks
  2020-03-02 13:29     ` [Intel-gfx] " Laurent Pinchart
@ 2020-03-02 21:35       ` Daniel Vetter
  -1 siblings, 0 replies; 53+ messages in thread
From: Daniel Vetter @ 2020-03-02 21:35 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Thomas Zimmermann, Jonathan Corbet, David Airlie,
	Pankaj Bharadiya, intel-gfx, dri-devel

On Mon, Mar 02, 2020 at 03:29:42PM +0200, Laurent Pinchart wrote:
> Hi Pankaj,
> 
> Thank you for the patch.
> 
> On Mon, Mar 02, 2020 at 06:26:49PM +0530, Pankaj Bharadiya wrote:
> > Remove completed drm_fb_helper tasks from todo list.
> > 
> > Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> > ---
> >  Documentation/gpu/todo.rst | 15 ++++-----------
> >  1 file changed, 4 insertions(+), 11 deletions(-)
> > 
> > diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> > index ccf5e8e34222..98d8782e1440 100644
> > --- a/Documentation/gpu/todo.rst
> > +++ b/Documentation/gpu/todo.rst
> > @@ -362,17 +362,10 @@ Level: Starter
> >  drm_fb_helper tasks
> >  -------------------
> >  
> > -- drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> > -  not the _force variant so it can bail out if there is a master. But first
> > -  these igt tests need to be fixed: kms_fbcon_fbt@psr and
> > -  kms_fbcon_fbt@psr-suspend.
> > -
> > -- The max connector argument for drm_fb_helper_init() isn't used anymore and
> > -  can be removed.
> > -
> > -- The helper doesn't keep an array of connectors anymore so these can be
> > -  removed: drm_fb_helper_single_add_all_connectors(),
> > -  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
> > +drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> > +not the _force variant so it can bail out if there is a master. But first
> > +these igt tests need to be fixed: kms_fbcon_fbt@psr and
> > +kms_fbcon_fbt@psr-suspend.

This one here is also done already, see 

commit 64914da24ea95d2b2f7017d014d74c26005d8780
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Feb 4 16:01:43 2020 +0100

    drm/fbdev-helper: don't force restores

So you can delet the entire todo entry completely.

btw would be good to list the patches that fixed the other ones too, if
you can find them quickly in the logfiles.
-Daniel
    
> 
> No need to reflow, you can keep the first list entry as-is and just
> remove the next two. With this fixed,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  Level: Intermediate
> >  
> 
> -- 
> Regards,
> 
> Laurent Pinchart

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 9/9] drm/todo: Update drm_fb_helper tasks
@ 2020-03-02 21:35       ` Daniel Vetter
  0 siblings, 0 replies; 53+ messages in thread
From: Daniel Vetter @ 2020-03-02 21:35 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Maxime Ripard, Thomas Zimmermann, Jonathan Corbet, David Airlie,
	intel-gfx, dri-devel

On Mon, Mar 02, 2020 at 03:29:42PM +0200, Laurent Pinchart wrote:
> Hi Pankaj,
> 
> Thank you for the patch.
> 
> On Mon, Mar 02, 2020 at 06:26:49PM +0530, Pankaj Bharadiya wrote:
> > Remove completed drm_fb_helper tasks from todo list.
> > 
> > Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> > ---
> >  Documentation/gpu/todo.rst | 15 ++++-----------
> >  1 file changed, 4 insertions(+), 11 deletions(-)
> > 
> > diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
> > index ccf5e8e34222..98d8782e1440 100644
> > --- a/Documentation/gpu/todo.rst
> > +++ b/Documentation/gpu/todo.rst
> > @@ -362,17 +362,10 @@ Level: Starter
> >  drm_fb_helper tasks
> >  -------------------
> >  
> > -- drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> > -  not the _force variant so it can bail out if there is a master. But first
> > -  these igt tests need to be fixed: kms_fbcon_fbt@psr and
> > -  kms_fbcon_fbt@psr-suspend.
> > -
> > -- The max connector argument for drm_fb_helper_init() isn't used anymore and
> > -  can be removed.
> > -
> > -- The helper doesn't keep an array of connectors anymore so these can be
> > -  removed: drm_fb_helper_single_add_all_connectors(),
> > -  drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector().
> > +drm_fb_helper_restore_fbdev_mode_unlocked() should call restore_fbdev_mode()
> > +not the _force variant so it can bail out if there is a master. But first
> > +these igt tests need to be fixed: kms_fbcon_fbt@psr and
> > +kms_fbcon_fbt@psr-suspend.

This one here is also done already, see 

commit 64914da24ea95d2b2f7017d014d74c26005d8780
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Tue Feb 4 16:01:43 2020 +0100

    drm/fbdev-helper: don't force restores

So you can delet the entire todo entry completely.

btw would be good to list the patches that fixed the other ones too, if
you can find them quickly in the logfiles.
-Daniel
    
> 
> No need to reflow, you can keep the first list entry as-is and just
> remove the next two. With this fixed,
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  Level: Intermediate
> >  
> 
> -- 
> Regards,
> 
> Laurent Pinchart

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 21:38     ` Alex Deucher
  -1 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:38 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David Airlie, Maling list - DRI developers, Thierry Reding,
	Sam Ravnborg, Emil Velikov, Joonyoung Shim, Tomi Valkeinen,
	Russell King, Krzysztof Kozlowski, Jonathan Hunter, Kukjin Kim,
	Ben Skeggs, Matthew Auld, Intel Graphics Development,
	Rodrigo Vivi, Sean Paul, Seung-Woo Kim, Sandy Huang,
	Paul Kocialkowski, Kyungmin Park, Thomas Zimmermann,
	Alex Deucher, Christian König

On Mon, Mar 2, 2020 at 8:08 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> 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: Alex Deucher <alexander.deucher@amd.com>

> ---
>  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;
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init
@ 2020-03-02 21:38     ` Alex Deucher
  0 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:38 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Heiko Stübner, Andrey Grodzovsky, David Airlie,
	Maling list - DRI developers, Sam Ravnborg, Emil Velikov,
	David (ChunMing) Zhou, Joonyoung Shim, Tomi Valkeinen,
	Russell King, Krzysztof Kozlowski, Jonathan Hunter, Kukjin Kim,
	Ben Skeggs, Matthew Auld, Intel Graphics Development,
	Maxime Ripard, Inki Dae, Seung-Woo Kim, Sandy Huang,
	Paul Kocialkowski, Kyungmin Park, Thomas Zimmermann,
	Alex Deucher, Christian König

On Mon, Mar 2, 2020 at 8:08 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> 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: Alex Deucher <alexander.deucher@amd.com>

> ---
>  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;
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 21:41     ` Alex Deucher
  -1 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:41 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David Airlie, Intel Graphics Development,
	Maling list - DRI developers, Alex Deucher, Christian König

On Mon, Mar 2, 2020 at 8:08 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/radeon/radeon_dp_mst.c | 10 ----------
>  drivers/gpu/drm/radeon/radeon_fb.c     | 12 ------------
>  drivers/gpu/drm/radeon/radeon_mode.h   |  3 ---
>  3 files changed, 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> index 28eef9282874..5a9fb0ad175a 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> @@ -303,23 +303,13 @@ static struct drm_connector *radeon_dp_add_mst_connector(struct drm_dp_mst_topol
>
>  static void radeon_dp_register_mst_connector(struct drm_connector *connector)
>  {
> -       struct drm_device *dev = connector->dev;
> -       struct radeon_device *rdev = dev->dev_private;
> -
> -       radeon_fb_add_connector(rdev, connector);
> -
>         drm_connector_register(connector);
>  }
>
>  static void radeon_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>                                             struct drm_connector *connector)
>  {
> -       struct radeon_connector *master = container_of(mgr, struct radeon_connector, mst_mgr);
> -       struct drm_device *dev = master->base.dev;
> -       struct radeon_device *rdev = dev->dev_private;
> -
>         drm_connector_unregister(connector);
> -       radeon_fb_remove_connector(rdev, connector);
>         drm_connector_cleanup(connector);
>
>         kfree(connector);
> diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> index 85548cf2529a..1c02cd771d52 100644
> --- a/drivers/gpu/drm/radeon/radeon_fb.c
> +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> @@ -403,15 +403,3 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
>                 return true;
>         return false;
>  }
> -
> -void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector)
> -{
> -       if (rdev->mode_info.rfbdev)
> -               drm_fb_helper_add_one_connector(&rdev->mode_info.rfbdev->helper, connector);
> -}
> -
> -void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector)
> -{
> -       if (rdev->mode_info.rfbdev)
> -               drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector);
> -}
> diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
> index 629567da29f1..c7f223743d46 100644
> --- a/drivers/gpu/drm/radeon/radeon_mode.h
> +++ b/drivers/gpu/drm/radeon/radeon_mode.h
> @@ -986,9 +986,6 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
>
>  void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id);
>
> -void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector);
> -void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector);
> -
>  void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id);
>
>  int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled);
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions
@ 2020-03-02 21:41     ` Alex Deucher
  0 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:41 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David (ChunMing) Zhou, David Airlie, Intel Graphics Development,
	Maling list - DRI developers, Alex Deucher, Christian König

On Mon, Mar 2, 2020 at 8:08 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/radeon/radeon_dp_mst.c | 10 ----------
>  drivers/gpu/drm/radeon/radeon_fb.c     | 12 ------------
>  drivers/gpu/drm/radeon/radeon_mode.h   |  3 ---
>  3 files changed, 25 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_mst.c b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> index 28eef9282874..5a9fb0ad175a 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_mst.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_mst.c
> @@ -303,23 +303,13 @@ static struct drm_connector *radeon_dp_add_mst_connector(struct drm_dp_mst_topol
>
>  static void radeon_dp_register_mst_connector(struct drm_connector *connector)
>  {
> -       struct drm_device *dev = connector->dev;
> -       struct radeon_device *rdev = dev->dev_private;
> -
> -       radeon_fb_add_connector(rdev, connector);
> -
>         drm_connector_register(connector);
>  }
>
>  static void radeon_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>                                             struct drm_connector *connector)
>  {
> -       struct radeon_connector *master = container_of(mgr, struct radeon_connector, mst_mgr);
> -       struct drm_device *dev = master->base.dev;
> -       struct radeon_device *rdev = dev->dev_private;
> -
>         drm_connector_unregister(connector);
> -       radeon_fb_remove_connector(rdev, connector);
>         drm_connector_cleanup(connector);
>
>         kfree(connector);
> diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> index 85548cf2529a..1c02cd771d52 100644
> --- a/drivers/gpu/drm/radeon/radeon_fb.c
> +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> @@ -403,15 +403,3 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
>                 return true;
>         return false;
>  }
> -
> -void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector)
> -{
> -       if (rdev->mode_info.rfbdev)
> -               drm_fb_helper_add_one_connector(&rdev->mode_info.rfbdev->helper, connector);
> -}
> -
> -void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector)
> -{
> -       if (rdev->mode_info.rfbdev)
> -               drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector);
> -}
> diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
> index 629567da29f1..c7f223743d46 100644
> --- a/drivers/gpu/drm/radeon/radeon_mode.h
> +++ b/drivers/gpu/drm/radeon/radeon_mode.h
> @@ -986,9 +986,6 @@ bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj)
>
>  void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id);
>
> -void radeon_fb_add_connector(struct radeon_device *rdev, struct drm_connector *connector);
> -void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector *connector);
> -
>  void radeon_crtc_handle_flip(struct radeon_device *rdev, int crtc_id);
>
>  int radeon_align_pitch(struct radeon_device *rdev, int width, int bpp, bool tiled);
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 21:41     ` Alex Deucher
  -1 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:41 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Leo Li, Intel Graphics Development, Maling list - DRI developers,
	Nicholas Kazlauskas, David Airlie, David Francis, Alex Deucher,
	Mikita Lipski, Christian König

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 0ef0eeb16778..0c4faba8ed28 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -440,9 +440,6 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>  static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>                                         struct drm_connector *connector)
>  {
> -       struct amdgpu_dm_connector *master = container_of(mgr, struct amdgpu_dm_connector, mst_mgr);
> -       struct drm_device *dev = master->base.dev;
> -       struct amdgpu_device *adev = dev->dev_private;
>         struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
>
>         DRM_INFO("DM_MST: Disabling connector: %p [id: %d] [master: %p]\n",
> @@ -457,21 +454,11 @@ static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>         }
>
>         drm_connector_unregister(connector);
> -       if (adev->mode_info.rfbdev)
> -               drm_fb_helper_remove_one_connector(&adev->mode_info.rfbdev->helper, connector);
>         drm_connector_put(connector);
>  }
>
>  static void dm_dp_mst_register_connector(struct drm_connector *connector)
>  {
> -       struct drm_device *dev = connector->dev;
> -       struct amdgpu_device *adev = dev->dev_private;
> -
> -       if (adev->mode_info.rfbdev)
> -               drm_fb_helper_add_one_connector(&adev->mode_info.rfbdev->helper, connector);
> -       else
> -               DRM_ERROR("adev->mode_info.rfbdev is NULL\n");
> -
>         drm_connector_register(connector);
>  }
>
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls
@ 2020-03-02 21:41     ` Alex Deucher
  0 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:41 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David (ChunMing) Zhou, Leo Li, Intel Graphics Development,
	Maling list - DRI developers, Nicholas Kazlauskas, David Airlie,
	David Francis, Alex Deucher, Mikita Lipski, Harry Wentland,
	Christian König

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 13 -------------
>  1 file changed, 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 0ef0eeb16778..0c4faba8ed28 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -440,9 +440,6 @@ dm_dp_add_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>  static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>                                         struct drm_connector *connector)
>  {
> -       struct amdgpu_dm_connector *master = container_of(mgr, struct amdgpu_dm_connector, mst_mgr);
> -       struct drm_device *dev = master->base.dev;
> -       struct amdgpu_device *adev = dev->dev_private;
>         struct amdgpu_dm_connector *aconnector = to_amdgpu_dm_connector(connector);
>
>         DRM_INFO("DM_MST: Disabling connector: %p [id: %d] [master: %p]\n",
> @@ -457,21 +454,11 @@ static void dm_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>         }
>
>         drm_connector_unregister(connector);
> -       if (adev->mode_info.rfbdev)
> -               drm_fb_helper_remove_one_connector(&adev->mode_info.rfbdev->helper, connector);
>         drm_connector_put(connector);
>  }
>
>  static void dm_dp_mst_register_connector(struct drm_connector *connector)
>  {
> -       struct drm_device *dev = connector->dev;
> -       struct amdgpu_device *adev = dev->dev_private;
> -
> -       if (adev->mode_info.rfbdev)
> -               drm_fb_helper_add_one_connector(&adev->mode_info.rfbdev->helper, connector);
> -       else
> -               DRM_ERROR("adev->mode_info.rfbdev is NULL\n");
> -
>         drm_connector_register(connector);
>  }
>
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 4/9] drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 21:42     ` Alex Deucher
  -1 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:42 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David Airlie, Intel Graphics Development, Lucas De Marchi,
	Maling list - DRI developers, Rodrigo Vivi,
	José Roberto de Souza

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index d7bfa7c350e9..b15404a3b1ca 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -721,27 +721,15 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>
>  static void intel_dp_register_mst_connector(struct drm_connector *connector)
>  {
> -       struct drm_i915_private *dev_priv = to_i915(connector->dev);
> -
> -       if (dev_priv->fbdev)
> -               drm_fb_helper_add_one_connector(&dev_priv->fbdev->helper,
> -                                               connector);
> -
>         drm_connector_register(connector);
>  }
>
>  static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>                                            struct drm_connector *connector)
>  {
> -       struct drm_i915_private *dev_priv = to_i915(connector->dev);
> -
>         DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);
>         drm_connector_unregister(connector);
>
> -       if (dev_priv->fbdev)
> -               drm_fb_helper_remove_one_connector(&dev_priv->fbdev->helper,
> -                                                  connector);
> -
>         drm_connector_put(connector);
>  }
>
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 4/9] drm/i915/display: Remove drm_fb_helper_{add, remove}_one_connector calls
@ 2020-03-02 21:42     ` Alex Deucher
  0 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:42 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: David Airlie, Intel Graphics Development, Lucas De Marchi,
	Maling list - DRI developers

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 12 ------------
>  1 file changed, 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index d7bfa7c350e9..b15404a3b1ca 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -721,27 +721,15 @@ static struct drm_connector *intel_dp_add_mst_connector(struct drm_dp_mst_topolo
>
>  static void intel_dp_register_mst_connector(struct drm_connector *connector)
>  {
> -       struct drm_i915_private *dev_priv = to_i915(connector->dev);
> -
> -       if (dev_priv->fbdev)
> -               drm_fb_helper_add_one_connector(&dev_priv->fbdev->helper,
> -                                               connector);
> -
>         drm_connector_register(connector);
>  }
>
>  static void intel_dp_destroy_mst_connector(struct drm_dp_mst_topology_mgr *mgr,
>                                            struct drm_connector *connector)
>  {
> -       struct drm_i915_private *dev_priv = to_i915(connector->dev);
> -
>         DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, connector->name);
>         drm_connector_unregister(connector);
>
> -       if (dev_priv->fbdev)
> -               drm_fb_helper_remove_one_connector(&dev_priv->fbdev->helper,
> -                                                  connector);
> -
>         drm_connector_put(connector);
>  }
>
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 21:42     ` Alex Deucher
  -1 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:42 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Neil Armstrong, David Airlie, Maling list - DRI developers,
	Andrzej Hajda, Thierry Reding, Sam Ravnborg, Joonyoung Shim,
	Tomi Valkeinen, Russell King, Krzysztof Kozlowski,
	Jonathan Hunter, Kukjin Kim, Ben Skeggs, Jonas Karlman,
	Intel Graphics Development, Rodrigo Vivi, Mikita Lipski,
	Sean Paul, Jernej Skrabec, Seung-Woo Kim, Sandy Huang,
	Paul Kocialkowski, Kyungmin Park, Alex Deucher,
	Christian König, Laurent Pinchart

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() and
> drm_fb_helper_single_add_all_connectors() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> This removal is done using below sementic patch:
>
> @@
> @@
>
> - drm_fb_helper_single_add_all_connectors(...);
>
> @@
> expression e1;
> statement S;
> @@
> - e1 = drm_fb_helper_single_add_all_connectors(...);
> - S
>
> @@
> @@
>
> - drm_fb_helper_add_one_connector(...);
>
> @@
> @@
>
> - drm_fb_helper_remove_one_connector(...);
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        | 2 --
>  drivers/gpu/drm/armada/armada_fbdev.c         | 6 ------
>  drivers/gpu/drm/bridge/tc358764.c             | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c       | 1 -
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 8 --------
>  drivers/gpu/drm/gma500/framebuffer.c          | 4 ----
>  drivers/gpu/drm/i915/display/intel_fbdev.c    | 2 --
>  drivers/gpu/drm/msm/msm_fbdev.c               | 4 ----
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       | 4 ----
>  drivers/gpu/drm/nouveau/nouveau_fbcon.c       | 4 ----
>  drivers/gpu/drm/omapdrm/omap_fbdev.c          | 4 ----
>  drivers/gpu/drm/radeon/radeon_fb.c            | 4 ----
>  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 7 -------
>  drivers/gpu/drm/tegra/fb.c                    | 6 ------
>  14 files changed, 58 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index 579d614c7b70..9ae7b61f696a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -342,8 +342,6 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
>                 return ret;
>         }
>
> -       drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
> -
>         /* disable all the possible outputs/crtcs before entering KMS mode */
>         if (!amdgpu_device_has_dc_support(adev))
>                 drm_helper_disable_unused_functions(adev->ddev);
> diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
> index 6254353c00ae..f2dc371bd8e5 100644
> --- a/drivers/gpu/drm/armada/armada_fbdev.c
> +++ b/drivers/gpu/drm/armada/armada_fbdev.c
> @@ -135,12 +135,6 @@ int armada_fbdev_init(struct drm_device *dev)
>                 goto err_fb_helper;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(fbh);
> -       if (ret) {
> -               DRM_ERROR("failed to add fb connectors\n");
> -               goto err_fb_setup;
> -       }
> -
>         ret = drm_fb_helper_initial_config(fbh, 32);
>         if (ret) {
>                 DRM_ERROR("failed to set initial config\n");
> diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
> index 283e4a8dd923..530342dd4a34 100644
> --- a/drivers/gpu/drm/bridge/tc358764.c
> +++ b/drivers/gpu/drm/bridge/tc358764.c
> @@ -375,7 +375,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
>         drm_connector_attach_encoder(&ctx->connector, bridge->encoder);
>         drm_panel_attach(ctx->panel, &ctx->connector);
>         ctx->connector.funcs->reset(&ctx->connector);
> -       drm_fb_helper_add_one_connector(drm->fb_helper, &ctx->connector);
>         drm_connector_register(&ctx->connector);
>
>         return 0;
> @@ -387,7 +386,6 @@ static void tc358764_detach(struct drm_bridge *bridge)
>         struct drm_device *drm = bridge->dev;
>
>         drm_connector_unregister(&ctx->connector);
> -       drm_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector);
>         drm_panel_detach(ctx->panel);
>         ctx->panel = NULL;
>         drm_connector_put(&ctx->connector);
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 669d3857502a..38e43d957ae0 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1514,7 +1514,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
>                 return 0;
>
>         connector->funcs->reset(connector);
> -       drm_fb_helper_add_one_connector(drm->fb_helper, connector);
>         drm_connector_register(connector);
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index 5afecb6a30ad..e6ceaf36fb04 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -207,14 +207,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
>                 goto err_init;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret < 0) {
> -               DRM_DEV_ERROR(dev->dev,
> -                             "failed to register drm_fb_helper_connector.\n");
> -               goto err_setup;
> -
> -       }
> -
>         ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
>         if (ret < 0) {
>                 DRM_DEV_ERROR(dev->dev,
> diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
> index fe892e1243db..1d8f67e4795a 100644
> --- a/drivers/gpu/drm/gma500/framebuffer.c
> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> @@ -517,10 +517,6 @@ int psb_fbdev_init(struct drm_device *dev)
>         if (ret)
>                 goto free;
>
> -       ret = drm_fb_helper_single_add_all_connectors(fb_helper);
> -       if (ret)
> -               goto fini;
> -
>         /* disable all the possible outputs/crtcs before entering KMS mode */
>         drm_helper_disable_unused_functions(dev);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 8f65963266a3..3bc804212a99 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -461,8 +461,6 @@ int intel_fbdev_init(struct drm_device *dev)
>         dev_priv->fbdev = ifbdev;
>         INIT_WORK(&dev_priv->fbdev_suspend_work, intel_fbdev_suspend_worker);
>
> -       drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
> -
>         return 0;
>  }
>
> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> index b4f44146d9de..47235f8c5922 100644
> --- a/drivers/gpu/drm/msm/msm_fbdev.c
> +++ b/drivers/gpu/drm/msm/msm_fbdev.c
> @@ -166,10 +166,6 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
>                 goto fail;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret)
> -               goto fini;
> -
>         /* the fw fb could be anywhere in memory */
>         drm_fb_helper_remove_conflicting_framebuffers(NULL, "msm", false);
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index a3dc2ba19fb2..97dd50e2917d 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1265,8 +1265,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
>
>         drm_connector_unregister(&mstc->connector);
>
> -       drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
> -
>         drm_connector_put(&mstc->connector);
>  }
>
> @@ -1275,8 +1273,6 @@ nv50_mstm_register_connector(struct drm_connector *connector)
>  {
>         struct nouveau_drm *drm = nouveau_drm(connector->dev);
>
> -       drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
> -
>         drm_connector_register(connector);
>  }
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> index 21fc7c63e2f7..24d543a01f43 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> @@ -562,10 +562,6 @@ nouveau_fbcon_init(struct drm_device *dev)
>         if (ret)
>                 goto free;
>
> -       ret = drm_fb_helper_single_add_all_connectors(&fbcon->helper);
> -       if (ret)
> -               goto fini;
> -
>         if (preferred_bpp != 8 && preferred_bpp != 16 && preferred_bpp != 32) {
>                 if (drm->client.device.info.ram_size <= 32 * 1024 * 1024)
>                         preferred_bpp = 8;
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index eba57ac31cc6..09a84919ef73 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -246,10 +246,6 @@ void omap_fbdev_init(struct drm_device *dev)
>         if (ret)
>                 goto fail;
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret)
> -               goto fini;
> -
>         ret = drm_fb_helper_initial_config(helper, 32);
>         if (ret)
>                 goto fini;
> diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> index 1c02cd771d52..cf3156a65fc1 100644
> --- a/drivers/gpu/drm/radeon/radeon_fb.c
> +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> @@ -358,10 +358,6 @@ int radeon_fbdev_init(struct radeon_device *rdev)
>         if (ret)
>                 goto free;
>
> -       ret = drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
> -       if (ret)
> -               goto fini;
> -
>         /* disable all the possible outputs/crtcs before entering KMS mode */
>         drm_helper_disable_unused_functions(rdev->ddev);
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> index 6ad4cce17089..2fdc455c4ad7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> @@ -132,13 +132,6 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
>                 return ret;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret < 0) {
> -               DRM_DEV_ERROR(dev->dev,
> -                             "Failed to add connectors - %d.\n", ret);
> -               goto err_drm_fb_helper_fini;
> -       }
> -
>         ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
>         if (ret < 0) {
>                 DRM_DEV_ERROR(dev->dev,
> diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
> index feefe62be8dd..b8a328f53862 100644
> --- a/drivers/gpu/drm/tegra/fb.c
> +++ b/drivers/gpu/drm/tegra/fb.c
> @@ -321,12 +321,6 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,
>                 return err;
>         }
>
> -       err = drm_fb_helper_single_add_all_connectors(&fbdev->base);
> -       if (err < 0) {
> -               dev_err(drm->dev, "failed to add connectors: %d\n", err);
> -               goto fini;
> -       }
> -
>         err = drm_fb_helper_initial_config(&fbdev->base, preferred_bpp);
>         if (err < 0) {
>                 dev_err(drm->dev, "failed to set initial configuration: %d\n",
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls
@ 2020-03-02 21:42     ` Alex Deucher
  0 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:42 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Heiko Stübner, Neil Armstrong, David Airlie,
	Maling list - DRI developers, Andrzej Hajda, Sam Ravnborg,
	David (ChunMing) Zhou, Joonyoung Shim, Tomi Valkeinen,
	Russell King, Krzysztof Kozlowski, Jonathan Hunter, Takashi Iwai,
	Kukjin Kim, Ben Skeggs, Jonas Karlman,
	Intel Graphics Development, Inki Dae, Maxime Ripard,
	Mikita Lipski, Jernej Skrabec, Andrey Grodzovsky, Seung-Woo Kim,
	Sandy Huang, Paul Kocialkowski, Kyungmin Park, Alex Deucher,
	Christian König, Laurent Pinchart

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_{add,remove}_one_connector() and
> drm_fb_helper_single_add_all_connectors() are dummy functions now
> and serve no purpose. Hence remove their calls.
>
> This is the preparatory step for removing the
> drm_fb_helper_{add,remove}_one_connector() functions from
> drm_fb_helper.h
>
> This removal is done using below sementic patch:
>
> @@
> @@
>
> - drm_fb_helper_single_add_all_connectors(...);
>
> @@
> expression e1;
> statement S;
> @@
> - e1 = drm_fb_helper_single_add_all_connectors(...);
> - S
>
> @@
> @@
>
> - drm_fb_helper_add_one_connector(...);
>
> @@
> @@
>
> - drm_fb_helper_remove_one_connector(...);
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c        | 2 --
>  drivers/gpu/drm/armada/armada_fbdev.c         | 6 ------
>  drivers/gpu/drm/bridge/tc358764.c             | 2 --
>  drivers/gpu/drm/exynos/exynos_drm_dsi.c       | 1 -
>  drivers/gpu/drm/exynos/exynos_drm_fbdev.c     | 8 --------
>  drivers/gpu/drm/gma500/framebuffer.c          | 4 ----
>  drivers/gpu/drm/i915/display/intel_fbdev.c    | 2 --
>  drivers/gpu/drm/msm/msm_fbdev.c               | 4 ----
>  drivers/gpu/drm/nouveau/dispnv50/disp.c       | 4 ----
>  drivers/gpu/drm/nouveau/nouveau_fbcon.c       | 4 ----
>  drivers/gpu/drm/omapdrm/omap_fbdev.c          | 4 ----
>  drivers/gpu/drm/radeon/radeon_fb.c            | 4 ----
>  drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c | 7 -------
>  drivers/gpu/drm/tegra/fb.c                    | 6 ------
>  14 files changed, 58 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> index 579d614c7b70..9ae7b61f696a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
> @@ -342,8 +342,6 @@ int amdgpu_fbdev_init(struct amdgpu_device *adev)
>                 return ret;
>         }
>
> -       drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
> -
>         /* disable all the possible outputs/crtcs before entering KMS mode */
>         if (!amdgpu_device_has_dc_support(adev))
>                 drm_helper_disable_unused_functions(adev->ddev);
> diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
> index 6254353c00ae..f2dc371bd8e5 100644
> --- a/drivers/gpu/drm/armada/armada_fbdev.c
> +++ b/drivers/gpu/drm/armada/armada_fbdev.c
> @@ -135,12 +135,6 @@ int armada_fbdev_init(struct drm_device *dev)
>                 goto err_fb_helper;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(fbh);
> -       if (ret) {
> -               DRM_ERROR("failed to add fb connectors\n");
> -               goto err_fb_setup;
> -       }
> -
>         ret = drm_fb_helper_initial_config(fbh, 32);
>         if (ret) {
>                 DRM_ERROR("failed to set initial config\n");
> diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
> index 283e4a8dd923..530342dd4a34 100644
> --- a/drivers/gpu/drm/bridge/tc358764.c
> +++ b/drivers/gpu/drm/bridge/tc358764.c
> @@ -375,7 +375,6 @@ static int tc358764_attach(struct drm_bridge *bridge,
>         drm_connector_attach_encoder(&ctx->connector, bridge->encoder);
>         drm_panel_attach(ctx->panel, &ctx->connector);
>         ctx->connector.funcs->reset(&ctx->connector);
> -       drm_fb_helper_add_one_connector(drm->fb_helper, &ctx->connector);
>         drm_connector_register(&ctx->connector);
>
>         return 0;
> @@ -387,7 +386,6 @@ static void tc358764_detach(struct drm_bridge *bridge)
>         struct drm_device *drm = bridge->dev;
>
>         drm_connector_unregister(&ctx->connector);
> -       drm_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector);
>         drm_panel_detach(ctx->panel);
>         ctx->panel = NULL;
>         drm_connector_put(&ctx->connector);
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> index 669d3857502a..38e43d957ae0 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c
> @@ -1514,7 +1514,6 @@ static int exynos_dsi_create_connector(struct drm_encoder *encoder)
>                 return 0;
>
>         connector->funcs->reset(connector);
> -       drm_fb_helper_add_one_connector(drm->fb_helper, connector);
>         drm_connector_register(connector);
>         return 0;
>  }
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> index 5afecb6a30ad..e6ceaf36fb04 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
> @@ -207,14 +207,6 @@ int exynos_drm_fbdev_init(struct drm_device *dev)
>                 goto err_init;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret < 0) {
> -               DRM_DEV_ERROR(dev->dev,
> -                             "failed to register drm_fb_helper_connector.\n");
> -               goto err_setup;
> -
> -       }
> -
>         ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
>         if (ret < 0) {
>                 DRM_DEV_ERROR(dev->dev,
> diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
> index fe892e1243db..1d8f67e4795a 100644
> --- a/drivers/gpu/drm/gma500/framebuffer.c
> +++ b/drivers/gpu/drm/gma500/framebuffer.c
> @@ -517,10 +517,6 @@ int psb_fbdev_init(struct drm_device *dev)
>         if (ret)
>                 goto free;
>
> -       ret = drm_fb_helper_single_add_all_connectors(fb_helper);
> -       if (ret)
> -               goto fini;
> -
>         /* disable all the possible outputs/crtcs before entering KMS mode */
>         drm_helper_disable_unused_functions(dev);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbdev.c b/drivers/gpu/drm/i915/display/intel_fbdev.c
> index 8f65963266a3..3bc804212a99 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbdev.c
> @@ -461,8 +461,6 @@ int intel_fbdev_init(struct drm_device *dev)
>         dev_priv->fbdev = ifbdev;
>         INIT_WORK(&dev_priv->fbdev_suspend_work, intel_fbdev_suspend_worker);
>
> -       drm_fb_helper_single_add_all_connectors(&ifbdev->helper);
> -
>         return 0;
>  }
>
> diff --git a/drivers/gpu/drm/msm/msm_fbdev.c b/drivers/gpu/drm/msm/msm_fbdev.c
> index b4f44146d9de..47235f8c5922 100644
> --- a/drivers/gpu/drm/msm/msm_fbdev.c
> +++ b/drivers/gpu/drm/msm/msm_fbdev.c
> @@ -166,10 +166,6 @@ struct drm_fb_helper *msm_fbdev_init(struct drm_device *dev)
>                 goto fail;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret)
> -               goto fini;
> -
>         /* the fw fb could be anywhere in memory */
>         drm_fb_helper_remove_conflicting_framebuffers(NULL, "msm", false);
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index a3dc2ba19fb2..97dd50e2917d 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -1265,8 +1265,6 @@ nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
>
>         drm_connector_unregister(&mstc->connector);
>
> -       drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
> -
>         drm_connector_put(&mstc->connector);
>  }
>
> @@ -1275,8 +1273,6 @@ nv50_mstm_register_connector(struct drm_connector *connector)
>  {
>         struct nouveau_drm *drm = nouveau_drm(connector->dev);
>
> -       drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
> -
>         drm_connector_register(connector);
>  }
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> index 21fc7c63e2f7..24d543a01f43 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
> @@ -562,10 +562,6 @@ nouveau_fbcon_init(struct drm_device *dev)
>         if (ret)
>                 goto free;
>
> -       ret = drm_fb_helper_single_add_all_connectors(&fbcon->helper);
> -       if (ret)
> -               goto fini;
> -
>         if (preferred_bpp != 8 && preferred_bpp != 16 && preferred_bpp != 32) {
>                 if (drm->client.device.info.ram_size <= 32 * 1024 * 1024)
>                         preferred_bpp = 8;
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index eba57ac31cc6..09a84919ef73 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -246,10 +246,6 @@ void omap_fbdev_init(struct drm_device *dev)
>         if (ret)
>                 goto fail;
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret)
> -               goto fini;
> -
>         ret = drm_fb_helper_initial_config(helper, 32);
>         if (ret)
>                 goto fini;
> diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
> index 1c02cd771d52..cf3156a65fc1 100644
> --- a/drivers/gpu/drm/radeon/radeon_fb.c
> +++ b/drivers/gpu/drm/radeon/radeon_fb.c
> @@ -358,10 +358,6 @@ int radeon_fbdev_init(struct radeon_device *rdev)
>         if (ret)
>                 goto free;
>
> -       ret = drm_fb_helper_single_add_all_connectors(&rfbdev->helper);
> -       if (ret)
> -               goto fini;
> -
>         /* disable all the possible outputs/crtcs before entering KMS mode */
>         drm_helper_disable_unused_functions(rdev->ddev);
>
> diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> index 6ad4cce17089..2fdc455c4ad7 100644
> --- a/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> +++ b/drivers/gpu/drm/rockchip/rockchip_drm_fbdev.c
> @@ -132,13 +132,6 @@ int rockchip_drm_fbdev_init(struct drm_device *dev)
>                 return ret;
>         }
>
> -       ret = drm_fb_helper_single_add_all_connectors(helper);
> -       if (ret < 0) {
> -               DRM_DEV_ERROR(dev->dev,
> -                             "Failed to add connectors - %d.\n", ret);
> -               goto err_drm_fb_helper_fini;
> -       }
> -
>         ret = drm_fb_helper_initial_config(helper, PREFERRED_BPP);
>         if (ret < 0) {
>                 DRM_DEV_ERROR(dev->dev,
> diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
> index feefe62be8dd..b8a328f53862 100644
> --- a/drivers/gpu/drm/tegra/fb.c
> +++ b/drivers/gpu/drm/tegra/fb.c
> @@ -321,12 +321,6 @@ static int tegra_fbdev_init(struct tegra_fbdev *fbdev,
>                 return err;
>         }
>
> -       err = drm_fb_helper_single_add_all_connectors(&fbdev->base);
> -       if (err < 0) {
> -               dev_err(drm->dev, "failed to add connectors: %d\n", err);
> -               goto fini;
> -       }
> -
>         err = drm_fb_helper_initial_config(&fbdev->base, preferred_bpp);
>         if (err < 0) {
>                 dev_err(drm->dev, "failed to set initial configuration: %d\n",
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
  2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
@ 2020-03-02 21:43     ` Alex Deucher
  -1 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:43 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Thomas Zimmermann, David Airlie, Intel Graphics Development,
	Maling list - DRI developers

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()
> and drm_fb_helper_remove_one_connector() doesn't keep an array of
> connectors anymore and are just dummy. Now we have no callers to these
> functions hence remove them.
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  include/drm/drm_fb_helper.h | 21 ---------------------
>  1 file changed, 21 deletions(-)
>
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 62e8dda6d1d1..208dbf87afa3 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -451,27 +451,6 @@ drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
>
>  #endif
>
> -/* TODO: There's a todo entry to remove these three */
> -static inline int
> -drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
> -{
> -       return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
> -                               struct drm_connector *connector)
> -{
> -       return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
> -                                  struct drm_connector *connector)
> -{
> -       return 0;
> -}
> -
>  /**
>   * drm_fb_helper_remove_conflicting_framebuffers - remove firmware-configured framebuffers
>   * @a: memory range, users of which are to be removed
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions
@ 2020-03-02 21:43     ` Alex Deucher
  0 siblings, 0 replies; 53+ messages in thread
From: Alex Deucher @ 2020-03-02 21:43 UTC (permalink / raw)
  To: Pankaj Bharadiya
  Cc: Maxime Ripard, Thomas Zimmermann, David Airlie,
	Intel Graphics Development, Maling list - DRI developers

On Mon, Mar 2, 2020 at 8:09 AM Pankaj Bharadiya
<pankaj.laxminarayan.bharadiya@intel.com> wrote:
>
> drm_fb_helper_single_add_all_connectors(), drm_fb_helper_add_one_connector()
> and drm_fb_helper_remove_one_connector() doesn't keep an array of
> connectors anymore and are just dummy. Now we have no callers to these
> functions hence remove them.
>
> Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  include/drm/drm_fb_helper.h | 21 ---------------------
>  1 file changed, 21 deletions(-)
>
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index 62e8dda6d1d1..208dbf87afa3 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -451,27 +451,6 @@ drm_fbdev_generic_setup(struct drm_device *dev, unsigned int preferred_bpp)
>
>  #endif
>
> -/* TODO: There's a todo entry to remove these three */
> -static inline int
> -drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
> -{
> -       return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
> -                               struct drm_connector *connector)
> -{
> -       return 0;
> -}
> -
> -static inline int
> -drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
> -                                  struct drm_connector *connector)
> -{
> -       return 0;
> -}
> -
>  /**
>   * drm_fb_helper_remove_conflicting_framebuffers - remove firmware-configured framebuffers
>   * @a: memory range, users of which are to be removed
> --
> 2.20.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [PATCH 6/9] drm/nouveau: Fix unused variable warning
  2020-03-02 13:30     ` [Intel-gfx] " Laurent Pinchart
@ 2020-03-03 18:58       ` Lyude Paul
  -1 siblings, 0 replies; 53+ messages in thread
From: Lyude Paul @ 2020-03-03 18:58 UTC (permalink / raw)
  To: Laurent Pinchart, Pankaj Bharadiya
  Cc: David Airlie, intel-gfx, dri-devel, Manasi Navare, Sean Paul,
	Dave Airlie, Ben Skeggs

On Mon, 2020-03-02 at 15:30 +0200, Laurent Pinchart wrote:
> Hi Pankaj,
> 
> Thank you for the patch.
> 
> On Mon, Mar 02, 2020 at 06:26:46PM +0530, Pankaj Bharadiya wrote:
> > nouveau_drm pointer is not getting used anymore in
> > nv50_mstm_{register,destroy}_connector functions, hence remove it.
> > 
> > This fixes below warning.
> > 
> > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function
> > ‘nv50_mstm_destroy_connector’:
> > drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable
> > ‘drm’ [-Wunused-variable]
> >   struct nouveau_drm *drm = nouveau_drm(connector->dev);
> >                       ^~~
> > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function
> > ‘nv50_mstm_register_connector’:
> > drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable
> > ‘drm’ [-Wunused-variable]
> >   struct nouveau_drm *drm = nouveau_drm(connector->dev);
> >                       ^~~
> 
> As commented on 7/9, you should squash this with the patch that
> introduces the warnings.

Agreed, with the patches squashed you can count this as:

Reviewed-by: Lyude Paul <lyude@redhat.com>

fwiw - completely optional but if you'd like, you can probably also go ahead
and remove drm_dp_mst_topology_mgr_cbs.register_connector and
drm_dp_mst_topology_mgr_cbs.destroy_connector and replace them with open-
coding, since those callbacks are literally identical amongst every driver and
don't do anything other then call
drm_connector_register()/drm_connector_unregister()/drm_connector_put().

> > Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> > ---
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > index 97dd50e2917d..4e164ad8003f 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > @@ -1260,7 +1260,6 @@ static void
> >  nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
> >  			    struct drm_connector *connector)
> >  {
> > -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
> >  	struct nv50_mstc *mstc = nv50_mstc(connector);
> >  
> >  	drm_connector_unregister(&mstc->connector);
> > @@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct
> > drm_dp_mst_topology_mgr *mgr,
> >  static void
> >  nv50_mstm_register_connector(struct drm_connector *connector)
> >  {
> > -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
> > -
> >  	drm_connector_register(connector);
> >  }
> >  
-- 
Cheers,
	Lyude Paul (she/her)
	Associate Software Engineer at Red Hat

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 53+ messages in thread

* Re: [Intel-gfx] [PATCH 6/9] drm/nouveau: Fix unused variable warning
@ 2020-03-03 18:58       ` Lyude Paul
  0 siblings, 0 replies; 53+ messages in thread
From: Lyude Paul @ 2020-03-03 18:58 UTC (permalink / raw)
  To: Laurent Pinchart, Pankaj Bharadiya
  Cc: David Airlie, intel-gfx, dri-devel, Takashi Iwai, Sean Paul,
	Dave Airlie, Ben Skeggs

On Mon, 2020-03-02 at 15:30 +0200, Laurent Pinchart wrote:
> Hi Pankaj,
> 
> Thank you for the patch.
> 
> On Mon, Mar 02, 2020 at 06:26:46PM +0530, Pankaj Bharadiya wrote:
> > nouveau_drm pointer is not getting used anymore in
> > nv50_mstm_{register,destroy}_connector functions, hence remove it.
> > 
> > This fixes below warning.
> > 
> > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function
> > ‘nv50_mstm_destroy_connector’:
> > drivers/gpu/drm/nouveau/dispnv50/disp.c:1263:22: warning: unused variable
> > ‘drm’ [-Wunused-variable]
> >   struct nouveau_drm *drm = nouveau_drm(connector->dev);
> >                       ^~~
> > drivers/gpu/drm/nouveau/dispnv50/disp.c: In function
> > ‘nv50_mstm_register_connector’:
> > drivers/gpu/drm/nouveau/dispnv50/disp.c:1274:22: warning: unused variable
> > ‘drm’ [-Wunused-variable]
> >   struct nouveau_drm *drm = nouveau_drm(connector->dev);
> >                       ^~~
> 
> As commented on 7/9, you should squash this with the patch that
> introduces the warnings.

Agreed, with the patches squashed you can count this as:

Reviewed-by: Lyude Paul <lyude@redhat.com>

fwiw - completely optional but if you'd like, you can probably also go ahead
and remove drm_dp_mst_topology_mgr_cbs.register_connector and
drm_dp_mst_topology_mgr_cbs.destroy_connector and replace them with open-
coding, since those callbacks are literally identical amongst every driver and
don't do anything other then call
drm_connector_register()/drm_connector_unregister()/drm_connector_put().

> > Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
> > ---
> >  drivers/gpu/drm/nouveau/dispnv50/disp.c | 3 ---
> >  1 file changed, 3 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > index 97dd50e2917d..4e164ad8003f 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> > @@ -1260,7 +1260,6 @@ static void
> >  nv50_mstm_destroy_connector(struct drm_dp_mst_topology_mgr *mgr,
> >  			    struct drm_connector *connector)
> >  {
> > -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
> >  	struct nv50_mstc *mstc = nv50_mstc(connector);
> >  
> >  	drm_connector_unregister(&mstc->connector);
> > @@ -1271,8 +1270,6 @@ nv50_mstm_destroy_connector(struct
> > drm_dp_mst_topology_mgr *mgr,
> >  static void
> >  nv50_mstm_register_connector(struct drm_connector *connector)
> >  {
> > -	struct nouveau_drm *drm = nouveau_drm(connector->dev);
> > -
> >  	drm_connector_register(connector);
> >  }
> >  
-- 
Cheers,
	Lyude Paul (she/her)
	Associate Software Engineer at Red Hat

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

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2020-03-03 18:59 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 12:56 [PATCH 0/9] drm: drm_fb_helper cleanup Pankaj Bharadiya
2020-03-02 12:56 ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 12:56 ` [PATCH 1/9] drm: Remove unused arg from drm_fb_helper_init Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 13:44   ` Thomas Zimmermann
2020-03-02 13:44     ` [Intel-gfx] " Thomas Zimmermann
2020-03-02 21:38   ` Alex Deucher
2020-03-02 21:38     ` [Intel-gfx] " Alex Deucher
2020-03-02 12:56 ` [PATCH 2/9] drm/radeon: remove radeon_fb_{add, remove}_connector functions Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 21:41   ` Alex Deucher
2020-03-02 21:41     ` [Intel-gfx] " Alex Deucher
2020-03-02 12:56 ` [PATCH 3/9] drm/amdgpu: Remove drm_fb_helper_{add, remove}_one_connector calls Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 21:41   ` Alex Deucher
2020-03-02 21:41     ` [Intel-gfx] " Alex Deucher
2020-03-02 12:56 ` [PATCH 4/9] drm/i915/display: " Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 21:42   ` Alex Deucher
2020-03-02 21:42     ` [Intel-gfx] " Alex Deucher
2020-03-02 12:56 ` [PATCH 5/9] drm: Remove drm_fb_helper add, add all and remove connector calls Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 21:42   ` Alex Deucher
2020-03-02 21:42     ` [Intel-gfx] " Alex Deucher
2020-03-02 12:56 ` [PATCH 6/9] drm/nouveau: Fix unused variable warning Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 13:30   ` Laurent Pinchart
2020-03-02 13:30     ` [Intel-gfx] " Laurent Pinchart
2020-03-03 18:58     ` Lyude Paul
2020-03-03 18:58       ` [Intel-gfx] " Lyude Paul
2020-03-02 12:56 ` [PATCH 7/9] drm/bridge: remove unused variable warning in tc358764_detach Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 13:27   ` Laurent Pinchart
2020-03-02 13:27     ` [Intel-gfx] " Laurent Pinchart
2020-03-02 12:56 ` [PATCH 8/9] drm/fb-helper: Remove drm_fb_helper add, add_all and remove connector functions Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 13:27   ` Laurent Pinchart
2020-03-02 13:27     ` [Intel-gfx] " Laurent Pinchart
2020-03-02 21:43   ` Alex Deucher
2020-03-02 21:43     ` [Intel-gfx] " Alex Deucher
2020-03-02 12:56 ` [PATCH 9/9] drm/todo: Update drm_fb_helper tasks Pankaj Bharadiya
2020-03-02 12:56   ` [Intel-gfx] " Pankaj Bharadiya
2020-03-02 13:29   ` Laurent Pinchart
2020-03-02 13:29     ` [Intel-gfx] " Laurent Pinchart
2020-03-02 21:35     ` Daniel Vetter
2020-03-02 21:35       ` [Intel-gfx] " 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 15:58   ` Emil Velikov
2020-03-02 16:17   ` Emil Velikov
2020-03-02 16:17     ` Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.