Age | Commit message (Collapse) | Author |
|
The code is confused about the units of CODE_TIME. The comment
says 50 microsseconds, but the actual code makes it 50
milliseconds. Avoid the whole mess by measuring the sleep
duration ourselves. Since the time measurement is taken around
the whole operation it obviously includes a bit of extra, but
at least it's much less than the fixed 50 ms.
For instance on one VLV board I now get something like this:
- Residency in rc6 or deeper state: 3002 ms (ratio to expected duration: 0.98)
+ Residency in rc6 or deeper state: 3001 ms (sleep duration 3003 ms) (ratio to expected duration: 1.00)
so the reported ratio is now much closer to reality.
Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
|
|
Apply the new API to all call sites within the test suite using the following
semantic patch:
// Semantic patch for replacing drm_open_any* with arch-specific drm_open_driver* calls
@@
identifier i =~ "\bdrm_open_any\b";
@@
- i()
+ drm_open_driver(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_master\b";
@@
- i()
+ drm_open_driver_master(DRIVER_INTEL)
@@
identifier i =~ "\bdrm_open_any_render\b";
@@
- i()
+ drm_open_driver_render(DRIVER_INTEL)
@@
identifier i =~ "\b__drm_open_any\b";
@@
- i()
+ __drm_open_driver(DRIVER_INTEL)
Signed-off-by: Micah Fedke <micah.fedke@collabora.co.uk>
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
Add a header that includes all the headers for the library. This allows
reorganisation of the library without affecting programs using it and
also simplifies the headers that need to be included to use the library.
Signed-off-by: Thomas Wood <thomas.wood@intel.com>
|
|
The test checks the residency in a given RC6 state or any deeper states
that are also enabled. For example the RC6 subtest checks the combined
residency in RC6/RC6P/RC6PP. Since the kernel reported value for the RC6
residency doesn't include the RC6P or RC6PP residency we need to adjust
the RC6 value accordingly. A similar adjustment is needed for the RC6P
subtest.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90369
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Currently the test runs a separate idle loop when reading out each RC6
counter. But there is no need for this, we can have a signle idle loop
and read out all the counters at once.
This prepares for an upcoming patch where we need to consider the RC6P
and RC6PP counters as well when checking RC6.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The way the test checks for the RC6 enabled mask atm doesn't work:
calling igt_success outside of any subtests doesn't have any effect.
This means the test will run a 11 second idle loop for each RC6 state
regardless if the platform supports these or have them enabled. Fix this
by checking explicitly if a given RC6 state is enabled before reading
out/checking the corresponding counter.
With this fix we can also get rid of the GEN6/IVB checks, since the RC6
mask check makes them redundant. We still need the VLV/CHV checks, since
media RC6 doesn't have a separate bit in the mask.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The upcoming patches will add some additional logic around reading out
the counter values, so factor out the readout code to prepare for those
patches.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The counter check function (residency_accuracy) cares only about the
counter delta, so no need to pass it the start/stop values separately.
Simplify things to prepare for the upcoming patches.
No functional change.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The temporary vars only obfuscated things, so get rid of them. Also
remove some redundant asserts and info messages.
The only functional change is that the counter delta will be checked
only against a percentage based accuracy range (90%-100%) and not
against a hard-coded limit (RC6_FUDGE). The two checks serve the same
purpose and the former one is clearer.
Signed-off-by: Imre Deak <imre.deak@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
The integer comparison macros give us better error output by including
the actual values that failed the comparison.
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
|
|
Added new media_rc6_residency_subtest for chv & vlv.
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
With current code we are not considering the RC6 residency during sysfs
read. This is causing test to fail due to incorrect residency_accuracy check
This patch consider code time spent for accuracy check
Signed-off-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
sysfs interface for rc6 has been changed to only expose deep RC6 file to the platorms
that really support them, aka SNB and IVB.
So let's split this test and only test RC6p and RC6pp on these platforms.
Reference: https://bugs.freedesktop.org/show_bug.cgi?id=84886
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
|
|
Combine two subtests(rc6_residency_check and rc6_residency_counter)
into one subtest(residency_accuracy)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
New stuff caught.
Plus manually simplify the massive igt_fail_on_f(file == NULL, ...) to
a simple igt_assert(file). We already print the errno (if
applicapable) and the condition, which is equally informative.
Cc: Yi Sun <yi.sun@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Why need add rc6_residency_counter subtest case:
RC6 feature support residency counter,from power consumption aspect,
the counter closer to 1,the better.If the counter is < 0.9, the residency
is not good and will impact power consumption value, if the counter is > 1,
sysfs file is inaccurate.
Attach the test result message:
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency
IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 0.987000
This machine entry rc6 state.
Subtest rc6-residency-counter: SUCCESS
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --run-subtest rc6-residency-counter
IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 0.987000
This machine entry rc6 state.
Subtest rc6-residency-counter: SUCCESS
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --run-subtest rc6-residency-check
IGT-Version: 1.6-g9a70e29 (x86_64) (Linux: 3.15.0-rc7_drm-intel-nightly_0a37b5_20140604+ x86_64)
Subtest rc6-residency-check: SUCCESS
root@x-bdw05:/GFX/Test/Intel_gpu_tools/intel-gpu-tools/tests# ./pm_rc6_residency --list
rc6-residency-check
rc6-residency-counter
Run as non-root
[haha@x-pk home]$ ./pm_rc6_residency
IGT-Version: 1.6-g18d2130 (x86_64) (Linux: 3.13.0-rc3_drm-intel-nightly_639e4d_20131210+ x86_64)
No intel gpu found
Subtest rc6-residency-check: SKIP
Subtest rc6-residency-counter: SKIP
Run on non-intel platform
[root@x-pk5 home]# ./pm_rc6_residency
IGT-Version: 1.6-g18d2130 (x86_64) (Linux: 3.13.0-rc3_drm-intel-nightly_639e4d_20131210+ x86_64)
Test requirement not met in function read_rc6_residency, file pm_rc6_residency.c:77:
Last errno: 2, No such file or directory
Test requirement: (!(file))
Subtest rc6-residency-check: SKIP
Subtest rc6-residency-counter: SKIP
Signed-off-by: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This reverts commit 35554a1bcaaea55c1cfa88c0176c58d2fb3b8013.
Apparently people are too unhappy with this.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
This reverts commit 9a70e29f8380c2fc6f9b43757c68e24bf2619061.
Patch needs polish and after a quick irc discussion Ben&I agreed that
the revert is in order.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Move rc6_residency_check to subtest, add new rc6_residency_counter subtest
for pm_rc6_residency IGT case.
Test results run on platforms show as below:
On HSW
---------------------------------------
[root@x-hswu opt]# ./pm_rc6_residency
IGT-Version: 1.6-g35b31df (x86_64) (Linux: 3.15.0-rc3_drm-intel-nightly_0791a3_20140520+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
This machine entry rc6 status.
The residency counter : 0.999667
Subtest rc6-residency-counter: SUCCESS
On IVB
----------------------------------------
[root@IVB tests]# ./pm_rc6_residency
IGT-Version: 1.6-g35b31df (x86_64) (Linux: 3.13.6_20140318+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine entry rc6p status.
The residency counter : 0.997000
Subtest rc6-residency-counter: SUCCESS
On BYT
----------------------------------------
root@x-byt:/opt# ./pm_rc6_residency
IGT-Version: 1.6-g0d39021 (x86_64) (Linux: 3.14.0_kcloud_ceabbb_20140521+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 1.144333
Test assertion failure function rc6_residency_counter, file pm_rc6_residency.c:131:
Last errno: 0, Success
Failed assertion: counter_result <=1
Debug files must be wrong,
Subtest rc6-residency-counter: FAIL
On BDW
---------------------------------------
[root@x-bdw01 opt]# ./pm_rc6_residency
IGT-Version: 1.6-g0d39021 (x86_64) (Linux: 3.15.0-rc5_drm-intel-nightly_367653_20140521+ x86_64)
Subtest rc6-residency-check: SUCCESS
This machine doesn't support rc6pp
This machine doesn't support rc6p
The residency counter : 0.994333
This machine entry rc6 state.
Subtest rc6-residency-counter: SUCCESS
Signed-off-by: Liu, Lei A <lei.a.liu@intel.com>
Signed-off-by: Wendy Wang <wendy.wang@intel.com>
Signed-off-by: Ben Widawsky <benjamin.widawsky@intel.com>
|
|
Often just folding together of the common if (cond) printf;
abort|igt_skip|igt_fail; pattern. But in a few cases I've ripped out
more since the igt macros will already print the condition and errno.
A few tests where more work (like ripping out return codes en masse)
is needed left as-is.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
I've left unistd.h in it - it's not strictly required but most users
of drmtest.h want it for the open helpers, and then you kinda need to
close that file descriptor again ...
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Also use igt_skip a bit more to simplify some of the tests.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|
|
Imo power management, power consumption and performance are tightly
enough coupled that we can throw them all into one bin.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
|