From 7fbee575b130778ef6213543b2541c15662c3cc6 Mon Sep 17 00:00:00 2001 From: jsg Date: Sun, 30 Jan 2022 23:19:26 +0000 Subject: [PATCH] unstub intel_gt_get_awake_time() --- sys/dev/pci/drm/i915/gt/intel_gt_pm.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/dev/pci/drm/i915/gt/intel_gt_pm.c b/sys/dev/pci/drm/i915/gt/intel_gt_pm.c index 43237fe4113..2df0c5f1bf8 100644 --- a/sys/dev/pci/drm/i915/gt/intel_gt_pm.c +++ b/sys/dev/pci/drm/i915/gt/intel_gt_pm.c @@ -393,19 +393,22 @@ static ktime_t __intel_gt_get_awake_time(const struct intel_gt *gt) ktime_t intel_gt_get_awake_time(const struct intel_gt *gt) { - STUB(); - return 0; -#ifdef notyet unsigned int seq; ktime_t total; +#ifdef notyet do { seq = read_seqcount_begin(>->stats.lock); total = __intel_gt_get_awake_time(gt); } while (read_seqcount_retry(>->stats.lock, seq)); +#else + do { + seq = read_seqcount_begin((seqcount_t *)>->stats.lock); + total = __intel_gt_get_awake_time(gt); + } while (read_seqcount_retry((seqcount_t *)>->stats.lock, seq)); +#endif return total; -#endif } #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST) -- 2.20.1