msm: perf: Add L2 support for tracecounters

Add L2 counter output to the tracecounters implementation.
This enables collection of L2 PMU counter values upon context switch.
Set up filtering based on number of L2 counters and number of cores.
Read L2 counter values and display them along with L1 counter values.

Change-Id: I8bbbd251ee52c66505d22ccf037c601013a916f0
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
Perf: keep events across hotplug

Keep event list alive across a CPU hotplug so that perf
can resume when the CPU comes back online. Bring a CPU
online when exiting a perf session so it can be cleaned
up properly.

Change-Id: Ie0e4a43f751beb77afdc84e9d52b21780f279d80
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: bring CPU online if needed when disabling irq

When disabling an irq, check that the CPU is online
before trying to run on that CPU. Bring the CPU
online if necessary.

This fixes a problem where a CPU that was not online
when disabling the irq caused the disable and the
free to fail. A subsequent attempt to request the irq
also failed because it had not been freed.

Change-Id: Ib873b5ded83ab843ea4e609f196a31ef0083a213
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: Support sw events across hotplug

When CPUs are hotplugged off and on, let the various
sw events continue after the hotplug.

Change-Id: Id1aaf30c459c9cf7c9c38967f9ccad56d4062fd3
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
msm: perf: initialise krait perf L2 counter enables

Clear the L2 counter enables at initialisation.
They are undefined out of reset.

Change-Id: I957106012625ae09efec47d4f657381963d87a5a
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
msm: perf: clean up duplicate constraint events

Events with a duplicate constraint are set to state=OFF when detected,
so that their duplicate counts are not read. However, they were not being
cleaned up because the core code only cleaned up ACTIVE events.
This resulted in counters not being freed and eventually running out
of resources.

Clean up the events with state==OFF that were marked that way because of
constraint duplication.
Ensure counts are not updated for OFF events.

Change-Id: If532801c79e6ad6809869eb0a3063774f00c92c3
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
Perf: Make per-process counters cumulative

In order to get overall value for performance counters, remove reset during
context switches. Add mechanism to calculate deltas for output to the trace
buffer.

Change-Id: I03d894a1b3bd400d8c256c3068f917ed001fbfd9
Signed-off-by: Sheetal Sahasrabudhe <sheetals@codeaurora.org>
msm: vidc: Increse OCMEM BW request to enhance performance

There are framedrops observed on high bitrate clips because
OCMEM BW is not sufficient to handle it. Increase OCMEM BW
to avoid framedrops.

Change-Id: I653b416442e56d6e0f0cdfd821c96df4b4f0e1fe
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Merge "Merge "mdss: Correct the solid fill color swap for mdp3""
Merge "Merge "Merge "mdss: Correct the solid fill color swap for mdp3"""
Merge "Merge "qseecom:  Check for case where listener service is not found""
Merge "Merge "Merge "qseecom:  Check for case where listener service is not found"""
Merge "Merge "defconfig: 8610: Enable the sensors class driver""
Merge "Merge "Merge "defconfig: 8610: Enable the sensors class driver"""
Merge "Merge "msm: mdss: release all overlay resources if calling process is unknown""
Merge "Merge "Merge "msm: mdss: release all overlay resources if calling process is unknown"""
Merge "Merge "msm: vidc: Fix a race condition in core instances list access""
msm: socinfo: Add board identification function for SBC

Add support to recognize the SBC board based on the device
tree compatible string.

Change-Id: I6a68858ecebc34858e7365855d45d3f573830b88
Signed-off-by: Eugene Yasman <eyasman@codeaurora.org>
Merge "Merge "Merge "msm: vidc: Fix a race condition in core instances list access"""
Merge "Merge "ASoC: wcd9xxx: correct hph_status handling""