disp: msm: sde: add support for hwfence profiling

This change adds hwfence input and output fence profiling
registers and debugfs to enable them.
To enable input hw fences timestamps:
echo 0x1 > /d/dri/0/debug/hw_fence_status
To enable output hw fences timestamps:
echo 0x2 > /d/dri/0/debug/hw_fence_status
To enable both, input and output hw fences timestamps:
echo 0x3 > /d/dri/0/debug/hw_fence_status.

Change-Id: I269a38f3843a01ec8c0816890e50bb7d847a4ed9
Signed-off-by: Christina Oliveira <quic_coliveir@quicinc.com>
This commit is contained in:
Christina Oliveira
2022-05-18 09:38:40 -07:00
parent d2d060cf80
commit 21ca2acab9
11 changed files with 252 additions and 23 deletions

View File

@@ -189,6 +189,23 @@ struct sde_hw_ctl_ops {
*/
void (*hw_fence_trigger_sw_override)(struct sde_hw_ctl *ctx);
/**
* enable or clear hw fence output fence timestamps
* @ctx : ctl path ctx pointer
* @enable : indicates if timestamps should be enabled
* @clear : indicates if timestamps should be cleared
*/
void (*hw_fence_output_timestamp_ctrl)(struct sde_hw_ctl *ctx, bool enable, bool clear);
/**
* get hw fence output fence timestamps and clear them
* @ctx : ctl path ctx pointer
* @val_start : pointer to start timestamp value
* @val_end : pointer to end timestamp value
* @Return: error code
*/
int (*hw_fence_output_status)(struct sde_hw_ctl *ctx, u64 *val_start, u64 *val_end);
/**
* configure output hw fence trigger
* @ctx : ctl path ctx pointer