]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm: Add SYSPROF param (v2)
authorRob Clark <robdclark@chromium.org>
Fri, 4 Mar 2022 00:52:16 +0000 (16:52 -0800)
committerRob Clark <robdclark@chromium.org>
Fri, 4 Mar 2022 19:59:31 +0000 (11:59 -0800)
commit401c856ff2012def50b25d4d53376ca7601b7a23
tree152e021024f941ad5476aa2585f455bb58d4d321
parentbf00f6fec5cbb2826e1678290568557c6e62ad13
drm/msm: Add SYSPROF param (v2)

Add a SYSPROF param for system profiling tools like Mesa's pps-producer
(perfetto) to control behavior related to system-wide performance
counter collection.  In particular, for profiling, one wants to ensure
that GPU context switches do not effect perfcounter state, and might
want to suppress suspend (which would cause counters to lose state).

v2: Swap the order in msm_file_private_set_sysprof() [sboyd] and
    initialize the sysprof_active refcount to one (because the under/
    overflow checking in refcount_t doesn't expect a 0->1 transition)
    meaning that values greater than 1 means sysprof is active.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20220304005317.776110-4-robdclark@gmail.com
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/msm_drv.c
drivers/gpu/drm/msm/msm_gpu.c
drivers/gpu/drm/msm/msm_gpu.h
drivers/gpu/drm/msm/msm_submitqueue.c
include/uapi/drm/msm_drm.h