mmc: msm_sdcc: vote for msm bus bandwidth

If there is no voting for the system fabric clock, it may run at the
minimum clock speed. If system fabric is running at lower speed (than
what is needed by SDCC workload), SDCC read & write throughput numbers may be
degraded.

This patch adds the msm bus voting for bandwidth required by SDCC driver
based on card clock speed and bus width.

CRs-Fixed: 355327
Change-Id: I7fbcbe22beb09408f8460f815a6f7d34105e21cb
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
mmc: msm_sdcc: clean up sysfs attributes

Currently SDCC driver is using couple of sysfs attributes but
data for these attributes is global so shared by all the
SDCC host controllers but for example, one sysfs attribute named
"polling" is required only for few slots. But as all attribute data
is global, all the slots are getting the "polling" attribute even
if it's not required for few slots.

This change adds attribute data into the host controller (msmsdcc_host)
structure so each host controller can add the required attributes
based on their need.

Change-Id: I22616062e67d57af49f932a98735c8f95bc741d4
CRs-fixed: 368937
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
mmc: msm_sdcc: Add sysfs attribute to update idle timeout value

Add a sysfs attribute to configure the runtime PM idle timer value

In some cases (eg. audio playback) the power consumption drops if
runtime idle PM timeout is set to 10sec. So this sysfs attribute
should be used to configure the idle timeout for SDCC per target.

The value must be greater than 5secs or else will have a major
performance hit.

Change-Id: I04f88144cbb318643f0b4f2438f0f100ab98f6b5
CRs-fixed: 381494
Signed-off-by: Pratibhasagar V <pratibha@codeaurora.org>
msm: debug_patch: CLOSE SERVER HANG

Change-Id: Iec1f8aabbc97b4f9ad53e58f1189fd8dab79559a
Signed-off-by: Ankit Premrajka <ankitp@codeaurora.org>
Bluetooth: Disable sniff when the subrate values doesnt match.

Found there is possibility of sniff subrate collision with some
IOT devices. When this collision happned if the remote device
send subrate values that doesn't match with DUT supported
values exit sniff mode. This will allow DUT to reconfigure
sniff after idle time.

CRs-fixed: 380811
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
(cherry picked from commit a7c3d7e6d905bab198003f16316971ae872eec9f)

Change-Id: Ibe3d02c6a404bbce677c7d980f0ad124e31bca26
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Bluetooth: hidp: use dest address from session info

While hid device unpair process, we are trying to access released
socket as apart of getting hci device which results a kernel panic.

CRs-fixed: 387164
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
(cherry picked from commit 27e77d2bda65c96815cb5f785df9ffd7bd733e6a)

Change-Id: Ida1568ee3ed1bd3d8b989933b670a89631e90b0e
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Bluetooth: fix shutdown on SCO sockets

shutdown should wait for SCO link to be properly disconnected before
detroying the socket, otherwise an application using the socket may
assume link is properly disconnected before it really happens which
can be a problem when e.g synchronizing profile switch.

CRs-fixed: 365445
Signed-off-by: Luiz Augusto von Dentz <luiz.dentz-von@nokia.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
(cherry picked from commit 2e02b861173406a1287a53ca7b836a4ad5fd4255)

Change-Id: Icc38e940f8008d908077dbdea16bc5c6420d1371
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Bluetooth: Block SCO disconnect operation on BT_CLOSED state.

Have maximum blocking time for shutdown operation as DISCONNECT_TIMEOUT.
During this period when SCO connection closes, the userspace will be
updated on the close operation. Existing approach of immidiate return
on shutdown call can cause synchronization issues on SCO state between
kernel and userspace. This happens when disconnect operation takes
more time at kernel space.

CRs-fixed: 365445
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
(cherry picked from commit f799996e309cad545b3a7f84ef6f333a09c8b876)

Change-Id: Ifa74d2568d2ee157a605a405017d4cc0f05d41fc
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: smsm: Use interrupt mask for local SMSM notifications

Only trigger SMSM callback processing for the local processor if
callbacks have been registered.

Without this fix, excessive SMSM bit toggles may overflow the SMSM
snapshot queue.

Change-Id: Ieeb3e62f50915807eae92ac0762b2af5ac8a8438
CRs-Fixed: 378402
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
(cherry picked from commit 51676a19760897c1d3fe35dde50738827d25598c)
msm: kgsl: Increase the virtual GPU range for the IOMMU

Instead of a fixed 256MB virtual range for both the GPUMMU and IOMMU, make
the virtual range a property of the MMU engine and set the IOMMU range to
2GB.  Technically we could go all the way up to 4G, but even 2G is far out
of the realm of possiblity in the current generation, and we wanted to
reserve some of the space for future enhancements.

Change-Id: Ic0dedbad2987beb162b6a1878dd65ffae8a78522
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit 6d76c4d0dff8edb0849ec85537d7013640d7d28a)
Merge "msm: smsm: Use interrupt mask for local SMSM notifications" into jb_chocolate
Merge "msm: kgsl: Increase the virtual GPU range for the IOMMU" into jb_chocolate
Merge "mmc: msm_sdcc: vote for msm bus bandwidth" into jb_chocolate
Merge "Bluetooth: Disable sniff when the subrate values doesnt match." into jb_chocolate
Merge changes Ifa74d256,Icc38e940,Ida1568ee into jb_chocolate

* changes:
  Bluetooth: Block SCO disconnect operation on BT_CLOSED state.
  Bluetooth: fix shutdown on SCO sockets
  Bluetooth: hidp: use dest address from session info
Merge changes I04f88144,I22616062 into jb_chocolate

* changes:
  mmc: msm_sdcc: Add sysfs attribute to update idle timeout value
  mmc: msm_sdcc: clean up sysfs attributes
msm: audio: ion: Add ION declarations.

Audio drivers to use these common ION declarations.

Change-Id: Ifafce344be3e13740624334658e6bdd640833895
Signed-off-by: Sidipotu Ashok <sashok@codeaurora.org>
msm: qdsp5: Add ION framework support for 7x27A & 8x25 targets

Modified adsp driver to support the ION memory framework
for 7x27A and 8x25 targets

Change-Id: Ie037139a5f30fcb51cdf9aeb2a290ab8be16c0ac
Signed-off-by: Saikumar Kondaparthi <saikumar@codeaurora.org>
Signed-off-by: Arvind Thatikonda <arvindt@codeaurora.org>
Signed-off-by: Atul Raut <araut@codeaurora.org>
msm: msm7627a: Support ION on 7627a/8625

Deprecate PMEM and start using ION for existing converted
drivers

Change-Id: I17960a9c4b5ddda80f2a28e3f3f9fe08b1ae1cc3
Signed-off-by: Atul Raut <araut@codeaurora.org>
msm_fb: HDMI: Update HPD logic to address HDMI PLL related issues

In the current implementation, the regulators pertaining to the
HDMI core are turned off/on as part of the configuration of the
HDP circuitry. As a result, the regulator that powers the HDMI
PLL is turned off before the HDMI clocks on the PLL are disabled.
This might lead to the PLL not getting locked when it is re-enabled.

This change turns on and off the regulators and clocks in proper
sequence.

CRs-dixed: 360135 358598
Change-Id: Ie3630b543e78e83dc565edc32239935135ca4ca5
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>