msm: kgsl: Add a new API to allow sharing of GPU performance counters
Adreno uses programmable performance counters, meaning that while there are a limited number of physical counters each counter can be programmed to count a vast number of different measurements (we refer to these as countables). This could cause problems if multiple apps want to use the performance counters, so this API and infrastructure allows the counters to be safely shared. The kernel tracks which countable is selected for each of the physical counters for each counter group (where groups closely match hardware blocks). If the desired countable is already in use, or there is an open physical counter, then the process is allowed to use the counter. The get ioctl reserves the counter and returns the dword offset of the register associated with that physical counter. The put ioctl releases the physical counter. The query ioctl gets the countables used for all of the counters in the block - up to 8 values can be returned. The read ioctl gets the current hardware value in the counter Change-Id: Ic0dedbadae1dedadba60f8a3e685e2ce7d84fb33 Signed-off-by:Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by:
Carter Cooper <ccooper@codeaurora.org>
Loading
Please sign in to comment