10
10
#include "gt/intel_engine_pm.h"
11
11
#include "gt/intel_engine_regs.h"
12
12
#include "gt/intel_engine_user.h"
13
+ #include "gt/intel_gt.h"
13
14
#include "gt/intel_gt_pm.h"
14
15
#include "gt/intel_gt_regs.h"
15
16
#include "gt/intel_rc6.h"
@@ -425,8 +426,9 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)
425
426
struct drm_i915_private * i915 =
426
427
container_of (hrtimer , struct drm_i915_private , pmu .timer );
427
428
struct i915_pmu * pmu = & i915 -> pmu ;
428
- struct intel_gt * gt = to_gt (i915 );
429
429
unsigned int period_ns ;
430
+ struct intel_gt * gt ;
431
+ unsigned int i ;
430
432
ktime_t now ;
431
433
432
434
if (!READ_ONCE (pmu -> timer_enabled ))
@@ -442,8 +444,13 @@ static enum hrtimer_restart i915_sample(struct hrtimer *hrtimer)
442
444
* grabbing the forcewake. However the potential error from timer call-
443
445
* back delay greatly dominates this so we keep it simple.
444
446
*/
445
- engines_sample (gt , period_ns );
446
- frequency_sample (gt , period_ns );
447
+
448
+ for_each_gt (gt , i915 , i ) {
449
+ engines_sample (gt , period_ns );
450
+
451
+ if (i == 0 ) /* FIXME */
452
+ frequency_sample (gt , period_ns );
453
+ }
447
454
448
455
hrtimer_forward (hrtimer , now , ns_to_ktime (PERIOD ));
449
456
0 commit comments