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

Commit 7d78f564 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: misc: hbtp_input: filter out fb events"

parents b1980b6b 78f7468f
Loading
Loading
Loading
Loading
+19 −2
Original line number Diff line number Diff line
@@ -109,10 +109,27 @@ static int fb_notifier_callback(struct notifier_block *self,
{
	int blank;
	struct fb_event *evdata = data;
	struct fb_info *fbi = NULL;
	struct hbtp_data *hbtp_data =
	container_of(self, struct hbtp_data, fb_notif);

	if (evdata && evdata->data && hbtp_data &&
	if (!evdata) {
		pr_debug("evdata is NULL");
		return 0;
	}
	fbi = evdata->info;

	/*
	 * Node 0 is the primary display and others are
	 * external displays such as HDMI/DP.
	 * We need to handle only fb event for the primary display.
	 */
	if (!fbi || fbi->node != 0) {
		pr_debug("%s: no need to handle the fb event", __func__);
		return 0;
	}

	if (evdata->data && hbtp_data &&
		(event == FB_EARLY_EVENT_BLANK ||
		event == FB_R_EARLY_EVENT_BLANK)) {
		blank = *(int *)(evdata->data);
@@ -141,7 +158,7 @@ static int fb_notifier_callback(struct notifier_block *self,
		}
	}

	if (evdata && evdata->data && hbtp_data &&
	if (evdata->data && hbtp_data &&
		event == FB_EVENT_BLANK) {
		blank = *(int *)(evdata->data);
		if (blank == FB_BLANK_POWERDOWN) {