drm/i915: Fix gpu frequency change tracing
authorMika Kuoppala <[email protected]>
Tue, 17 Nov 2015 16:14:26 +0000 (18:14 +0200)
committerJani Nikula <[email protected]>
Wed, 18 Nov 2015 09:22:07 +0000 (11:22 +0200)
With gen < 9 we have had always 50Mhz units as our hw
ratio. With gen >= 9 the hw ratio changed to 16.667Mhz (50/3).
The result was that our gpu frequency tracing started to output
values 3 times larger than expected due to hardcoded scaling
value. Fix this by using  Use intel_gpu_freq() when generating Mhz
value from ratio for 'intel_gpu_freq_change' trace event.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92591
Cc: [email protected] # v4.3+
Reported-by: Eero Tamminen <[email protected]>
Signed-off-by: Mika Kuoppala <[email protected]>
Reviewed-by: Ville Syrjälä <[email protected]>
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/intel_pm.c

index 7b47da805685470a79f00c4c6a94327fa25bc845..071a76b9ac523355e296836f81969374caaa6d86 100644 (file)
@@ -4449,7 +4449,7 @@ static void gen6_set_rps(struct drm_device *dev, u8 val)
        POSTING_READ(GEN6_RPNSWREQ);
 
        dev_priv->rps.cur_freq = val;
-       trace_intel_gpu_freq_change(val * 50);
+       trace_intel_gpu_freq_change(intel_gpu_freq(dev_priv, val));
 }
 
 static void valleyview_set_rps(struct drm_device *dev, u8 val)