drm/i915: Fix gpu frequency change tracing
Subsystems (2)
PATCH 1/1 drm/i915: Fix gpu frequency change tracing
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
--- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_pm.c +1 -1
@@ -4330,7 +4330,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)
Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Mika Kuoppala
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
Reported-by Eero Tamminen <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_pm.c +0
-0
drivers/gpu/drm/i915/intel_pm.c static void gen6_set_rps(struct drm_device *dev, u8 val) · line 4333
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -4330,7 +4330,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));
I was thinking maybe moving it to the caller to avoid having it in both the gen6 and vlv set_rps functions, but there are actually so many callers that we're better off leaving it here.
Quoted 10 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0}static void valleyview_set_rps (struct drm_device *dev,u8 val)Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 30 lines · Ville Syrjälä
Quoted 19 lines · Mika Kuoppala
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
Reported-by Eero Tamminen <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/intel_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/i915/intel_pm.c +0
-0drivers/gpu/drm/i915/intel_pm.c static void gen6_set_rps(struct drm_device *dev, u8 val) · line 4333
Quoted 5 lines
drivers/gpu/drm/i915/intel_pm.c +1
-1@@ -4330,7 +4330,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));I was thinking maybe moving it to the caller to avoid having it in both the gen6 and vlv
set_rpsfunctions, but there are actually so many callers that we're better off leaving it here.
Quoted 1 line
Reviewed-by Ville Syrjälä <[email protected]>
Pushed to drm-intel-fixes with cc: stable for v4.3+, thanks for the patch and review.
BR,
Jani.
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/i915/intel_pm.c +0
-0}static void valleyview_set_rps (struct drm_device *dev,u8 val)Signature · 6 lines
2.5.0 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx