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

Commit 3fbcbd56 authored by Ujwal Patel's avatar Ujwal Patel Committed by Gerrit - the friendly Code Review server
Browse files

msm: mdss: wake up threads relying on shutdown notice



In the current framebuffer driver, user context may be put to sleep
to serialize certain operations. These contexts are woken up on certain
conditions, one of which is system shutdown notification. Current api
used, wait_event_timeout, relies on wait queue to be woken up if any
variable that could change the result of the sleep condition. So when
shutdown context is active, it needs to wake up threads waiting on
shutdown notification else they will timeout and may delay the shutdown
process.

Change-Id: I11b97e4c65b434c5f35d455a5040f407a1460516
Signed-off-by: default avatarUjwal Patel <ujwalp@codeaurora.org>
parent 1f6197d5
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -793,6 +793,11 @@ static void mdss_fb_shutdown(struct platform_device *pdev)
	struct msm_fb_data_type *mfd = platform_get_drvdata(pdev);

	mfd->shutdown_pending = true;

	/* wake up threads waiting on idle or kickoff queues */
	wake_up_all(&mfd->idle_wait_q);
	wake_up_all(&mfd->kickoff_wait_q);

	lock_fb_info(mfd->fbi);
	mdss_fb_release_all(mfd->fbi, true);
	sysfs_notify(&mfd->fbi->dev->kobj, NULL, "show_blank_event");