msm: vidc: Return min buffer count in VIDIOC_REQBUFS.

- If stream triggers multiple port reconfigure events, number of
  buffers required for output plane incremented due to actual
  buffer count returned from video driver.
- Minbuffer count should be return when buffer requirement called.

Change-Id: I943f2cfdd595b8278058b5bdcbbcf24c9f320440
Signed-off-by: Srinu Gorle <sgorle@codeaurora.org>
msm: kgsl: Fix the KGSL driver to compile when CONFIG_DEBUG_FS=n

Fix a compilation error when CONFIG_DEBUG_FS is disabled. Add an
initialization flag to the process struct rather than rely on a
pointer to the debugfs node which will always be NULL if debugfs
is not available.

CRs-fixed: 542231
Change-Id: Ic0dedbadf0241fd476e56d6e116a811697b38190
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
ASoC: msm: qdsp6v2: Update the topology if there is no ACDB

The topology for ASM and ADM is passed down from ACDB to adsp.
If there is no ACDB, then the topology ID is zero. In the current
implementation, whenever the topolpgy ID is zero, then the default
topology is used for asm and adm. The problem arises for msm8x10
because it support only null/none topolgy. It causes audio playback
failure in factory test mode when ACDB loader is disabled by factory
test application. Update the topology to null/none from default to
cover all the platforms.

CRs-fixed: 538213

Change-Id: I8cc694d731284294fb2f8341b370e0dfeb2a7d9b
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
mm: Remove __init annotations from free_bootmem_late

free_bootmem_late is currently set up to only be used in init
functions. Some clients need to use this function past initcalls.
The functions themselves have no restrictions on being used later
minus the __init annotations so remove the annotation.

Change-Id: I7c7e15cf2780a8843ebb4610da5b633c9abb0b3d
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
ARM: dts: msm: do not limit Shutdown SoCs

Currently the property qcom,shutdown-soc-valid-limit is set to 20.
This has the effect of limiting the valid range of shutdown state of
charge to be within 20 percent of the calculated power on SoC.

However, there exist certain conditions under high current charging
or discharging that will make the power on SoC deviate a lot from the
real SoC. Thus it is better to always use the shutdown SoC instead
of limiting it to be within 20 percent of the calculated SoC.

Change-Id: I39a25697fd7137e491b34ef7c0e78e0eb804a37b
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
input: synaptics_i2c_rmi4: Update driver for S3408 support

Support flip X & flip Y through sysfs entry and move
lockdown enablement to device tree from #define.

Change-Id: If5cf5fc6c07f9226800823f64d14a01d3651d9aa
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_fw_update: Add necessary delay for polling mode

2013.08.27
- Fixed i2c goes down if driver does lockdown during system bootup
  when device is communicated using polling mode.
  The reason is that driver cannot access to device immediately after
  command erase all.

Signed-off-by: Alexandra Chin <alexandra.chin@tw.synaptics.com>
Change-Id: Ieff08ee390a00100ed04dcf102ed22932c707b81
Git-commit: 9e65e64c4e12afdc3e49b7bf0a7093f091fd4f31
Git-repo: git://github.com/synaptics-touch/msm-3.4.git
[amaloche@codeaurora.org: Modified commit message for proper form]
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_i2c_rmi4: Enable user to set reset delay

Allow user to set reset delay in device tree.  Default at
100ms.

Change-Id: Ie785e7b1d6c1c734faee72962f1dee4db7034a65
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
input: synaptics_i2c_rmi4: Read display resolution from dt

Read display resolution from platform data in order
to properly use all virtual key implementations.

Change-Id: Ic0a13d6a8166379f08c5bfb49d5ea47ac22b3229
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
msm_bam_rmnet: Check for sufficient headroom

Check for sufficient headroom before attempting transmit. Prevent
crash when skb_push() with insufficient headroom. Added module parameter
to track number of times packet expansion required.

CRs-Fixed: 538716
Change-Id: I09126f885b38a47a3ebc2556b5458343acd19d03
Signed-off-by: Harout Hedeshian <harouth@codeaurora.org>
msm:mdss: Add support for show blank sysfs entry

