msm: camera: Enable pixel line buffer for ispif

Enable pixel line buffer for ispif to handle fast incoming
data. This provides cusion to dowmstream components such as vfe
and helps in preventing UB buffer overflows.

Change-Id: I0c2a0f8241e08d6cf39732db4ee05b34975b1557
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
(cherry picked from commit a254a113db125bf8c9545362ef3cfee859d4f659)
msm: camera: Disable software override for axi wm priority

Remove the software override for write master priority because
hardware assigns priority to write masters based on data rate.

Change-Id: If16b54f05d41a2d78606ae21983aa3248eb2b1a3
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
(cherry picked from commit a6add94f6d69dc4f8694621403777337ce74510d)
(cherry picked from commit b1b98214377e6cb7a6d64c4560eb5e4dd90fb0e6)
msm: msm_bus: Fix the 64-bit division during interleaving

When interleaving flag is enabled, the bandwidth is divided
between ports. There was an error in the division as the
macro was not correctly updated with the right order of using
bandwidth and port number when 64-bit division function
was used by the bus driver.
Correcting this for fixing the token allocation issues
observed.

CRs-Fixed: 472791
Change-Id: Ie7c7f9557006cbb946eaa9eff4b50771cc60525e
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
(cherry picked from commit 5fbd54d5eaada09ad039d0b91521431d3599b3be)
msm: msm_bus: Change MDP port interleaved setting

When display driver requests bandwidth on MDP port 0, it was
automatically divided between port 0 and port 1 by the bus driver
as a part of interleaving. Since MDP port 1 was never used,
this did not have any impact.

Now, the display driver needs to use MDP port 1 such that MDP
ports should be able to use the bandwidth non-uniformally.
To enable these ports to use unequal amount of bandwidth,
it is required that bus driver does not divide bandwidth
between port 0 and port 1.
The display team is now responsible for requesting bandwidth
explicitly on both ports.

CRs-Fixed: 474499
Change-Id: I826a4c20a113a32f6d6bcf13f1c6474040f35f46
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
(cherry-pick from Change-Id: I826a4c20a113a32f6d6bcf13f1c6474040f35f46)
(cherry picked from commit ea768578221b943f4653623b469f55f168f4b36b)
msm_fb: display: add mdp master port1 bandwidth request

mdp bus traffic go through both mdp port0 and port1, but now mdp
bandwidth request is only for port0.

Change-Id: Ie902de6362cd9225abf6e9c42f260b5af7c3c6f8
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit 8baa8ebada2a7394a6d3c8c67c4d77addb7e5b9b)
msm_fb: display: balance bus bandwidth on mdp axi port0 and port1

mdp read and write clients are connected on both mdp port0 and port1,
however, the bus bandwidth request is made on only port0. This change
divides mdp bw requests to port0 and port1 based on pipe connections
to mdp ports.
ab - no scaling factor - port0 and port1 split
ib - scaling factor - port 0 and port1 split

Change-Id: I9050d1178f634ca908675fa826d08bee09e2a2f3
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit f915a4246d0833470b2fb1575fd644986301897f)
msm: mdp: Revert MDP Port split changes.

Change-Id: I1c687750bd22c8f64ab28a500562cbfbcb6a6048
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
(cherry picked from commit 1597e693567602038b7f30841519a9ea6c3d8659)
(cherry picked from commit fd5c4eb671bbbb5d3b6b46f55e01022890f812c7)
board-8930: Request the correct ab/ib values for camera

Various camera usecases show up bus overflows under
regression. Request right ab/ib values to ensure
camera has required bandwidth.

Increased ab, ib values for 8960 pro to run mmfab
at turbo

Change-Id: I1477fae2f0f6081e943d97ee0ffe9d17198a9b7e
Signed-off-by: Nishant Pandit <npandit@codeaurora.org>
Signed-off-by: Lakshmi Narayana Kalavala <lkalaval@codeaurora.org>
(cherry picked from commit 4921f368d22f5202c09725ad6148a391a514374d)
(cherry picked from commit 95f78b4a872a2e969df487d89733680566ca50ee)
mm-camera: Changes to remove unused code for security issue reported

Changes to remove MSM_CAM_IOCTL_SET_MEM_MAP_INFO Ioctl support.
This will avoid physical memory mapping to userspace.

Change-Id: If014e6d152786b508c8e7ee6c53631913cd4cfcf
Signed-off-by: Guruprasad Gaonkar <ggaonk@codeaurora.org>
msm: gemini: Fix the error irq handling sequence

Update the gemini IRQ handling sequence in ISR.

Change-Id: Ia47e1600174462341027540247a79cba7ffd9c56
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: gemini: Reset the core incase of overflow error

Reset the gemini core for the overflow usecases.

Change-Id: I64b4283806d67615b2963e0d6a42f04a40d6a892
Signed-off-by: Sunid Wilson <sunidw@codeaurora.org>
msm: camera: Recovery through camif stop and overall reset.

Add recovery mechanism in case of bus overflow. As part of the
recovery, stop the CAMIF, reset the VFE and reload the AXI
write masters and then restore the IRQ settings to VFE.

Change-Id: Iba6576777f05135cc13c1ee0c9db764d35c7282a
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: camera: Add recovery routine for live snapshot.

During live snapshot, if bus overflow happen, recovery routine will
kick in and reset the hardware. At this point, the live snapshot
might not be completed and application will continue to wait for
the snapshot to complete. This change adds the logic to restart
the snapshot process after recovery is completed.

Change-Id: I9ba0a27ce53eb008a4af8d65a3f37a7cded03559
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: camera: Move halt logic in case of overflow to ISR.

Move the halt logic which includes AXI HALT and CAMIF Disable
to ISR to start the recovery mechanism sooner.
Add some protection in case of liveshot.

Change-Id: I28ec462474524c0064cd7ecd4f77801cd494e514
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
Signed-off-by: Praveen Ac <praveenac@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
msm: pm-8x60: Use relative time for events

There is a bug when adjusting for event wakeups. The adjusted time
is being set in absolute mode incorrectly. Instead just use relative
times.

Without this core wakeups may not happen on time.

CRs-fixed: 486466
Change-Id: If625f25bd573b05befb6e0f922c80db646428b86
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
Signed-off-by: Venkat Devarasetty <vdevaras@codeaurora.org>
input: sensor: remove open/close function from lis3dh driver

This is to make lis3dh accelerometer disabled by default, even if it
is open-ed by user space. Device will have to be explicitely enabled
via sysfs attribute.

Change-Id: I0fb022fac7f05aa7606717c58425fe3ed1c458b0
Signed-off-by: Wentao Xu <wentaox@codeaurora.org>
msm_fb: display: add scaling factor for mdp ab

system profiling found that mdp downscaling needs larger bandwidth
that is related to mdp ab request, so adding scaling factor to mdp ab
calculation reduces the chance of underruns.

ab - scaling factors - port0 and port1 split
ib - 1.5 x ab - no split and same on both ports

Change-Id: I4fde87fce1cd292e317a8261e4700cf98662d09d
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Merge "msm: camera: Enable pixel line buffer for ispif"
Merge "msm: camera: Disable software override for axi wm priority"
Merge "msm: msm_bus: Fix the 64-bit division during interleaving"