From: deepak.s@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/2] tests/pm_rc6_residency: Fix proper residency calculation
Date: Thu, 26 Feb 2015 21:10:28 +0530 [thread overview]
Message-ID: <1424965229-16691-2-git-send-email-deepak.s@linux.intel.com> (raw)
In-Reply-To: <1424965229-16691-1-git-send-email-deepak.s@linux.intel.com>
From: Deepak S <deepak.s@linux.intel.com>
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>
---
tests/pm_rc6_residency.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/pm_rc6_residency.c b/tests/pm_rc6_residency.c
index 2658a89..1600ac3 100644
--- a/tests/pm_rc6_residency.c
+++ b/tests/pm_rc6_residency.c
@@ -37,6 +37,7 @@
#define SLEEP_DURATION 3000 // in milliseconds
#define RC6_FUDGE 900 // in milliseconds
+#define CODE_TIME 50 // in microseconfs
static unsigned int readit(const char *path)
{
@@ -102,7 +103,7 @@ static void residency_accuracy(int value[],const char *name_of_rc6_residency)
"the GPU is as idle as possible(ie. no X, "
"running and running no other tests)\n");
- counter = ((double)value[1] - (double)value[0]) /(double) SLEEP_DURATION;
+ counter = ((double)value[1] - (double)value[0]) /(double) (SLEEP_DURATION + CODE_TIME);
if( counter > 0.9 ){
counter_result = counter;
--
1.9.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-02-26 15:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 15:40 [PATCH] drm/i915: Add media rc6 residency file to sysfs deepak.s
2015-02-26 15:40 ` deepak.s [this message]
2015-02-26 15:40 ` [PATCH 2/2] tests/pm_rc6_residency: Add media_rc6_residency_counter subtest deepak.s
2015-02-26 16:52 ` Daniel Vetter
2015-02-26 16:48 ` [PATCH] drm/i915: Add media rc6 residency file to sysfs Daniel Vetter
2015-02-28 17:08 ` shuang.he
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1424965229-16691-2-git-send-email-deepak.s@linux.intel.com \
--to=deepak.s@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox