msm: clock-9625: Support measurement of some RPM clocks

Add debug mux index values for the system NOC, peripheral NOC,
config NOC and BIMC clocks.

Change-Id: I9b2bfd969ec794167d43df67e1ddf55ee765f5c3
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
msm:cpp: Enable two paralel to planar output in cpp

Add second pointer that is used when conversion from
two planar to three planar format  is needed. The
two pointers will help to write the two output chroma
planes in paralel.

Change-Id: Iab1f885c0289f76805f7241549590803f0d15060
Signed-off-by: Iliya Varadzhakov <ivarad@codeaurora.org>
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>
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>
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: pproc: Change error handling for msm_iommu_get_ctx

Change the msm_cpp code so it can handle error code
EPROBE_DEFER returned from msm_iommu_get_ctx in case
of fault.

Change-Id: Iea91eb808a8f76e2ba8079c7e585961f4aa3709f
Signed-off-by: Iliya Varadzhakov <ivarad@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>
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: apq8074: add continuous splash screen flag

Add support for continuous splash screen in dragonboard platform using
QHD Sharp DSI panel.

Change-Id: I2a27f1abb943aab98610b6ba5d24e01981aeab40
Signed-off-by: Asaf Penso <apenso@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>
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 support for SDIO3 on APQ8074

APQ8074 platforms use the SDCC3 as an interface for WiFi adapter.
The device node should be enabled to allow the kernel enumerate
the adapter.

Change-Id: I55a6434c9f66bdeab95b2f0c1e6e971d38d24b5c
Signed-off-by: Ilia Lin <ilialin@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>
camera_v2: jpeg: Avoid double freeing

Avoid double freeing of jpeg device struct during
failure case.

Change-Id: I88b965a8a429ce7f79a8d8585b875ce176b69917
Signed-off-by: Krupal Divvela <kdivvela@codeaurora.org>
msm: vidc: Obsolete V4L2_CID_MPEG_VIDC_VIDEO_FRAME_RATE

No one uses it and it causes confusion with the internal variable
inst->prop.fps, which actually updated from userspace via S_PARM.

Change-Id: I8580a9997ca9562c34aa811a3291819261cf2114
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>