From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Jeevan B <jeevan.b@intel.com>
Subject: [igt-dev] [PATCH i-g-t 1/2] tests/i915_pm_dc: Fix the requirement check
Date: Tue, 5 Nov 2019 10:17:37 -0800 [thread overview]
Message-ID: <20191105181738.6700-1-jose.souza@intel.com> (raw)
igt_debugfs_simple_read() requires the debugfs file descriptor not
the drm device file descriptor, so the requirement check was complete
broken.
Cc: Jeevan B <jeevan.b@intel.com>
Cc: Anshuman Gupta <anshuman.gupta@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
tests/i915/i915_pm_dc.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 90d81cfe..cce70a57 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -278,24 +278,24 @@ static void check_dc3co_with_videoplayback_like_load(data_t *data)
check_dc_counter(data->drm_fd, CHECK_DC3CO, dc3co_prev_cnt);
}
-static void require_dc_counter(int drm_fd, int dc_flag)
+static void require_dc_counter(int debugfs_fd, int dc_flag)
{
char buf[4096];
- igt_debugfs_simple_read(drm_fd, "i915_dmc_info",
+ igt_debugfs_simple_read(debugfs_fd, "i915_dmc_info",
buf, sizeof(buf));
switch (dc_flag) {
case CHECK_DC3CO:
- igt_skip_on_f(strstr(buf, "DC3CO count"),
+ igt_skip_on_f(!strstr(buf, "DC3CO count"),
"DC3CO counter is not available\n");
break;
case CHECK_DC5:
- igt_skip_on_f(strstr(buf, "DC3 -> DC5 count"),
+ igt_skip_on_f(!strstr(buf, "DC3 -> DC5 count"),
"DC5 counter is not available\n");
break;
case CHECK_DC6:
- igt_skip_on_f(strstr(buf, "DC5 -> DC6 count"),
+ igt_skip_on_f(!strstr(buf, "DC5 -> DC6 count"),
"DC6 counter is not available\n");
break;
default:
@@ -313,7 +313,7 @@ static void setup_dc3co(data_t *data)
static void test_dc3co_vpb_simulation(data_t *data)
{
- require_dc_counter(data->drm_fd, CHECK_DC3CO);
+ require_dc_counter(data->debugfs_fd, CHECK_DC3CO);
setup_output(data);
setup_dc3co(data);
setup_videoplayback(data);
@@ -325,7 +325,7 @@ static void test_dc_state_psr(data_t *data, int dc_flag)
{
uint32_t dc_counter_before_psr;
- require_dc_counter(data->drm_fd, dc_flag);
+ require_dc_counter(data->debugfs_fd, dc_flag);
dc_counter_before_psr = read_dc_counter(data->drm_fd, dc_flag);
setup_output(data);
setup_primary(data);
@@ -387,7 +387,7 @@ static void test_dc_state_dpms(data_t *data, int dc_flag)
{
uint32_t dc_counter;
- require_dc_counter(data->drm_fd, dc_flag);
+ require_dc_counter(data->debugfs_fd, dc_flag);
setup_dc_dpms(data);
dc_counter = read_dc_counter(data->drm_fd, dc_flag);
dpms_off(data);
--
2.24.0
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2019-11-05 18:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-05 18:17 José Roberto de Souza [this message]
2019-11-05 18:17 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915_pm_dc: Reuse the debugfs fd instead of opening and closing one each time José Roberto de Souza
2019-11-05 19:13 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/i915_pm_dc: Fix the requirement check Patchwork
2019-11-06 14:10 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-11-08 7:53 ` [igt-dev] [PATCH i-g-t 1/2] " Arkadiusz Hiler
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=20191105181738.6700-1-jose.souza@intel.com \
--to=jose.souza@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeevan.b@intel.com \
/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