Revert "fix race condition"

This reverts commit 40dfd3eec2a1b522817b1051239a5efb24209500.
msm: vidc: update with fixes and enhancements

Add LTR support for video encoder.
Add control to enable Hierarchical P num.
Enable vp8 error resilience support.
Avoid re-initialize of v4l2 spin lock.
Fix a race condition with core instances list
Add VP8 QP min and max control.
Add support to set VP8 QP range.
Update msm_media_info with MV Color format.
Cleanup v4l2 buffer flags.
Don't erase buffer flags in EBD
Rewrite v4l2 cluster construction
Detect mbaff information from firmware
Add support for setting initial qp
Configure and set hier-p layers
Fix a race condition in cluster construction
Indicate secure sessions in debugfs
Remove non fatal error messages
Query deblocker parameters from cluster
Set error concealment color to FW
Added v4l2 control to set the color of concealed MBs.
Disable Hier-P when LTR is enabled

Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
Revert "msm: vidc: update with fixes and enhancements"

This reverts commit 18c40c64e94ea5021af84d1d1785488a87d0d7be.
msm: vidc: update with fixes and enhancements

Add LTR support for video encoder.
Add control to enable Hierarchical P num.
Enable vp8 error resilience support.
Avoid re-initialize of v4l2 spin lock.
Fix a race condition with core instances list
Add VP8 QP min and max control.
Add support to set VP8 QP range.
Update msm_media_info with MV Color format.
Cleanup v4l2 buffer flags.
Don't erase buffer flags in EBD
Rewrite v4l2 cluster construction
Detect mbaff information from firmware
Add support for setting initial qp
Configure and set hier-p layers
Fix a race condition in cluster construction
Indicate secure sessions in debugfs
Remove non fatal error messages
Query deblocker parameters from cluster
Set error concealment color to FW
Added v4l2 control to set the color of concealed MBs.
Disable Hier-P when LTR is enabled

Signed-off-by: Praveen Chavan <pchavan@codeaurora.org>
Signed-off-by: Arun Menon <avmenon@codeaurora.org>
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: bam_dmux: Fix race condition during SSR

BAM DMUX drivers set the global flags to identify the SSR during
SUBSYS_BEFORE_SHUTDOWN notification, but the flags change is not reflected
in some code paths like msm_bam_dmux_write().

Add the SSR flag check and SRCU locking to complete all pending bam dmux
writes before returning the control in SSR call back function for
SUBSYS_BEFORE_SHUTDOWN notification.

CRs-Fixed: 584805
Change-Id: I26647b485977943f272c44f7450ed6c4a4aa62f3
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
msm: qmi: Fix access-after-free condition

In case, the sending of a message from handle_resume_tx fails, the
transaction is freed and the failure info is printed in the kernel log
which results in an access-after-free condition.

Free the txn after printing the error message.

CRs-Fixed: 525365
Change-Id: I111634948fa2e8a9737b77a658283ae6d1562531
Signed-off-by: Zaheerulla Meer <zmeer@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>
spi_qsd: set device's runtime PM status to 'suspended'

Sometimes system suspend is initiated before runtime
PM's auto-suspend delay expires and causing devices to
not suspended runtime. As part of system suspend if
device is not suspended runtime then clocks and gpios
are manages by system suspend.

If spi client does initiate transaction request immediately
after system resume then spi doesn't resume run-time
immediately as spi controller's device state is not in
'suspended state'.

Keep device's runtime PM status to suspended during
system suspend.

CRs-Fixed: 512718
Change-Id: I5c0cb39c0b91782d8686c1b3da81125169ccf9be
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@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>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>