Currently there is no support for show blank sysfs entry
in mdss. Hence, added this entry to check if panel is
power on or off.

Change-Id: Ifa50bf373590556f88b8f8196353dffefe2d2559
Signed-off-by: Jayant Shekhar <jshekhar@codeaurora.org>
msm: mdss: change MDP burst length to 16 on 8x10

Increase burst length to 16 from 8, to resolve the
under-run issue for 720p panel on 8x10.

Change-Id: I1de8e453fa5d99634b6c0ab38ed8568c91516001
Signed-off-by: Xiaoming Zhou <zhoux@codeaurora.org>
ARM: dts: msm: Reduce the clocks for SD card slot for MSM8226

The SD cards functionality on QRD devices are failing
with CRC errors when used with higher clock / bus modes.

So reduce the clock speed for SD card slot.

CRs-Fixed:  491789
Change-Id: I24b8bfe44cee4367c22846747f439365d8795d2e
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
power: qpnp-charger: resume charging correctly after EoC

Currently, there can be a race condition when charging ends at 99%
battery state of charge (SoC), but BMS does not immediately report
100%. This causes the charger to immediately resume charging because
SoC is below 100.

Fix this by recalculating the battery SoC in the BMS driver
immediately when getting a power supply notification from the
charger. Also have the charger check the BMS power supply status to
make sure that the BMS knows that the battery is not charging before
resuming charging.

Change-Id: I40388b6067ec1ec6d6433a6f6694e449f6fcb48f
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: msm_bus: Fix the type error causing bandwidth overflow

On legacy chipsets, long int was being used to store
return value after calculating interleaved bw. However,
NoCs support 64-bit integers ab/ib values. problme occurs
if client request for higher bw and if difference of ab
value exceeds the range of 32 bit integer, the Value
overflows and turns negative, which leads to wrong bw calculation.

This patch fixes this integer overflow by correcting argument
type to store bw.

CRs-Fixed: 537213
Change-Id: I8c6c79ba245a988c2c54ccaca3f3eaf5cb857ce5
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
msm: camera_v2: Don't touch CCI if camera daemon crashed.

If daemon crashes, refrain from writing to the CCI. This is needed
because these writes will not wait in a process crash scenario and can
potentially leave the CCI in a bad state.

Change-Id: I785cb4af8dc3893b8a7f11e1d1c2a2e1ad775665
Signed-off-by: Satyavaraprasad Yerramsetti <satyav@codeaurora.org>
Signed-off-by: Satyavaraprasad Yerramsetti <satyav@codeaurora.org>
[media] v4l2: Introduce V4L2_QCOM_BUF_FLAG_EOS

Add V4L2_QCOM_BUF_FLAG_EOS in an effort to rename V4L2_BUF_FLAG_EOS,
as this is a vendor extension. Once all clients migrate to the QCOM
variant, V4L2_BUF_FLAG_EOS will be removed.

Change-Id: I3f50d787e8e674f101f4a6e8bfc80237aeea0702
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
msm: vidc: add hevc hybrid driver support

Changes to support hybrid hevc decoder in
v4l2 video driver. Dsp only hevc decoder does not
have mips to handle high resolution (1080p) and
software only solution has thermal/power impact.
Hybrid hevc decoder will have lower power numbers and
better performance for high resolution (1080p).

Change-Id: I9fc4e00fc230c481b18c929c5eb867ac80aec987
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
ARM: dts: msm: Add q6 hfi interface for msm8226 target

For msm8226, add q6 interface and increase adsp memory
size to 42MB for hybrid hevc decoder support.

Change-Id: I525b6e01e10dec3ad001e6ecbd121bf171e14523
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>
ARM: dts: msm: enable CODEC IRQ as wake up capable for 8610v1 & v2

Currently CODEC IRQ (SPI[31], dino_gen_purpose_irq35) is not mapped
in the MPM interrupt mapping list. Due to this, inserting the head
set is unable to wake up the target from deep sleep modes. To wake
up the system from deep sleep modes add CODEC IRQ to the MPM wakeup
capable list.

CRs-fixed: 539455
Change-Id: I4543b88c6c6e6aaf6eab7da41310f92fa44ad707
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>