Power: add an API to log wakeup reasons

Add API log_wakeup_reason() and expose it to userspace via sysfs path
/sys/kernel/wakeup_reasons/last_resume_reason

Change-Id: I81addaf420f1338255c5d0638b0d244a99d777d1
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>

Conflicts:
	kernel/power/Makefile
POWER: fix compile warnings in log_wakeup_reason

Change I81addaf420f1338255c5d0638b0d244a99d777d1 introduced compile
warnings, fix these.

Change-Id: I05482a5335599ab96c0a088a7d175c8d4cf1cf69
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Power: Changes the permission to read only for sysfs file
/sys/kernel/wakeup_reasons/last_resume_reason

Also changes the sysfs read callback name so that __ATTR_RO can be used.

Change-Id: I9b625f6cafcb35d207def4157d0fb4a9964104de
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Power: Add guard condition for maximum wakeup reasons

Ensure the array for the wakeup reason IRQs does not overflow.

Change-Id: Iddc57a3aeb1888f39d4e7b004164611803a4d37c
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
Correct typo in variable name

Change-Id: Icc8f68c04898740a65e3332ad1cdb4ec7fe6d995
vidc: Add secure node support for encoder.

Encoder driver will expose a new node for clients
intending to start a secure encoding session.

Change-Id: I2a104155fd19534a3b3b35e6606d39047f34c42f
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
vidc: Correct start and stop sequence.

Video core stop should be called only if start is successful.

Change-Id: Ie2a8d970355387ee3fcdc34b62184972e89dd6cc
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
msm: vidc: Allow client to request sps/pps per IDR frame

Expose SET_SPS_PPS_FOR_IDR to allow client request sps/pper per IDR
frame.

Change-Id: I0316d751bd1e0b412972cba9d4d59b142500a51d
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: vidc: Add support for NV21 color format encoding

This change adds NV21 color format encoding support.

CRs-fixed: 448511
Change-Id: If26f1241a006e2d325668b8e189f6ff76df8e125
Signed-off-by: Deepak Verma <dverma@codeaurora.org>
msm: vidc: Fix iommu pagefault in concurrent scenario

IOMMU pagefault is seen while running decoder and
encoder concurrently for specific codec combination.
Map double the buffer size to ion_map_iommu() API for
encoder reconstruction buffers to avoid the pagefault.

Change-Id: Ib5546a42a75c4c628767310f1a291e7ed443056c
CRs-fixed: 450621
Signed-off-by: Maheshwar Ajja <majja@codeaurora.org>