intel/dev,perf: Use a single timescale function
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Rohan Garg <rohan.garg@intel.com> Acked-by: Antonio Caggiano <antonio.caggiano@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13996>
This commit is contained in:
committed by
Marge Bot
parent
02a4d622ed
commit
d3724de894
@@ -1027,17 +1027,6 @@ can_use_mi_rpc_bc_counters(const struct intel_device_info *devinfo)
|
||||
return devinfo->ver <= 11;
|
||||
}
|
||||
|
||||
uint64_t intel_perf_scale_gpu_timestamp(const struct intel_device_info *devinfo,
|
||||
uint64_t ts)
|
||||
{
|
||||
// Try to avoid going over the 64bits when doing the scaling
|
||||
uint64_t lower_ts = ts >> 6;
|
||||
uint64_t scaled_ts = lower_ts * 1000000000ull / devinfo->timestamp_frequency;
|
||||
scaled_ts <<= 6;
|
||||
scaled_ts += (ts & 0x3f) * 1000000000ull / devinfo->timestamp_frequency;
|
||||
return scaled_ts;
|
||||
}
|
||||
|
||||
uint64_t
|
||||
intel_perf_report_timestamp(const struct intel_perf_query_info *query,
|
||||
const uint32_t *report)
|
||||
|
||||
@@ -464,11 +464,6 @@ void intel_perf_query_result_accumulate(struct intel_perf_query_result *result,
|
||||
uint64_t intel_perf_report_timestamp(const struct intel_perf_query_info *query,
|
||||
const uint32_t *report);
|
||||
|
||||
/** Turn a GPU timestamp into a nanosecond value.
|
||||
*/
|
||||
uint64_t intel_perf_scale_gpu_timestamp(const struct intel_device_info *devinfo,
|
||||
uint64_t ts);
|
||||
|
||||
/** Accumulate the delta between 2 snapshots of OA perf registers (layout
|
||||
* should match description specified through intel_perf_query_register_layout).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user