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

Commit 0ca2e2dc authored by Tatenda Chipeperekwa's avatar Tatenda Chipeperekwa
Browse files

disp: msm: dp: send hotplug notification on state change



Send the hotplug notification to the user space only when there
is a state change e.g. from connect to disconnect, or vice versa.
This ensures that there are no spurious notifications that are
sent to the user space.

CRs-Fixed: 2478822
Change-Id: Ic3fdc95de5f2573a14cb526203d7e4ab58c567ba
Signed-off-by: default avatarTatenda Chipeperekwa <tatendac@codeaurora.org>
parent 66b5946f
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -64,6 +64,7 @@ struct dp_display_private {
	bool core_initialized;
	bool power_on;
	bool is_connected;
	enum drm_connector_status cached_connector_status;

	atomic_t aborted;

@@ -568,6 +569,13 @@ static void dp_display_send_hpd_event(struct dp_display_private *dp)
	}

	connector->status = connector->funcs->detect(connector, false);
	if (dp->cached_connector_status == connector->status) {
		DP_DEBUG("connector status (%d) unchanged, skipping uevent\n",
				dp->cached_connector_status);
		return;
	}

	dp->cached_connector_status = connector->status;

	dev = connector->dev;

@@ -1368,6 +1376,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
		goto error_debug;
	}

	dp->cached_connector_status = connector_status_disconnected;
	dp->tot_dsc_blks_in_use = 0;

	dp->debug->hdcp_disabled = hdcp_disabled;