Commit ff1f62d3 authored by Pankaj Bharadiya's avatar Pankaj Bharadiya Committed by Daniel Vetter
Browse files

drm: Remove drm_fb_helper add, add all and remove connector calls



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 and unused variable
compilation warnings are fixed manually.

@@
@@

- 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(...);

Changes since v1:
* Squashed warning fixes into the patch that introduced the
  warnings (into 5/7) (Laurent, Emil, Lyude)

Signed-off-by: default avatarPankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20200305120434.111091-6-pankaj.laxminarayan.bharadiya@intel.com
parent 75b2ccde
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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);
+0 −6
Original line number Diff line number Diff line
@@ -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");
+0 −3
Original line number Diff line number Diff line
@@ -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;
@@ -384,10 +383,8 @@ 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_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector);
	drm_panel_detach(ctx->panel);
	ctx->panel = NULL;
	drm_connector_put(&ctx->connector);
+0 −1
Original line number Diff line number Diff line
@@ -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;
}
+0 −8
Original line number Diff line number Diff line
@@ -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,
Loading