Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d948c05a authored by Ajay Singh Parmar's avatar Ajay Singh Parmar
Browse files

drm/msm/dp: invoke device tree parser on probe



Call device tree parser in probe after initialization of
parser sub-module. Currently it is being called in DRM bind
call that happens after DP driver is registered with DRM.
In case a cable connect event is received before the bind
call, other sub-modules like power may crash as parse has
not been called yet. Call parser as soon as parser sub-module
is ready to avoid uninitialized data access.

CRs-Fixed: 2134333
Change-Id: Id25b70d2e4fd59dbd36e6db2173b54b687914fe5
Signed-off-by: default avatarAjay Singh Parmar <aparmar@codeaurora.org>
parent d0c491f1
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -363,12 +363,6 @@ static int dp_display_bind(struct device *dev, struct device *master,
	dp->dp_display.drm_dev = drm;
	priv = drm->dev_private;

	rc = dp->parser->parse(dp->parser);
	if (rc) {
		pr_err("device tree parsing failed\n");
		goto end;
	}

	rc = dp->aux->drm_aux_register(dp->aux);
	if (rc) {
		pr_err("DRM DP AUX register failed\n");
@@ -806,6 +800,12 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
		goto error_parser;
	}

	rc = dp->parser->parse(dp->parser);
	if (rc) {
		pr_err("device tree parsing failed\n");
		goto error_catalog;
	}

	dp->catalog = dp_catalog_get(dev, &dp->parser->io);
	if (IS_ERR(dp->catalog)) {
		rc = PTR_ERR(dp->catalog);