From 1012b94af973092296f928d4294efde370377338 Mon Sep 17 00:00:00 2001 From: tomascus Date: Wed, 13 Feb 2019 14:42:27 +1100 Subject: [PATCH] sdm710-common: power: Don't use SCROLL_PREFILING The current use of the SCROLL_PREFILING hint hurts scroll performance and results in a lot of dropped frames. The hint ID corresponding to SCROLL_PREFILING only takes into effect for a default timeout value of 80 ms (as found in perfboostsconfig.xml), while the duration value in the process_interaction_hint function runs for a much longer time, from 1500 ms up to 5000 ms (bounds of kMinFlingDuration and kMaxInteractiveDuration). During the period of time, when the timeout value has elapsed and current time is less than duration, another interaction hint cannot be processed. Therefore, if the user decides to scroll during this period, high frame drops can be experienced as the CPU freq isn't raised by processing another hint to account for this additional scrolling. By only using SCROLL_VERTICAL, fluidity can be maintained, improving user experience. Change-Id: I2fbde8b2db6710d262e9a058e0bc9c02e524648c Signed-off-by: SamarV-121 --- power/power-710.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/power/power-710.c b/power/power-710.c index 4632e6e..0fb3f11 100644 --- a/power/power-710.c +++ b/power/power-710.c @@ -56,7 +56,6 @@ const int kMaxLaunchDuration = 5000; /* ms */ const int kMaxInteractiveDuration = 5000; /* ms */ const int kMinInteractiveDuration = 100; /* ms */ -const int kMinFlingDuration = 1500; /* ms */ typedef enum { NORMAL_MODE = 0, @@ -253,11 +252,8 @@ static int process_interaction_hint(void* data) { s_previous_boost_timespec = cur_boost_timespec; s_previous_duration = duration; - if (duration >= kMinFlingDuration) { - perf_hint_enable_with_type(VENDOR_HINT_SCROLL_BOOST, -1, SCROLL_PREFILING); - } else { - perf_hint_enable_with_type(VENDOR_HINT_SCROLL_BOOST, duration, SCROLL_VERTICAL); - } + perf_hint_enable_with_type(VENDOR_HINT_SCROLL_BOOST, duration, SCROLL_VERTICAL); + return HINT_HANDLED; }