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

Commit d7017bf5 authored by Narender Ankam's avatar Narender Ankam Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: hdmi: handle hpd uevents notifications gracefully



Notify HDMI HPD uevents only when there is a change in HPD
connection state.

Change-Id: I679a9dc0fddc0aec5728cf7572b2d373b17ff1c2
Signed-off-by: default avatarNarender Ankam <nankam@codeaurora.org>
parent f9d020d2
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -427,7 +427,7 @@ static inline void hdmi_tx_audio_notify(
}

static void hdmi_tx_send_cable_notification(
		struct hdmi_tx_ctrl *hdmi_ctrl, int val)
		struct hdmi_tx_ctrl *hdmi_ctrl, bool val)
{
	char name[HPD_STRING_SIZE], status[HPD_STRING_SIZE];
	char *envp[3];
@@ -437,6 +437,13 @@ static void hdmi_tx_send_cable_notification(
		return;
	}

	if (hdmi_ctrl->hpd_notif_state == !!val) {
		pr_debug("%s: no change in HPD state\n", __func__);
		return;
	}

	hdmi_ctrl->hpd_notif_state = !!val;

	snprintf(name, HPD_STRING_SIZE, "name=%s", "HDMI");
	snprintf(status, HPD_STRING_SIZE, "status=%s",
			val ? "connected" : "disconnected");
+1 −0
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ struct hdmi_tx_ctrl {
	u32 hdmi_tx_major_version;
	u32 max_pclk_khz;
	u32 hpd_state;
	bool hpd_notif_state;
	u32 hpd_off_pending;
	u32 hpd_feature_on;
	u32 hpd_initialized;