#include "i915_drv.h"
#include "i915_reg.h"
#include "intel_gt.h"
#include "intel_gt_clock_utils.h"
#include "intel_gt_print.h"
#include "intel_gt_regs.h"
#include "soc/intel_dram.h"
static u32 read_reference_ts_freq(struct intel_uncore *uncore)
{ … }
static u32 gen11_get_crystal_clock_freq(struct intel_uncore *uncore,
u32 rpm_config_reg)
{ … }
static u32 gen11_read_clock_frequency(struct intel_uncore *uncore)
{ … }
static u32 gen9_read_clock_frequency(struct intel_uncore *uncore)
{ … }
static u32 gen6_read_clock_frequency(struct intel_uncore *uncore)
{ … }
static u32 gen5_read_clock_frequency(struct intel_uncore *uncore)
{ … }
static u32 g4x_read_clock_frequency(struct intel_uncore *uncore)
{ … }
static u32 gen4_read_clock_frequency(struct intel_uncore *uncore)
{ … }
static u32 read_clock_frequency(struct intel_uncore *uncore)
{ … }
void intel_gt_init_clock_frequency(struct intel_gt *gt)
{ … }
#if IS_ENABLED(CONFIG_DRM_I915_DEBUG_GEM)
void intel_gt_check_clock_frequency(const struct intel_gt *gt)
{
if (gt->clock_frequency != read_clock_frequency(gt->uncore)) {
gt_err(gt, "GT clock frequency changed, was %uHz, now %uHz!\n",
gt->clock_frequency,
read_clock_frequency(gt->uncore));
}
}
#endif
static u64 div_u64_roundup(u64 nom, u32 den)
{ … }
u64 intel_gt_clock_interval_to_ns(const struct intel_gt *gt, u64 count)
{ … }
u64 intel_gt_pm_interval_to_ns(const struct intel_gt *gt, u64 count)
{ … }
u64 intel_gt_ns_to_clock_interval(const struct intel_gt *gt, u64 ns)
{ … }
u64 intel_gt_ns_to_pm_interval(const struct intel_gt *gt, u64 ns)
{ … }