Initial 8x55 MR1 Display Bringup

Change-Id: I8e7f813955279f8185da49a91a43e77d95dd10fa
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm_fb: display: Initial commit for MDDI on MR1

Display comes up fine with this change but there are stability
issues during boot up

Change-Id: I58e002fba80d94811ab579ae23426f54ffab01ce
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
msm: Kconfig: Select ARM_HAS_SG_CHAIN for 7630/8x55

ION allocations in SYSTEM_HEAP now uses alloc_pages() and not
vmalloc(). This will add one entry into sg_table for each page
of allocation. With this, sg_table may over-cross the limit
of fitting into one page for bigger sized allocations. So,
accommodate extended sg_table entries by chaining more pages.

ARCH_HAS_SG_CHAIN will enable this chain of pages. Enable
ARM_HAS_SG_CHAIN to select ARCH_HAS_SG_CHAIN.

(cherry picked from commit 62a2f7c52ab959868f5350695897932846099784)

(cherry picked from commit 9ca7a19f891b4eecb2fa93ac0a428bedd5a197d9)

Change-Id: If627a56be47100342ea7f62f6ca8387ab6bc17a9
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm: camera: Enable V4L2 based camera for 8x55 target

Enable the v4l2 based camera solution for 8x55 target on the MR1 branch.

Change-Id: I8eae06e9a5dee4d32b5e87a1277028a62d25e68b
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
msm: camera: Initial camera bring-up on 8x55 for JB-MR1

Change-Id: I90ed65e878e504aab303e7fd3d6c82d32e5020ef
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
USB: msm72k_udc: set QMULT for ISO endpoints

Currently not setting QMULT for ISO endpoints. Set this
value to indicate to the USB controller the number
of transactions to be done in microframe.

Change-Id: I529e6624e592df54bafc9cef30f6b28eca050360
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
msm_fb: Add support for writeback on 7x30

Add support for writeback on 7x30 to avoid under runs
during video playback of high resolution clips.

Change-Id: I3781097b894b21d7d7c4b4f29fdd8ff9435517cc
CRs-fixed: 440174
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: board7630: Add an ION heap for WRITEBACK

To avoid under-runs during high resolution video clips
playback, we provide Write-back support. Allocate a heap
and required memory for the same.

CRs-fixed: 440174

Change-Id: I53b96821ac2c78bf82b8cc0ce92e30490939662c
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: pm2: Use different API to get the next timer expiration

Use different API to get the next timer expiration. Replace
the existing API "tick_nohz_get_sleep_length" with
"msm_timer_enter_idle". Sometimes existing APIs giving less
timer expiration than what is required when the system decide
to enter into PC. This time is not sufficient for the system
to enter and coming out of the PC.

Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
(cherry picked from commit 8dc6ff4d47fceff2b11ab1de7336b659ee10cb19)

Change-Id: Iae2ede92e06f8a16c8f43558d2766b746c6d453a
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: pm2: Update SPC LPM stats correctly

Currently StandalonePC stats are updating incorrectly even
for successful cases. After debug found that compiler has
optimized some of the instructions where the return value
from "msm_pm_power_collapse_standalone()" being compared
incorrectly and always log the stats as failed even for
success cases. Change the "exit_stat" variable to "volatile"
to avoid any optimization.

CRs-Fixed: 433578
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
(cherry picked from commit f59048d29fd75a30cac8c294e068178d9d489af3)

Change-Id: If1f9313f7968e93f5dcd9fb33426496f5091d14a
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
USB: OTG: Vote against APP's idle PC in USB Host Mode

In USB Host mode, When the target is going to APP's
idle PC and coming out with any peripheral device
connected, target is crashing. Fix this issue by
not allowing Idle PC in USB Host Mode.

(cherry picked from commit 9d672c8f341fc2bbee2c6ee0108d7d8eedbe999f)

Change-Id: I7f5fb2fe9d2f545bc383daf0c0ab3d322650e9a5
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
msm: camera: Enable Gemini support for 8x55

