hwc: Trigger dynamic refresh-rate change for more usecases
* Until now it's been the case that refresh-rates were set to
the standard values of 24, 30, 48 and 60 for video playback
usecases. Since of the most panel vendors can only support
refresh-rates above 45, in many of the use-cases with fps < 45,
dynamic change in panel refresh rate doesn't happen.
* To address this, following are the changes done:
1. Refresh-rate will no longer be limited to standard values
for video-playback usecases and any value above the
minfpsSupported which is advertised by the mdss driver will
be considered.
2. If the fps of the use-case is 'x' and it falls less than
minfpsSupported, a multiple of it 'k*x' will be considered as
the new refresh-rate, provided k*x < 60. If
abs(k*x - stdRefreshRate) < 2, set the refresh-rate to the
standard value rather than k*x.
* With the above two optimizations in place, if the panel has
a minfpsSupported value of 45, and if the use-case fps is 12,
the new refresh-rate would be set as 12 * 4(= 48) instead of 60
which had been the case.
* The above two optimizations will result in dynamic change in
refresh-rate happening more often, in local video and streaming
use-cases and will help in improving DOU(Days Of Use) metric.
Change-Id: I2051e4d91280867135bf592e8f561911adcb6228
2 files changed