summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/xe/xe_gt_clock.h
diff options
context:
space:
mode:
authorAravind Iddamsetty <aravind.iddamsetty@linux.intel.com>2023-08-30 08:46:50 +0530
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:41:13 -0500
commit8d07691c35bfd08fe16f865b9df04204604b36d5 (patch)
tree4705be89a44f1640282f058fb35ddb25ebbdb70c /drivers/gpu/drm/xe/xe_gt_clock.h
parent430003b85ce36e6f9dd6799b6cd5690f9b6c8a2a (diff)
drm/xe: Get GT clock to nanosecs
Helper to convert GT clock cycles to nanoseconds. v2: Use DIV_ROUND_CLOSEST_ULL helper(Ashutosh) v3: rename xe_gt_clock_interval_to_ns to xe_gt_clock_cycles_to_ns Reviewed-by: Tejas Upadhyay <tejas.upadhyay@intel.com> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com> Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty@linux.intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_gt_clock.h')
-rw-r--r--drivers/gpu/drm/xe/xe_gt_clock.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_clock.h b/drivers/gpu/drm/xe/xe_gt_clock.h
index 511923afd224..aa162722f859 100644
--- a/drivers/gpu/drm/xe/xe_gt_clock.h
+++ b/drivers/gpu/drm/xe/xe_gt_clock.h
@@ -6,8 +6,10 @@
#ifndef _XE_GT_CLOCK_H_
#define _XE_GT_CLOCK_H_
+#include <linux/types.h>
+
struct xe_gt;
int xe_gt_clock_init(struct xe_gt *gt);
-
+u64 xe_gt_clock_cycles_to_ns(const struct xe_gt *gt, u64 count);
#endif