Park Ju Hyung 2021026503 drm/msm: Do not notify events during system shutdown
It's been observed that a panic could occur due to a race with
a MSM_DRM_BLANK_POWERDOWN handler and a driver removal function
upon shutdown while the screen is on.

Since this shouldn't happen, send DRM events only when the system is running.

This doesn't seem to be easy to detect as the events are sent after the
userspace drm process terminates, which is before init binary notifies
the kernel about the shutdown.

Workaround this by detecting shutdown upon sysrq kill-all-tasks(i),
sent from the init binary.

Change-Id: Ibb79bda42af633c957e1f5ec436355d5bfdec21e
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
2024-08-17 19:36:04 -03:00
..