leds: leds-pm8xxx: Avoid OVP spike when disabling wled

Software workaround for hardware issue where OVP can spike
when disabling WLED module.

Change-Id: I41b5524bd9f4769426dccb83fc0eb089561b0fb7
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
msm/hdmi : Change the read permission for sysfs entry

rda_edid_physical_address,rda_cec_logical_addr sysfs entries
leak logical and physical addresses within the kernel and may
be read by any user. The read permissions for the sysfs entries
should be S_IRUSR rather than S_IRUGO.

CRs-Fixed: 547968

Change-Id: I9b99acbf292e5aa07fac15def112d2a4b4eb0eb7
Signed-off-by: Ramakant Singh <ramaka@codeaurora.org>
Merge "leds: leds-pm8xxx: Avoid OVP spike when disabling wled"
sync: signal pt before sync_timeline object gets destroyed

There is a race condition

Assume we have *one* sync_fence object, with *one* sync_pt
which belongs to *one* sync_timeline, given this condition,
sync_timeline->kref will have two counts, one for sync_timeline
(implicit) and another for sync_pt.

Assume following is the situation on CPU

Theead-1 : (Thread which calls sync_timeline_destroy())
  -> (some function calls)
   -> sync_timeline_destory()
    -> sync_timeline_signal() (CPU is inside this
function after putting reference to sync_timeline)

At this time Thread-2 comes and does following

Thread-2 : (fclose on fence fd)
> sync_fence_release() -> because of fclose() on fence object
 -> sync_fence_free()
  -> sync_pt_free()
   -> kref_put(&pt->parent->kref, sync_timeline_free);
    -> sync_timeline_free() (CPU is inside this because
this time kref will be zero after _put)

Thread-2 will free sync_timeline object before Thread-1
has finished its work inside sync_timeline_signal.

With this change we signals all sync_pt before putting
reference to sync_timeline object.

Change-Id: I66d7359cc5dca0352fda49f81953028e98b95993
Signed-off-by: Prakash Kamliya <pkamliya@codeaurora.org>
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
diag: Update masks on MDM after MDM SSR

Currently, on MDM SSR, diag mdlog is not sending
masks to MDM. This patch enables hsic_probe to send
a signal to diag_mdlog app so that application
can catch this signal and can update masks.

Change-Id: If0dd6b065e112d397ae7c5e1fe975d77497c7509
CRs-Fixed: 533291
Signed-off-by: Katish Paran <kparan@codeaurora.org>
msm: Make CONFIG_STRICT_MEMORY_RWX even stricter

If CONFIG_STRICT_MEMORY_RWX was set, the first section (containing
the kernel page table and the initial code) and the section
containing the init code were both given RWX permission, which is
a potential security hole.

Pad the first section after the initial code (which will never
be executed when the MMU is on) to make the rest of the kernel
text start in the second section and make the first section RW.

Move some data which had ended up in the "init text"
section into the "init data" one, as this is RW, not RX.
Make the "init text" RX.

We will not free the section containing the "init text",
because if we do, the kernel will allocate memory for RW data there.

Change-Id: I6ca5f4e07342c374246f04a3fee18042fd47c33b
CRs-fixed: 513919
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
arm: Move the secondary_startup to __CPUINIT section.

Because of addition 1MB alignment after head.txt section,
the secondary_startup needs to move to 1MB aligned section.

CRs-Fixed: 513919
Change-Id: I332d1e4ec95c877406c6ad3318e5f9a3c85cc10f
Signed-off-by: Venkatesh Yadav Abbarapu <quicvenkat@codeaurora.org>
Merge "diag: Update masks on MDM after MDM SSR"
Merge "msm/hdmi : Change the read permission for sysfs entry"
ASoC: msm:Initialize local variable output_meta_data.

The local variable output_meta_data is not initialized if
prtd->meta_data_mode is false. It can lead unexpected behavior

Change-Id: I64f87342b02a3fb7b5c09c376f72ef7e0ca1efd6
CRs-Fixed:548200
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
Signed-off-by: Satish Kamuju <skamuj@codeaurora.org>
msm_fb:hdmi:Security checks for EDID block read.

Ensure data is read from within limits of buffer
for data block collection/video data block in EDID.
This prevents EDID data from being read past the end
of data block collection offset.
Ensure the 3D formats are only read from the proper
buffer region for vendor specific data block. This
prevents illegal data being read from the EDID data.

Change-Id: Id411f7e93aaf9293341a87cb4ca5431005e2bb18
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Neti, Ravi Kumar <ravineti@codeaurora.org>
Merge "msm: Make CONFIG_STRICT_MEMORY_RWX even stricter"
Merge "arm: Move the secondary_startup to __CPUINIT section."
Merge "ASoC: msm:Initialize local variable output_meta_data."
Merge "sync: signal pt before sync_timeline object gets destroyed"
Merge "msm_fb:hdmi:Security checks for EDID block read."
msm: Qdsp5v2: audio: Migrate to ION.

PMEM is deprecated, switch to ION.

Change-Id: Ia15c444e26961d8aa40bd5db3ece1fd9368e02ef
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
audio: msm: qdsp5v2: Switch hostPCM driver to ION.

HostPCM to switch from PMEM to ION to allocate memory.

Change-Id: Ic4f0aa839628ca415702b22005802661674b1fb6
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
Initial commit for ION compilation errors

Change-Id: Ic003609426ac2fde1e3c506839f31716e708df25
Signed-off-by: Kalyani polepeddy <kpolep@codeaurora.org>
msm: Kconfig: Select ARM_HAS_SG_CHAIN for 7630/8x55

ION allocations in SYSTEM_HEAP now uses alloc_pages() and not
vmalloc(). This will add one entry into sg_table for each page
of allocation. With this, sg_table may over-cross the limit
of fitting into one page for bigger sized allocations. So,
accommodate extended sg_table entries by chaining more pages.

ARCH_HAS_SG_CHAIN will enable this chain of pages. Enable
ARM_HAS_SG_CHAIN to select ARCH_HAS_SG_CHAIN.

(cherry picked from commit 62a2f7c52ab959868f5350695897932846099784)

(cherry picked from commit 9ca7a19f891b4eecb2fa93ac0a428bedd5a197d9)

Change-Id: If627a56be47100342ea7f62f6ca8387ab6bc17a9
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Gopal Goberu <ggober@codeaurora.org>