Commit acf5ff29 authored by Lyude Paul's avatar Lyude Paul
Browse files

drm/bridge/analogix/anx6345: Don't link encoder until after connector registration



Another case of linking an encoder to a connector after the connector's
been registered. The proper place to do this is before connector
registration, so let's fix that.

Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Reviewed-by: default avatarRobert Foss <robert.foss@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20210219215326.2227596-12-lyude@redhat.com
parent ba5070ec
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -556,12 +556,6 @@ static int anx6345_bridge_attach(struct drm_bridge *bridge,
	drm_connector_helper_add(&anx6345->connector,
				 &anx6345_connector_helper_funcs);

	err = drm_connector_register(&anx6345->connector);
	if (err) {
		DRM_ERROR("Failed to register connector: %d\n", err);
		return err;
	}

	anx6345->connector.polled = DRM_CONNECTOR_POLL_HPD;

	err = drm_connector_attach_encoder(&anx6345->connector,
@@ -571,6 +565,12 @@ static int anx6345_bridge_attach(struct drm_bridge *bridge,
		return err;
	}

	err = drm_connector_register(&anx6345->connector);
	if (err) {
		DRM_ERROR("Failed to register connector: %d\n", err);
		return err;
	}

	return 0;
}