msm: mdss: Disable the PP features if partial update feature is enabled

Check the whether partial update feature is enabled or not before enabling
any post processing features.

Change-Id: Ibf2111d5ca8714279903980d14e63bab556bb41f
Signed-off-by: Ping Li <quicpingli@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: mdss: call wait4comp before wb kickoff

when wfd is tear down, HW still fetch the address of buffer queue
which was already released and while cancelling the buffer cause the
iommu page fault. Call wait4comp before kickoff is called to avoid
iommu page fault.

Change-Id: Ia597b395e13072374cfe3d5fa8216363946bff16
Signed-off-by: Raghavendra Ambadas <rambad@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: mdss: fix for black stripe flicker in browse scroll

Fix a typo that was comparing the width instead of the height
parameter that lead to black stripe flickering when scrolling on
browser.

Change-Id: I10e57f876458f46d445b3404d09a5e7606aeb666
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: camera: Fix improper ion free in error case

In case of ion import failure, error value is being passed as an
handle to ion_free which causes invalid address access. This patch
fixes improper api calls in error case.
Change-Id: Ibc85f12d92d876ffb18afe4d330a6c59f2b8bfcc
Signed-off-by: Aditya Jonnalagadda <ajonnala@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ARM: dts: msm: add blink support for GPLED

Existing implementation does not support blink functionality for
GPLED. Add a DT parameter qcom,use-blink to add blink sysfs entry
for switching into lpg mode when GPLED is to be used for blinking.

CRs-Fixed: 723698
Change-Id: I1d502eba30d87f3f7e6439d6a4d4e4d286d84528
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: kgsl: Wake up GPU only for touch events

Register the KGSL input event handler only for
touch input events to make sure input event handler
is called only for touch input events.

Change-Id: I68938fbbf870bd3bce83cb057b504674753d6de8
Signed-off-by: Sunil Khatri <sunilkh@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: mdss: Fix check for highest of overlap and prefill bw calc

This check is supposed to be used to get the max between overlap and
prefill bandwidth value. This value is used when calculating the ib
bandwidth value to request when bus bandwidth is updated. Having a value
that is too low results in mdp underrun.

Change-Id: Iddf151eed53c8ae73418741b2775ee1dd0ef450c
Signed-off-by: Terence Hampson <thampson@codeaurora.org>
Signed-off-by: Vinu Deokaran <vinud@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
media: dvb: check filter is valid for fullness callback

In PULL mode, all relevant filters' buffer space is checked
to ensure sufficient space or otherwise blocking untill it
becomes available. As callback might sleep it is called without
holding any locks. So at this time, just before the callback executes,
the filter might have been closed by a different thread.
To prevent invalid access, verify in the callback that filter is still
valid.

Change-Id: Ie07ac5d17942ef39d12e4eed3078e382c956fe2e
Signed-off-by: Gilad Broner <gbroner@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ASoC: wcd9320: Fix for VI feedback underflow errors

VIfeedback capture widget was added in the speaker RX path.When speaker
is enabled, the VI feedback capture widget would be turned on.
During the shutdown of speaker RX path VI feedback codec path is
shutdown first and then the AFE port is closed. This will cause the
underflow errors during the shutdown seqeunce.
Change removes the vifeedback capture widget from playback path and
creates a new capture path.Userspace module will enable/disbale the VI
feedback path via mixer control.

Change-Id: Id49f0cf2b1513b57014f1893d0facd72554166ed
CRs-fixed: 591723
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ASoC: pcm: update the start-up sequence for playback

Codec should be started before the adsp to ensure that there is no data
loss during playback.Current sequence enables the adsp first followed by
codec.This change updates the sequence prevent any playback data loss.

Change-Id: Iaf01d153f41a2f94d302ae7f4c1c98b1361dd24f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ASoC: msm: update platform driver to handle new SSR design.

Update PCM platform driver to handle the reset events during
SSR and also unblock the write wait according to
the new SSR design

Change-Id: Id0b4950ffc0eb130dbfdce36375629a683752044
CRs-Fixed: 661491
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ASoC: compress: propagate the error code from the compress framework

Propagate the error code from the compress framework for the timestamp
query. This error code will be used by the client to handle the
error case scenarios gracefully

CRs-Fixed: 672454
Change-Id: I68ad14d52327dd0156531fe8d17ac54ba110fdf6
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: apr: unblock the apr calls post SSR if the modem is not loaded

After the SSR is triggered, following apr commands waits for
the modem to be loaded back and hence adds to the latency.
Fix by unblocking the apr call if the modem is not yet loaded

LNX.LA.3.7 Change-Id: Id4228e5b24f80813b38ef7d0634eb05c016b856b

Change-Id: Iac108ebd35d26f115b23c58cacc29fa5472b5afa
Signed-off-by: Divya Narayanan Poojary <dnaray@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ASoC: msm: fix the audio mute issue post SSR

On receiving the RESET_EVENTS the in_count is not incremented
leading to the wait timeout in the capture_copy.
This causes the capture session not to be closed from the client post SSR.
Post SSR, read error causes the state mismatch for the clients
leading to no audio issue

Change-Id: I58bb4d4b6e8f1e229e635563206b49948dbe5826
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
ASoC: msm: qdsp6v2: handle VoIP call recovery during SSR

Add support for VoIP call auto recovery during Sub System Restart(SSR)

Change-Id: Ie8dce8f575ba3af5560c523a00e8520aef1c68c3
Signed-off-by: Venkata Narendra Kumar Gutta <vgutta@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: camera: Fix CCI I2C write fail to write for reg addr 0x00

Allow CCI I2C write to 0x00 addressed register in data queue.

Change-Id: I6f3844c95fd6e6d258326e410826da0ee3c27bda
Signed-off-by: Lokesh Kumar Aakulu <lkumar@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
USB: gadget: f_rndis: Add check before queuing notification available

There is a chance that rndis_response_available() and unbind() race each
other due to which request's buffer might have freed and could cause
accessing freed buffer pointer. Hence add check before accessing buffer
pointer of USB request for interrupt endpoint.

CRs-fixed: 731323
Change-Id: I2082e54cbdc28817651e75e8e8ed13d0ee61a6d5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
USB: composite: Fix issue of get interface returning wrong altsetting

Currently composite driver will block and doesn't forward the set
interface with zero index vlaue after set configuration request.
This leads to returning wrong altsetting value for get interface
request from Host for interfaces that does support multiple
alternatesettings when host sends set interface with one followed
by set interface with zero index value after device is configured.
This could cause USB3.0 complaince test fail. Hence fix this value
by forwarding set interface request for interfaces that does
support mutliple altsettings.

CRs-Fixed: 747760
Change-Id: Ib82d4acc90f577308e18f0e0af1e616dbc8ce6a8
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
qseecom: Add boundary checks for offset within message.

Qseecom driver does not have boundary checks for offset within the
message. So this patch add checks to validate the offsets sent by
client to modify data within the command request message and it
should not exceed the memory allocated for that message.

Change-Id: I29bfbdc154eebb4f3f4bfbb31789562e37fa5886
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Mallikarjuna Reddy Amireddy <mamire@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>
msm: ADSPRPC: Fix offset for input and output buffers

The buffers being passed to remote processor did not have
the right offset into the IOMMU VA for cases where the offset
was greater than 4K.

Change-Id: I32360a337ecbb9ebe3d33e5a6d680b1033945641
Acked-by: Sathish Ambley <sambley@qti.qualcomm.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Signed-off-by: Akhila Musunuri <makhila@codeaurora.org>
Signed-off-by: klozz <xxx.reptar.rawrr.xxx@gmail.com>