Enable Gemini Jpeg hardware encoding support for msm7630 device

Change-Id: Iea9015b86ffb949ab6190399159e87a1a43da719
Signed-off-by: Vivek Singh <vising@codeaurora.org>
board-msm7x30: display: Increase the camera heap for 720p

There is not enough memory for 720p video play when played
on external interface. Hence increase camera heap by 1 frame
of 720p resolving the playback issue on external interface.

Change-Id: I8dce906e222fbbef50c80bab1413cb3557397522
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
msm: msm-batt: Register the fail-safe voltage with modem

Existing code registers BATTERY_LOW with modem as the
critical voltage where it needs an update. But this is
supposed to be fail-safe voltage. So this change updates
fail-safe voltage inplace of BATTERY_LOW.

(cherry picked from commit bd37bd0abe8e50962731081450f49d8ba7e4aec7)

(cherry picked from commit b87f4f4570d176f27d38c80bca86b2766419cbc7)

CRs-Fixed: 409958
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
Change-Id: I56a5fc7841295084456721e7d06cfe457fe07563
Signed-off-by: Sunil Joseph <sunilj@codeaurora.org>
msm: msm-batt: enable a debug print to watch batt_volt updates

This patch enables a debug print to help us identity whether
the voltage update RPC has arrived Apps or not simply by looking
at dmsgs.

(cherry picked from commit b65f9187cc1b6ba380da1c749331257ffcdb269e)

(cherry picked from commit fe8e51a2eb9ef02038b114d1b596dffb0eb3789f)

Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
Change-Id: I8747b42cf1d5d759d9d8dc5ea8b240ed8cf048b5
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
msm: msm-batt: report fake usb disconnection when cur_volt < batt_min

Android doesn't initiate graceful shutdown if USB connected even
if battery voltage is less than minimum operating voltage. To work
around this behavior, let the battery module report fake usb
disconnection when voltage is very low.

(cherry picked from commit 3775173e3c8b95c9ae1e3e6e2445ae89afef5df8)

(cherry picked from commit fca2102f518b66c518a7159915d73e5ad465e5c2)

CRs-Fixed: 410647
Signed-off-by: Krishna Vanka <kvanka@codeaurora.org>
Change-Id: Ia099dca16a1c2b6f1e6719ef5fabcc855f7f00d8
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>
power: msm-battery: Report USB WALL charger as MAINS supply-type

USB wall charger falls under the category of a dedicated wall
charger. Categorize it as a type of MAINS power supply.

(cherry picked from commit 8d77fe2aa647500c329423cf2e1262ab84595b4a)

CRs-Fixed: 429508
Change-Id: I1ba3ace8836aa4b094b8454fb78e24ea66c826ff
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
power: msm_battery: Report charging status reported by the MODEM

MODEM indicates the status of charging via an additional bit
in the RPC reply. Update the charging status based on this bit.
This includes the case when EOC is reported and the charger
is still connected.

(cherry picked from commit 991fb85ccfb627b012b7da8be47b76238fcec9b0)

CRs-Fixed: 429512
Change-Id: I472df4eeaf510a1cc8e62bcf9f0fc57ad61aa1fe
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
msm: msm_battery: Update max voltage based on battery level

Some batteries may not attain max designed voltage even
after it is fully charged. In these cases battery level
will not show 100% even if it doesn't take any more charge.

So update the max voltage to the voltage at which battery
is fully charged and doesn't take any more charge.

(cherry picked from commit 18c82dcd1971000db3e3348df5eb50e5a63b9695)

CRs-Fixed: 434333
Change-Id: I4d20ce0a0200deda3bf44cdf46dd9430098d146a
Acked-by: Gopi Krishna Nedanuri <gnedanur@qti.qualcomm.com>
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Update the Max voltage and register the voltage fail safe for 7x30

Change-Id: I6d65688a690ef476c08ff9e29e9d3be1934fdca5
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>