msm: kgsl: allow creation of events from the future

For contexts created with the KGSL_CONTEXT_USER_GENERATED_TS,
allow events to be created for timestamps that have not
been issued yet. Presumably these contexts know what they
are doing.

Change-Id: Iccf2e549b38e1a11850d26ee64b7279ab0b8a1ae
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: kgsl: Fix memleak in IOMMU clock disable

IOMMU clock disable on timestamp allocates memory and passes
the pointer to event created, this memory should be freed
when the event fires.

Change-Id: Ia714550ce8a05958fb6668293cd0400a0f69d4af
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
msm: mdss: Do not override ARGC setting on LM

Layer mixer configuration overrides the ARGC
setting when it updates the blend color settings.
This removes the ARGC setting configured by post
processing module and calibration tool in tuning mode.
This change reads the ARGC setting and applies
it back during blend color setting.

Change-Id: I72612ad428e58a1e343e94ab965137628bcce661
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
msm: camera: sensor: Update to use wait_for_completion.

Use wait_for_completion in place of wait_for_completion_interruptible

Change-Id: I960b334128e2b811b27c64721a65f7c7e773b085
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
NFC: if region2 set don't disable NFC on phone shutdown

If NFC is not disabled from the UI, the user should be able to continue
making transactions. The NFC controller cannot process transactions with
the disable pin set high. The region 2 command configures the NFC
controller to opperate when the phone is off. Thus we don't disable the
NFC controller after issuing the region 2 command.

Change-Id: I610e1a6ee3b326d95c4794b01b38f2e21de85ba5
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Satish Singh <ssing@codeaurora.org>
NFC: metal version delay

after nfcc wakeup introduce metal version read delay so that chip
returns right metal version.

Change-Id: Idfb00e7dcc75ffa56964438113f2498c6d48f690
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Satish Singh <ssing@codeaurora.org>
msm: clock-8226: fix clock voting to keep BBCLK2 on

NFC requires BBCLK2 during both active and sleep sets.
Enable pin control for this clock during the sleep set.

Change-Id: I9375cea8c2c2a1c2ebd6eae8c94f876257953f19
Signed-off-by: Satish Singh <ssing@codeaurora.org>
NFC: Remove Hardcoded 2.0 version check

Remove Hardcoded 2.0 version check

Change-Id: I571f063ba36a45d4bf65cff886808abe956d4626
Acked-by: Umesh Jagga <ujagga@qti.qualcomm.com>
Signed-off-by: Satish Singh <ssing@codeaurora.org>
ARM: dts: msm: Add NFC device for 8226-720p-cdp

8226-720p-cdp device tree needs an nfc node.

Change-Id: I7bde14339fd0b88fb77125259333f37156bf3346
Signed-off-by: Satish Singh <ssing@codeaurora.org>
ARM: dts: msm: Add NFC to msm8974pro-ab device tree

enable nfc on 8974-ab devices with pm8941.

Change-Id: I4165f52da25839dacf00232edde3ceac0d0adef1
Signed-off-by: Satish Singh <ssing@codeaurora.org>
msm: mdss: refactor pipe retrieval and ref count logic

Allow only retrieval of pipes that are on particular framebuffer device
used list. This ensures that pipe is not modified from a different fb
device node and cause potential issues.

Also, modify the ref count logic to use kref and ensure pipe is freed
only while holding mutex in case there could be race condition that
pipe is allocated while being freed.

Change-Id: I626323b5df981a7ed1e03196126cd4376b5ba6a6
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
Signed-off-by: Anusha Koduru <kanusha@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
ARM: dts: msm: Add support for ce-device number in crypto driver

Add an entry for ce-device in qcedev and qcrypto device nodes.

Change-Id: Ibaed7e8992f0773873217a7520cd9874dc4e115e
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
crypto: msm: Add support for multiple qcrypto devices

Expose APIs to enable qcrypto client to select any specific qcrypto
instance.

Change-Id: Ia96f7fa0f15216c0656aa6dc495db350b3c574a8
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
ARM: dts: msm: Add flags for FDE/PFE support

Add following flags
- support-fde
- support-pfe

These flags are needed to be set on targets that support
FDE (full disk encryption) and PFE (per file encryption),
respectively.

Change-Id: Ieed9979e16901b8d8357389b9e375826ae156034
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
qseecom: Check for FDE/PFE feature

Add checks for PFE/FDE feature before executing anything
related to the feature.

Change-Id: I575d4d4eea29fd9ae59e47805793f2416a97f5b9
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
qseecom: Add support for PFE feature

Add key management support for crypto HW used for
PFE (per file encryption) features.

Change-Id: Ic0664973d9a4099f76d7b3040f0f81df8465cf71
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
clock: msm: Add clk support for second qcrypto device

Add clock entry for a second qcrypto instance for 8974.

Change-Id: I6e4c6e32e62c5cf26992c7d0dc8b27b188c2b15c
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
ARM: dts: msm: Add support for second qcrypto device for 8974

Add entry for a second qcrypto instance that uses a different
pipe pair for data transfer to/from CE hardware. This will allow
clients to use different PIPE key register set intended for a
different use case.

Change-Id: Ibdf5ae10de63f1a26ce37ab9b74e4a60346cc105
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
qseecom: Fix issue related to retrieving pipe for PFE

Incorrect  parameter is overwritten when reading information
related to what pipe is used for PFE feature.

Change-Id: I6747fa0b8b99d937475d3d12e2f9ed9a723f91bb
Signed-off-by: Mona Hossain <mhossain@codeaurora.org>
Signed-off-by: Zhen Kong <zkong@codeaurora.org>
arm: mach-msm: Remove the unused rmt_storage code

The rmt_storage module is no longer used.
Remove the unused module and cleanup the makefile and kconfig.

CRs-Fixed: 549951
Change-Id: Ie9ebaa2209ea9fa0df05dc892504fcb882f00f29
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>