msm: mdss: Call blank and panel OFF events only once

For command mode dual DSI panels, currently the interface blank
and panel OFF events are called twice, once for each interface
control off function. The panel and both the DSI controllers get
turned off during the first interface BLANK and PANEL_OFF events
itself since each interface handler internally gets called for
both the DSI controllers. Hence, call the interface events only
once for the left mixer controller off function.

Change-Id: Ia30dd4b728345e478e1ba6999fbbb49716e77abe
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: mdss: Fix dual-DSI mixer swap

In dual-DSI panel configuration it is possible that panels are physically
swapped on the device. In those situations mixer swap is done. There is
an old dead code in current implementation which leads to failures in
mixer swap use-case. Fix these failures by removing this dead code.

Change-Id: Ib0d7141e322f18bcf1060bc5ab2a404dc41a4cc2
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
msm: mdss: Enable FBC on Layer mixer 1

Layer mixer 1 also supports framebuffer compression. This is
needed to support dual-dsi fbc enabled panels.

Change-Id: I1118298e89ce06ef14bbea1c47478f04e3050154
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
msm: mdss: modify dual-dsi interface swap implementation

In certain dual-dsi products it is possible to physically attach
left-panel on DSI1 interface and right-panel on DSI0 interface. This
particular configuration requires MDSS to swap its output going into
these two interfaces. Current implementation achieves this by swapping
pipes across two layer mixers (LMs) but that solution is not scalable
and optimum when used with source split. We can achieve the same results
by using crossbar located before MDSS interfaces which will allow ctl0
to send data to DSI1 and ctl1 to DSI0. This new implementation is
minimalist and scalable. Implement this new method by swapping interface
assigned to ctl path.

CRs-Fixed: 651286
Change-Id: I7a435f81bd42c197e2eb8655882da9352c091c09
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
mdss: dsi: Don't make lack of reset GPIO a fatal failure yet

* mdss_dsi_request_gpios will make this a fatal failure later
  regardless.
* Also fix a error string copy paste error.

Change-Id: I7e49f5b547277a758e3b153dba1be43b46a1e774
x9076: Add Find7S panel support

Change-Id: Id7a02384704ee7559cc0980f6afc4c48853ada86
input: touchscreen: synaptics_dsx: Add Find7S firmware support

Change-Id: Ic02e48ca0a5620a37b21863c50250366c15bd90f
misc: shineled: Update driver for Find7S

Change-Id: I2f3e7514ef8e793cd3b79f43b0c76391d960ac3a
x9076: Add support for Find7S variant

Change-Id: I7457c034459dcafcae4d84401197f14ecba88538
msm: Oppo: Add support for Find7S display enable GPIO

Change-Id: I3a1aa548191de47918559eda172af2369b09d8c6
msm: Oppo: Fix gyro init failure

Change-Id: I1836fcae9617f6b68f6bcea9d1ae01e02b6f08d0
block: row: Fix crash when adding a new field in bio struct

When adding new field to struct bio there is a crash in the removed
code lines. This issue was introduced by commit
80a8f0f87bee18283e9ca0a8966ec97ad9f084e5 "block: row-iosched idling
triggered by readahead pages"

(Partly) reverting this patch till root cause is fixed (on FS level).

Change-Id: Ie82bc806ea52a6370b57aa15455c85b2db10d0da
Signed-off-by: Tanya Brokhman <tlinder@codeaurora.org>
misc: qseecom: fix wipe-key api for PFE key

The qseecom_wipe_key() api allows both FDE and PFE usage,
It is calling  __qseecom_delete_saved_key()  api
that should also allow both.

Change-Id: I2ae583977e7e4958e6dd8a939af74ac62a147895
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
platform: msm: fix PFT when using direct-io

When we read/write a file using dircet-io (O_DIRECT),
we can't get the inode from a bio by walking the path
bio->bi_io_vec->bv_page->mapping->host
since the page is anonymous and not mapped.
On the other more typical cases when not using O_DIRECT,
the page cache is used and the bv_page is available.

Change-Id: I349cad54a978ed9919f960d55f0f95c1e53262e5
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
[media] v4l2-ioctl.c: handle PREPARE_BUF like QUERYBUF

The core code for PREPARE_BUF didn't take the multiplanar case into account,
which might cause page faults. Handle PREPARE_BUF just like QUERYBUF and
QBUF/DQBUF.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Git-commit: 96b1a70226cd43f69c63a7ba2a769bece08cf64e
Git-repo:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

Change-Id: Ica94027b4189627b3e8e76e40e9fc1a6f71932cb
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
kthread: Fix the race condition when kthread is parked

While stressing the CPU hotplug path, sometimes we hit a problem
as shown below.

[57056.416774] ------------[ cut here ]------------
[57056.489232] ksoftirqd/1 (14): undefined instruction: pc=c01931e8
[57056.489245] Code: e594a000 eb085236 e15a0000 0a000000 (e7f001f2)
[57056.489259] ------------[ cut here ]------------
[57056.492840] kernel BUG at kernel/kernel/smpboot.c:134!
[57056.513236] Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM
[57056.519055] Modules linked in: wlan(O) mhi(O)
[57056.523394] CPU: 0 PID: 14 Comm: ksoftirqd/1 Tainted: G        W  O 3.10.0-g3677c61-00008-g180c060 #1
[57056.532595] task: f0c8b000 ti: f0e78000 task.ti: f0e78000
[57056.537991] PC is at smpboot_thread_fn+0x124/0x218
[57056.542750] LR is at smpboot_thread_fn+0x11c/0x218
[57056.547528] pc : [<c01931e8>]    lr : [<c01931e0>]    psr: 200f0013
[57056.547528] sp : f0e79f30  ip : 00000000  fp : 00000000
[57056.558983] r10: 00000001  r9 : 00000000  r8 : f0e78000
[57056.564192] r7 : 00000001  r6 : c1195758  r5 : f0e78000  r4 : f0e5fd00
[57056.570701] r3 : 00000001  r2 : f0e79f20  r1 : 00000000  r0 : 00000000

This issue was always seen in the context of "ksoftirqd". It seems to
be happening because of a potential race condition in __kthread_parkme
where just after completing the parked completion, before the
ksoftirqd task has been scheduled again, it can go into running state.

Fix this by waiting for the task state to parked after waiting the
parked completion.

CRs-Fixed: 659674
Change-Id: If3f0e9b706eeb5d30d5a32f84378d35bb03fe794
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
msm: mdss: ensure retire fences are signaled during panel off

When turning off command mode panel, if retire fences are still active
and suspend sequence goes through some fences may remain active.
If fences remain active command panel off sequence would stop signaling
vsyncs and would throw off the timeline. To fix this clear the retire
timeline when turning panel off.

Change-Id: I32a5fe0f81b16fa2ef959c7f05e484fb9f9f8598
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: mdss: Minimize cases of BL lock in update backlight

Calling backlight lock on every commit iteration was adding
overhead. Altering the conditions to allow locking only for
case when unset backlight level is not zero.

Change-Id: I023dccfa584cf641d042565b7ad2cb32c0724c55
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
video: mdss: Update fence error handling

Change-Id: I954e3bcdd89453e1d58048caf69510049d7ae42e
video: mdss: Fix dual-DSI GPIO issue

 * Don't wank nonexistent GPIOs.

Change-Id: If03ab66d9343c135122faae627963b8c8656b3de