unstub intel_gt_get_awake_time()
authorjsg <jsg@openbsd.org>
Sun, 30 Jan 2022 23:19:26 +0000 (23:19 +0000)
committerjsg <jsg@openbsd.org>
Sun, 30 Jan 2022 23:19:26 +0000 (23:19 +0000)
sys/dev/pci/drm/i915/gt/intel_gt_pm.c

index 43237fe..2df0c5f 100644 (file)
@@ -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(&gt->stats.lock);
                total = __intel_gt_get_awake_time(gt);
        } while (read_seqcount_retry(&gt->stats.lock, seq));
+#else
+       do {
+               seq = read_seqcount_begin((seqcount_t *)&gt->stats.lock);
+               total = __intel_gt_get_awake_time(gt);
+       } while (read_seqcount_retry((seqcount_t *)&gt->stats.lock, seq));
+#endif
 
        return total;
-#endif
 }
 
 #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)