public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
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] Revert "lib/igt_psr: Move "is enabled" implementation to lib"
Date: Wed, 27 Nov 2019 16:49:01 -0800	[thread overview]
Message-ID: <20191128004902.157126-1-jose.souza@intel.com> (raw)

This reverts commit 4bb46f08f7cb6485642c4351cecdad93072d27a0.
The next patch have more information about why this patch was
reverted.

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>
---
 lib/igt_psr.c           | 16 ----------------
 lib/igt_psr.h           |  1 -
 tests/i915/i915_pm_dc.c | 13 ++++++++++++-
 3 files changed, 12 insertions(+), 18 deletions(-)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 32d69fea..83ccacdd 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -210,19 +210,3 @@ bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks)
 {
 	return igt_wait(psr2_read_last_num_su_blocks_val(debugfs_fd, num_su_blocks), 40, 1);
 }
-
-bool psr_enabled(int debugfs_fd, enum psr_mode mode)
-{
-	char buf[PSR_STATUS_MAX_LEN];
-	int ret;
-
-	ret = igt_debugfs_simple_read(debugfs_fd, "i915_edp_psr_status", buf,
-				      sizeof(buf));
-	if (ret < 0)
-		return false;
-
-	if (mode == PSR_MODE_1)
-		return strstr(buf, "PSR mode: PSR1 enabled");
-	else
-		return strstr(buf, "PSR mode: PSR2 enabled");
-}
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index 9885cb11..ca385736 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -42,6 +42,5 @@ bool psr_enable(int debugfs_fd, enum psr_mode);
 bool psr_disable(int debugfs_fd);
 bool psr_sink_support(int debugfs_fd, enum psr_mode);
 bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks);
-bool psr_enabled(int debugfs_fd, enum psr_mode mode);
 
 #endif
diff --git a/tests/i915/i915_pm_dc.c b/tests/i915/i915_pm_dc.c
index 2cf357a2..02b08189 100644
--- a/tests/i915/i915_pm_dc.c
+++ b/tests/i915/i915_pm_dc.c
@@ -84,6 +84,16 @@ static void display_fini(data_t *data)
 	igt_display_fini(&data->display);
 }
 
+static bool edp_psr2_enabled(data_t *data)
+{
+	char buf[512];
+
+	igt_debugfs_simple_read(data->debugfs_fd, "i915_edp_psr_status",
+				buf, sizeof(buf));
+
+	return strstr(buf, "PSR mode: PSR2 enabled") != NULL;
+}
+
 static void cleanup_dc_psr(data_t *data)
 {
 	igt_plane_t *primary;
@@ -288,7 +298,8 @@ static void setup_dc3co(data_t *data)
 {
 	data->op_psr_mode = PSR_MODE_2;
 	psr_enable(data->debugfs_fd, data->op_psr_mode);
-	igt_require(psr_enabled(data->debugfs_fd, PSR_MODE_2));
+	igt_require_f(edp_psr2_enabled(data),
+		      "PSR2 is not enabled\n");
 }
 
 static void test_dc3co_vpb_simulation(data_t *data)
-- 
2.24.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

             reply	other threads:[~2019-11-28  0:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  0:49 José Roberto de Souza [this message]
2019-11-28  0:49 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915_pm_dc: Wait for PSR2 entry José Roberto de Souza
2019-11-28  1:31 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [i-g-t,1/2] Revert "lib/igt_psr: Move "is enabled" implementation to lib" Patchwork
2019-11-29  8:20   ` Arkadiusz Hiler
2019-11-28  2:21 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] Revert "lib/igt_psr: Move "is enabled" implementation to lib" (rev2) Patchwork
2019-11-29  7:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20191128004902.157126-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