Bug 92591 - [SKL] Bogus values reported (randomly) for GPU frequency requests in sysfs
Summary: [SKL] Bogus values reported (randomly) for GPU frequency requests in sysfs
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Mika Kuoppala
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-22 10:29 UTC by Eero Tamminen
Modified: 2017-10-06 14:29 UTC (History)
2 users (show)

See Also:
i915 platform: SKL
i915 features: power/Other


Attachments

Description Eero Tamminen 2015-10-22 10:29:15 UTC
USE-CASE:

1. Start sampling kernel's GPU frequency request values:
   while true; do head /sys/class/drm/card0/gt_cur_freq_mhz; sleep 1; done

2. Run heavy GPU benchmark like Unigine Heaven, Lightsmark 2008, GfxBench 3.x Manhattan.


EXPECTED OUTCOME:

* reported kernel GPU freq request is within min and max GPU frequencies


ACTUAL OUTCOME:

* On SKL-Y machine with supported GPU frequencies in 350-800 Mhz range, gt_cur_freq_mhz sometimes reports values within this range, sometimes obviously bogus higher ones (about 4x higher).  

* On SKL-i5 machine with supported GPU frequencies in 350-1150 Mhz range, gt_cur_freq_mhz sometimes reports values within this range, sometimes obviously bogus higher ones (about 3x higher).  


This issue has been visible in drm-intel-nightly kernels since we started testing SKL devices.


Note: CAGF (gt_act_freq_mhz) value asked from GPU is always within the correct MHz range.  (Sometimes it's not divisable with 50, like the requests, but that's probably not an issue.)

Assigning to Mika as he said that that he might take a look at this at some point.
Comment 1 Mika Kuoppala 2015-11-17 16:17:39 UTC
Eero, I suspect that only the trace events were wrongly scaled, not the sysfs entry. So the use case of polling gt_cur_freq_mhz is not a way to reproduce.

http://patchwork.freedesktop.org/patch/65055/
Comment 2 Jani Nikula 2015-11-18 10:10:57 UTC
Presumed fixed by

commit 0f94592efd36213c961145fe1ab0c3bc323ec053
Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Date:   Tue Nov 17 18:14:26 2015 +0200

    drm/i915: Fix gpu frequency change tracing

Please reopen if that is not the case.
Comment 3 Eero Tamminen 2015-11-19 10:35:20 UTC
Thanks, seems to be working.  Kernel GPU freq requests reported by ftrace on SKL-Y are now within GPU speed range whereas day before they were often 3x higher.

-> Verified

(In many GPU heavy cases 4.5W TDP limit on SKL-Y causes GPU to run at half speed or even lower according to sysfs CAGF value (real HW freq) although kernel requests full speed from GPU according to ftrace.)
Comment 4 Jani Nikula 2015-11-19 11:19:04 UTC
Eero, thanks for the follow-up and testing.
Comment 5 Elizabeth 2017-10-06 14:29:32 UTC
Closing old verified.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.