1ad8b1aafSjsg /* SPDX-License-Identifier: MIT */ 2ad8b1aafSjsg /* 3ad8b1aafSjsg * Copyright © 2020 Intel Corporation 4ad8b1aafSjsg */ 5ad8b1aafSjsg 6ad8b1aafSjsg #ifndef __INTEL_GT_CLOCK_UTILS_H__ 7ad8b1aafSjsg #define __INTEL_GT_CLOCK_UTILS_H__ 8ad8b1aafSjsg 9ad8b1aafSjsg #include <linux/types.h> 10ad8b1aafSjsg 11ad8b1aafSjsg struct intel_gt; 12ad8b1aafSjsg 13ad8b1aafSjsg void intel_gt_init_clock_frequency(struct intel_gt *gt); 14ad8b1aafSjsg 15ad8b1aafSjsg #if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM) 16ad8b1aafSjsg void intel_gt_check_clock_frequency(const struct intel_gt *gt); 17ad8b1aafSjsg #else intel_gt_check_clock_frequency(const struct intel_gt * gt)18ad8b1aafSjsgstatic inline void intel_gt_check_clock_frequency(const struct intel_gt *gt) {} 19ad8b1aafSjsg #endif 20ad8b1aafSjsg 21*5ca02815Sjsg u64 intel_gt_clock_interval_to_ns(const struct intel_gt *gt, u64 count); 22*5ca02815Sjsg u64 intel_gt_pm_interval_to_ns(const struct intel_gt *gt, u64 count); 23ad8b1aafSjsg 24*5ca02815Sjsg u64 intel_gt_ns_to_clock_interval(const struct intel_gt *gt, u64 ns); 25*5ca02815Sjsg u64 intel_gt_ns_to_pm_interval(const struct intel_gt *gt, u64 ns); 26ad8b1aafSjsg 27ad8b1aafSjsg #endif /* __INTEL_GT_CLOCK_UTILS_H__ */ 28