spi_qsd: Correction in DMA mode check

Due to a bug in the if() condition msm_spi_use_dma
function is always returning '0' when cs_change
is true. Due to this issue the DMA mode is not being used
when it has to be.

CRs-Fixed: 475841
Change-Id: I7da2ee091635f0cfd89058787c35b62adf1984b5
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
msm: msm_bus: Account for multiple channels in clock frequency

Currently, for multiple channels on a bus or memory, the aggregated
ab value is divided by the number of channels while calculating
bandwidth values for NoCs. However, the channels are not accounted
for while calculating the clock frequency. This factors
into the calculations only when sum of all ab values exceeds the
max of ib values. In that case, we risk running the clocks higher
than required. This patch fixes the issue.

Change-Id: Ia2ddb5f3bfa6049bcffc909c3b79e6382525129c
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
mmc: core: fix issue with HPI polling timeout

Out of CPU time for the MMC context included into measured timeout. System
under heavy load will easily exceed out_of_int_time (typically 20 ms),
because  the MMC context is not running and when it is back to running,
timeout already elapsed. In this case real card status checked again and
error reported for wrong card state only.

Change-Id: I0da3bd2e7d41e4933ad3b1333d7135705a1eafec
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
msm: vidc: Add support for dumping packets

Whenever we read and write from queues add support for logging the
packet being written or read.  As this produces heavy kmsg traffic, also
add a dynamic fallback option to use ftrace.  Output to ftrace can be
triggered by 'echo 1 > debugfs/msm_vidc/debug_output'

Change-Id: Ie221c60ab465605ede332ac7eaadfb4b26c19e01
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
arm/dt: 8610: Add coreisght support for bus devices

This patch enables bus profiling for NoCs and BIMC by enabling
registration with coresight.

Change-Id: I251635af2648a634e48ccbae8191ee89d3c9d73b
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
msm: camera:v2: Fix for broken video HDR

If there is RDI stream, we should continue the loop,
iotherwise pix_stream_count is never incremented for PIX stream.

Change-Id: I3dad2a1c52926bf02cde7695ee5e7127dba2fde7
Signed-off-by: Sagar Gore <csgore@codeaurora.org>
msm: camera2: Add monotonic timestamp for SOF

In Camera3, SOF (start of frame) event indicates the time imager
starts to expose. Its timestamp is used for frameworks to do AV
sync for video recording, which needs to use kernel monotonic
clock source. Hence add a new field in the event structure to pass
this along.

Change-Id: I35760bee9a796f058d3f58d1d0532070aff6d2ae
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: vidc: Refactor packetization of NAL format packet

Code cleanup to avoid unnecessary switch{..} blocks. Also introduce
hfi_nal_stream_format_select to prevent confusion with
hfi_nal_stream_format_supported

Change-Id: I691700292a6e26561948f484741d10fef1e79cda
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: mdss: Reduce assertive display log messages

Silence valid cases of assertive display being checked to run on secondary,
dual pipe or command mode displays.

Change-Id: I7a770ccc4cd69f1296c2d91e3abfb685fd093b5a
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
arm/dt: mpq8092: add imem dt node

This will provide the imem base and size to be
mapped for use by memory dump driver.

Change-Id: I2f0eba4dc9d0cd6c4b565f7083caa8c1bfdb808e
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
imem: mpq8092: enable memory dump feature

This was disabled during simulator bringup. Now that IMEM
is mapped, this feature is enabled back.

Change-Id: I2d4337eb7417b8fa75852502a67edce5dc626197
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
arm/dt: msm8610: spi_qsd: enable SPI on QUP4 for Ethernet

Ethernet is connected to QUP4 and communicates over SPI.
This patch configures SPI on QUP4 for that purpose.

Change-Id: I3ac6dcfad75670300cc9ef5af8b48067042150e3
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
msm: kgsl: Remove nap_allowed variable and functionality

Allow NAP on all targets.  The splitting of the clock enable
and disable calls into enable/prepare and disable/unprepare
allows us to safely make this change for all targets.

Change-Id: I03d909b86aef33631a887d159cf0a807a6d0ae75
Signed-off-by: Lucille Sylvester <lsylvest@codeaurora.org>
msm: kgsl: show timestamp in sync dump

Improve the debug information printed for kgsl points and timelines.

kgsl_sync_pt_value_str:
  - show timestamp passed to kgsl_add_fence_event()
kgsl_sync_timeline_value_str:
  - show most recent timestamp passed to kgsl_sync_timeline_signal()
  - show last retired timestamp according to kgsl_sync_get_timestamp()

Change-Id: I93fe408b06de054b11e05784cd7175ed3fcb76ad
Git-commit: 595e213985f63d6aa484c966a4f4a710b31ca209
Git-repo: https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
base: sync: increase size of sync_timeline name

This makes it possible for drivers to use a longer, more descriptive
name for a sync_timeline, which improves the readability of the
sync dump in debugfs.

Change-Id: Ifb83aebf6fd820ebb26aca2ff230ac1116e65ce9
Git-commit: cb63e61b80ec905f01cbe1c21081aa0d1fef082d
Git-repo: https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
msm: kgsl: generate descriptive names for kgsl-timeline

Generate names for kgsl-timelines using the following format:
<device>-<thread name>(<tid>)-<proc name>(<pid>)-<context id>

This makes it possible to identify the context of a timeline in the
sync dump, which makes it much easier to identify which context has
a GPU timeout.

Change-Id: I0ce0614a53a93fd81094d92c9bef7053e6d416d2
Git-commit: e3348f389f715cb2143a708ec6796d3f65e03821
Git-repo: https://www.codeaurora.org/gitweb/quic/la/?p=kernel/msm.git
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
arm/dt: apq8084: qup_i2c: enable BLSP1 QUP3 for EEPROM test

Configure I2C device on BLSP1 QUP3 and sets its clocks and
GPIOs such that it may access the EEPROM device.
The EEPROM device is commonly used to verify I2C.

Change-Id: Ibb0036d6bbcb37394dd177adfed423306ff0477b
Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
coresight: use trigin 2 for cti reset trigger for tmc-etr

Flush ETR is mapped to TRIGIN[2] and so switch to using it in
order to cause a CTI trigger for TMC-ETR flush during wdog reset.

This avoids any race between TMC-ETR flush to memory and DDR
being put into self-refresh.

CRs-Fixed: 491986
Change-Id: Ia5e643121e040bd9c57c89a4b762b794bc8ddf62
Signed-off-by: Pratik Patel <pratikp@codeaurora.org>
ASoC: msm: qdsp6v2: handle AFE memory map/unmap failure

In cases where AFE memory map and unmap call fails, return proper
error code and return. This will let the upper layer know about the
map/unmap failure.

Change-Id: Id56691d688285f251848ef76158458e593e5dd2f
Signed-off-by: Banajit Goswami <bgoswa@codeaurora.org>
arm/dt: msm8974: add auto focus support for s5k3l1yx camera sensor

To support auto focus function, s5k3l1yx camera sensor node
requires CAM_STANDBY GPIO and actuator instance to be assigned.
The change is derived from the s5k3l1yx sensor node configuration in CDP.

Change-Id: I422cf9f4a163fab38fcf2cc18c132bc88c9b0d34
Signed-off-by: Ilia Lin <ilialin@codeaurora.org>