s3cfb: Don't lock for vsync poll

Ioctl vsync polling runs in its own thread and will always hold
a lock on the framebuffer, only releasing on a vsync event, causing
microlags. Do not lock to prevent the issue from happening.

Not locking should not have any negative effect because the original
uevent code does not lock anyway.

From patch http://review.cyanogenmod.com/#/c/23634

Change-Id: I9fc56503f9952ae5dfc14eda64e0a43361ca2478
block: prepare I/O context code for BFQ-v5 for 3.0

BFQ uses struct cfq_io_context to store its per-process per-device data,
reusing the same code for cic handling of CFQ.  The code is not shared
ATM to minimize the impact of these patches.

This patch introduces a new hlist to each io_context to store all the
cic's allocated by BFQ to allow calling the right destructor on module
unload; the radix tree used for cic lookup needs to be duplicated
because it can contain dead keys inserted by a scheduler and later
retrieved by the other one.

Update the io_context exit and free paths to take care also of
the BFQ cic's.

Change the type of cfqq inside struct cfq_io_context to void *
to use it also for BFQ per-queue data.

A new bfq-specific ioprio_changed field is necessary, too, to avoid
clobbering cfq's one, so switch ioprio_changed to a bitmap, with one
element per scheduler.

Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: KalimochoAz <calimochoazucarado@gmail.com>
block: cgroups, kconfig, build bits for BFQ-v5-3.0

Add a Kconfig option and do the related Makefile changes to compile
the BFQ I/O scheduler.  Also let the cgroups subsystem know about the
BFQ I/O controller.

Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: KalimochoAz <calimochoazucarado@gmail.com>
block: introduce the BFQ-v5 I/O sched for 3.0

Add the BFQ-v5 I/O scheduler to 3.0.
The general structure is borrowed from CFQ, as much code. A (bfq_)queue is
associated to each task doing I/O on a device, and each time a scheduling
decision has to be taken a queue is selected and it is served until it expires.

    - Slices are given in the service domain: tasks are assigned budgets,
      measured in number of sectors. Once got the disk, a task must
      however consume its assigned budget within a configurable maximum time
      (by default, the maximum possible value of the budgets is automatically
      computed to comply with this timeout). This allows the desired latency
      vs "throughput boosting" tradeoff to be set.

    - Budgets are scheduled according to a variant of WF2Q+, implemented
      using an augmented rb-tree to take eligibility into account while
      preserving an O(log N) overall complexity.

    - A low-latency tunable is provided; if enabled, both interactive and soft
      real-time applications are guaranteed very low latency.

    - Latency guarantees are preserved also in presence of NCQ.

    - High throughput with flash-based devices, while still preserving
      latency guarantees.

    - Useful features borrowed from CFQ: cooperating-queues merging (with
      some additional optimizations with respect to the original CFQ version),
      static fallback queue for OOM.

    - BFQ supports full hierarchical scheduling, exporting a cgroups
      interface.  Each node has a full scheduler, so each group can
      be assigned its own ioprio and an ioprio_class.

    - If the cgroups interface is used, weights can be explictly assigned,
      otherwise ioprio values are mapped to weights using the relation
      weight = IOPRIO_BE_NR - ioprio.

    - ioprio classes are served in strict priority order, i.e., lower
      priority queues are not served as long as there are higher priority
      queues.  Among queues in the same class the bandwidth is distributed
      in proportion to the weights of each queue. A very thin extra bandwidth
      is however guaranteed to the Idle class, to prevent it from starving.

Signed-off-by: Paolo Valente <paolo.valente@unimore.it>
Signed-off-by: Arianna Avanzini <avanzini.arianna@gmail.com>
Signed-off-by: KalimochoAz <calimochoazucarado@gmail.com>
Update defconfig to add BFQ
Merge "s3cfb: Don't lock for vsync poll" into jb
cpufreq: ondemand: add boostpulse interface

Squashed commit consisting of the following:
--------
For applications that require a one-shot increase in frequency,
the boostpulse interface would help to scale to max for the time
specified in boostime. This helps applications that currently
increases scaling_min_freq and resets later after a fixed duration.
Instead of changing scaling_min_freq applications can directly write
to boostpulse and governer resets during regular timer after the time
expires.

Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
--------
cpufreq: ondemand: Fix the boostpulse interface

* Boostpulse was not working because no default frequency was set.
 * We don't need an input handler to push the freq to max, userspace
   does a better job with the Power HAL.
 * Tweak boost time to 500ms

cpufreq: ondemand: Add duration for boosting

* Keep default behavior of 500ms boost if "1" is given, otherwise use
   the value (microseconds) as the boost duration.

drivers: cpufreq: Add max duration for boosting

* Don't allow boosting for more than 5 seconds.

From: Steve Kondik<shade@chemlab.org>
--------
cpufreq: ondemand: Default to max

From: Daniel Bateman<jetison.24@gmail.com>
--------
Change-Id: Ib272703616b9dabc9ab54221f6e2c84c9e9c6dda