ksm: Provide support to use deferred timers for scanner thread

KSM thread to scan pages is getting schedule on definite timeout.
That wakes up CPU from idle state and hence may affect the power
consumption. Provide an optional support to use deferred timer
which suites low-power use-cases.

To enable deferred timers,
$ echo 1 > /sys/kernel/mm/ksm/deferred_timer

Change-Id: I07fe199f97fe1f72f9a9e1b0b757a3ac533719e8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
msm: display: Add pipe type selection in overlay request

Allow user to specify the type when requesting an overlay pipe.
If field is set the pipe type indication in the flags will be
ignored.
Change-Id: Iee51d24b96c7a2a987dc70a439342e6548dfc8fa
Signed-off-by: Vineet Bajaj <vbajaj@codeaurora.org>
msm: mdss: synchronize recovery handler access

The recovery handler is used in the dsi event thread, and
the recovery handler variable was configured from a different
thread.  Earlier, there is no synchronization between the two
threads accessing the recovery handler, causing kernel panics.

Change-Id: Iee990276fdabd65e2e1f2e3c21ad574fc0d8a7bc
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
msm: mdss: control backlight level during blank and unblank events

Add code to set the backlight level to zero for blank event
and restore the backlight level to its previous value during
unblank event. This will fix any unexpected panel flicker
that might show up on the screen during panel ON sequence.

CRs-Fixed: 649073
Change-Id: I871a067b0cc40d893b8b7e5a25103ebb914f9b7a
Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Merge "msm: mdss: synchronize recovery handler access"
spi_qsd: Fix bug in multi-xfer bam mode transaction

Spi doesn't handle multiple xfer per message scenario
(eg:Rd->Wr or Wr->Rd) correctly and spi request
stuck indefinetly in while loop when total byte count
is not 0.

increment both(rx,tx) references so next bam
transaction will be queued correctly. Flush the
bam pipes after each transactions.

CRs-Fixed: 637693
Change-Id: I455df38be2f9687b1eb2a704466f6974dfb83a22
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
hwmon: qpnp-adc-voltage: Fix break statements in compensation API

Fix missing break statements in OCV and VBAT compensation
APIs for PM8026 v2.2 to avoid SOC and VBAT errors.

Change-Id: Idd2352c2cd9dad3b80a71f36a2947254792557bc
Signed-off-by: Dipen Parmar <dipenp@codeaurora.org>
Merge "msm: mdss: control backlight level during blank and unblank events"
Merge "Merge "msm: mdss: synchronize recovery handler access""
Merge "spi_qsd: Fix bug in multi-xfer bam mode transaction"
Merge "Merge "msm: mdss: control backlight level during blank and unblank events""
msm: mdss: Check ctl power on status before BTA status check

Control path power on status should be checked before BTA status
check else command sending failure and IOMMU page faults during
bootup can be observed if ESD is enabled for device. Currently
IOMMU is not powered on when commands are being sent.

Change-Id: Ice66f38e79755eb14843fc63afe058e4bab2f0e2
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
Merge "Merge "spi_qsd: Fix bug in multi-xfer bam mode transaction""
Merge "ksm: Provide support to use deferred timers for scanner thread"
Merge "hwmon: qpnp-adc-voltage: Fix break statements in compensation API"
Merge "Merge "hwmon: qpnp-adc-voltage: Fix break statements in compensation API""
USB: dwc3: otg: Fix stop endpoint command timeout issue

Currently HSPHY SUSP bit is set while starting host mode and
it is not cleared till stopping host mode. As part of urb dequeue,
xhci stack will queue stop endpoint command for flushing endpoint
which is getting timedout due to this HSPHY SUSP bit. Hence clear
this bit before queuing stop endpoint command and set it back after
stop endpoint command completion. Otherwise xhci stack treats this
timeout as fatal error and halts host controller.

Crs-Fixed: 580268
Change-Id: I784407386e6f87bcabd8569fcbae4e3af167144d
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
msm: mdss: Wait for vsync before iommu attach during cont splash

During first borderfill commit in splash cleanup, wait for vsync
before iommu attach to prevent IOMMU page faults during bootup.

Change-Id: I68b7162d090513b082cbd4c0013731cedc0ebdbe
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
msm: mdss: Wait for vsync before iommu attach during cont splash

During first borderfill commit in splash cleanup, wait for vsync
before iommu attach to prevent IOMMU page faults during bootup.

Change-Id: I68b7162d090513b082cbd4c0013731cedc0ebdbe
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
msm: mdss: Check ctl power on status before BTA status check

Control path power on status should be checked before BTA status
check else command sending failure and IOMMU page faults during
bootup can be observed if ESD is enabled for device. Currently
IOMMU is not powered on when commands are being sent.

Change-Id: Ice66f38e79755eb14843fc63afe058e4bab2f0e2
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>