mmc: msm_sdcc: perform DLL retuning if clock rate is changed

Using HS200/SDR104 bus speed mode requires DLL (Delay Locked
Loop for sampling clock generation) HW block to be tuned if
clock rate is >100MHz so that both host and card are in sync.

During card initialization, driver uses the tuning command to
search for an optimal sampling point and then programs the
DLL HW with this optimal sampling point.

But if MMC core layer switches the clock frequency to <100MHz
(when HS200/SDR104 timing mode is set) and then increases it
back to >100MHz without calling execute_tuning host ops,
DLL may go to unlocked state. So this change makes sure
that execute_tuning is performed explicitly if clock frequency
switch happens without execute_tuning.

CRs-Fixed: 424685
Change-Id: I19ee19965ca5b6a73a09f9332d34b56602051ebd
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>

Conflicts:

	drivers/mmc/host/msm_sdcc.c
	drivers/mmc/host/msm_sdcc.h

Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>

Conflicts:
	drivers/mmc/host/msm_sdcc.h
msm: vidc: Free meta buffers during address table cleanup

This change frees the allocated meta buffers, if any
present, during video core address table cleanup.

Change-Id: Id8c42491040bc5be09f3bb59780d376e6921c76e
CRs-fixed: 459980
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm_fb: Set timeline threshold for command mode to 2

For command mode panel, timeline threshold is 1 and we return
commit ioctl on DMA_P interrupt. This causes fps to drop
since sometimes overlay is kickoff just after vsync interrupt
causing DMA_P wait time more than 1 vsync period. Hence, increase
timeline to 2 and return commit ioctl on vsync interrupt.

CRs-fixed: 457153
CRs-fixed: 452269
Change-Id: Ic7385631fdeb25f269306d284c94fdf43cade3d1
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm: vidc: Print clip information in the logs

This change prints the required information of
the clip being played.

CRs-Fixed: 459477
Change-Id: I2fd2271cbb540e5d57d82cfcbd83cf91f7c55c93
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>

Conflicts:
	drivers/video/msm/vidc/1080p/ddl/vcd_ddl_utils.h
gpu: ion: Add null-pointer check after allocation

Check for failed allocation and return appropritate
return code if memory allocation fails.

Change-Id: Iefb83b5e30c3cc581ccecaf6e59eae621be98083
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>

Conflicts:
	drivers/gpu/ion/ion_cp_heap.c
Merge "msm: 8930: Add Audio GPIO changes for 8x30 sglte"
nl80211/cfg80211: add VHT MCS support

Add support for reporting and calculating VHT MCSes.

Note that I'm not completely sure that the bitrate
calculations are correct, nor that they can't be
simplified.

Change-Id: Id4c132850a85ff59f0fc16396763ed717689bec0
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: db9c64cf8d9d3fcbc34b09d037f266d1fc9f928c
Git-repo:
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
msm: board-8930-pmic: Add haptics support for QRD8x30

Add haptics support for QRD8x30

Change-Id: Iebbf245593b7af15688381d5037c5db3554229dc
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
media: dvb: Remove write permission of other users to debug-fs

There is no need for the dvb debugfs nodes to be world-writable.
Change them to be read-only for other users.

CRs-Fixed: 454805
Change-Id: I56340d5c0431206d81d44c835d558dbb48b24b63
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>

Conflicts:
	drivers/media/dvb/dvb-core/dvb_demux.c
	drivers/misc/tspp.c
tspp: fix tspp_close_channel to clean channel filters

Fix tspp_close_channel to clean all relevant channel filters from both
filter tables, regardless of channel source.

Change-Id: I4f725f4ea8d3cf45ebb46b338d54bd346893c310
CRs-Fixed: 468184
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
WIFI: Enable clock 19.2MHz for qrd8930

This change would set the has48MHz variable to '0' if
the device is QRD so that the QRD device would use
19.2 MHz clock as there is no support for 48 MHz by
default on the QRD device.

Change-Id: Id9f5b1ad977ce2af1b95c0476d95210534b4fb5e
Signed-off-by: rockiec <rockiec@codeaurora.org>
Signed-off-by: Deepthi Gowri <deepthi@codeaurora.org>
rpm_log: update the rpm log base address and log length

Rpm log base address is changed for 8930, update the new adress
in device file.
Log length is increased for 8960 and 8064, update the log
length in device file.

CRs-fixed: 460541
Change-Id: I4eb86c1ad421530494b6c0356a379f3afc1d2bce
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
msm: camera: Add NULL check for stats_buf

Return error in case stat_buf is NULL in the list

CRs-Fixed: 436229
Change-Id: I42b2f61dc8e6c9e9883d0bd5d7531d62b5f0fb99
Signed-off-by: Raju P.L.S.S.S.N <rplsssn@codeaurora.org>
msm: display: vsync usage in turning off dsi video

Add timeout to waiting for vsync so that it can come out
when vsync interrupt is not working.
Need not wait for vsync after timing engine is off.

CRs-Fixed: 458419

Change-Id: Ib989e435405613d891024ba15144723730454e34
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
msm_fb: display: exit properly when rotator max session reached

When rotator session reach maximum, it should exit without calling
put_img since no get_img had been called.

CRs-fixed: 466462
Change-Id: I951570227ebd81da6dad19c1b897cde84f8d0451
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm_fb: display: fix iommu page fault when iommu buffer freed

There has possibility that pipe commit come very close to next vsync.
This may cause two consecutive pipe_commits happen within same vsync
period which cause iommu page fault when previous iommu buffer is
freed since mdp stil fetching it. Set ION_IOMMU_UNMAP_DELAYED flag
at ion_map_iommu() to add delay un mapping iommu buffer to fix this problem.
Otherwise four buffer mechanism is needed to avoid this problem..
Also ion_unmap_iommu() may take long time to free an ion buffer. Move
mdp4_overlay_iommu_unmap_freelist(mixer) called after stage_commit()
to increase chance to have pipe_commit (up to stage_commit) is completed
within same vsync period
This patch also fix an potential race condition at wait_for_completion
between show_event thread and wait4vsync thread.

Change-Id: I089950ac61c0bd3c4207b8925817577e42fbb258
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>

Conflicts:
	drivers/video/msm/mdp4_overlay_lcdc.c