History

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.

Rob Clark committed 4 years ago

Commit 90f45c41 parent f7ddbf56 files · +81 −0Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/drm/msm_drm.h+1−0
@@ -81,6 +81,7 @@ struct drm_msm_timespec { · 80 unmodified lines
81#define MSM_PARAM_PP_PGTABLE 0x08 /* RO: Deprecated, always returns zero */81#define MSM_PARAM_PP_PGTABLE 0x08 /* RO: Deprecated, always returns zero */
82#define MSM_PARAM_FAULTS 0x09 /* RO */82#define MSM_PARAM_FAULTS 0x09 /* RO */
83#define MSM_PARAM_SUSPENDS 0x0a /* RO */83#define MSM_PARAM_SUSPENDS 0x0a /* RO */
84#define MSM_PARAM_SYSPROF 0x0b /* WO: 1 preserves perfcntrs, 2 also disables suspend */
84 85
85/* For backwards compat. The original support for preemption was based on86/* For backwards compat. The original support for preemption was based on
86 * a single ring per priority level so # of priority levels equals the #87 * a single ring per priority level so # of priority levels equals the #