From 5999c4377671e07ea153a2c64b8d52dfbbae180a Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Thu, 13 Jun 2019 17:22:00 -0500 Subject: [PATCH] Added patch to stabilize suspend/wakeup patch fixes suspend and wakeup that is initiated by closing/opening the lid of the machine, this does not fix the bug the occurs when a DE is installed, a lock screen is used, and login is completed before the vop_crtc_enable_vblank backtrace gets dumped to the console --- ...p-events-on-resume-only-if-supported.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 resources/BuildResources/patches-tested/kernel/0030-cros-ec-check-for-mkbp-events-on-resume-only-if-supported.patch diff --git a/resources/BuildResources/patches-tested/kernel/0030-cros-ec-check-for-mkbp-events-on-resume-only-if-supported.patch b/resources/BuildResources/patches-tested/kernel/0030-cros-ec-check-for-mkbp-events-on-resume-only-if-supported.patch new file mode 100644 index 0000000..93461c1 --- /dev/null +++ b/resources/BuildResources/patches-tested/kernel/0030-cros-ec-check-for-mkbp-events-on-resume-only-if-supported.patch @@ -0,0 +1,45 @@ +commit 987775dbc2ad01135e429a2ba102d26515f45a3b [log] [tgz] +author RaviChandra Sadineni Mon Aug 20 15:34:19 2018 +committer chrome-bot Wed Apr 03 19:28:35 2019 +tree 1d07649cd5eb868676b3d6c21be4db64f6e4d36f +parent e68bb06b8ad62d1bd5d7081ba58e2c765ee7cb20 [diff] + +UPSTREAM: mfd: cros_ec: Check for mkbp events on resume only if supported. + +Currently on every resume we check for mkbp events and notify the +clients. This helps in identifying the wakeup sources. But on devices +that do not support mkbp protocol, we might end up querying key state of +the keyboard in a loop which blocks the resume. Instead check for events +only if mkbp is supported. + +Signed-off-by: RaviChandra Sadineni +Reported-by: Marek Szyprowski +Tested-by: Marek Szyprowski +Signed-off-by: Lee Jones +(cherry picked from commit 61cc15dac01ae84281222452e338ca060179d8b1) + +BUG=chromium:941638 +TEST=Suspend/resume doesn't hang anymore + +Change-Id: I3914077c8feae2025ed98443b8ea2f958160a3e6 +Signed-off-by: Douglas Anderson +Reviewed-on: https://chromium-review.googlesource.com/1549746 +Reviewed-by: Sean Paul +Reviewed-by: Ravi Chandra Sadineni + +diff --git a/drivers/mfd/cros_ec.c b/drivers/mfd/cros_ec.c +index f4ad853..02774d9 100644 +--- a/drivers/mfd/cros_ec.c ++++ b/drivers/mfd/cros_ec.c + +@@ -225,7 +225,8 @@ + + static void cros_ec_report_events_during_suspend(struct cros_ec_device *ec_dev) + { +- while (cros_ec_get_next_event(ec_dev, NULL) > 0) ++ while (ec_dev->mkbp_event_supported && ++ cros_ec_get_next_event(ec_dev, NULL) > 0) + blocking_notifier_call_chain(&ec_dev->event_notifier, + 1, ec_dev); + } +