All of lore.kernel.org
 help / color / mirror / Atom feed
From: "José Roberto de Souza" <jose.souza@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t v2] tests/kms_async_flips: Skip test when running with Intel's PSR2 selective fetch enabled
Date: Tue,  2 Nov 2021 12:43:54 -0700	[thread overview]
Message-ID: <20211102194354.101023-1-jose.souza@intel.com> (raw)

Intel's PSR2 selective fetch adds other planes to state when
necessary, causing the async flip to fail because async flip is not
supported in cursor plane.

v2:
- adding a description to the skip message

Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Karthik B S <karthik.b.s@intel.com>
Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 lib/igt_psr.c           | 16 ++++++++++++++++
 lib/igt_psr.h           |  2 ++
 tests/kms_async_flips.c | 10 ++++++++++
 3 files changed, 28 insertions(+)

diff --git a/lib/igt_psr.c b/lib/igt_psr.c
index 857eb591c..8fa8b192f 100644
--- a/lib/igt_psr.c
+++ b/lib/igt_psr.c
@@ -21,6 +21,7 @@
  * IN THE SOFTWARE.
  */
 
+#include "drmtest.h"
 #include "igt_params.h"
 #include "igt_psr.h"
 #include "igt_sysfs.h"
@@ -264,3 +265,18 @@ void psr_print_debugfs(int debugfs_fd)
 
 	igt_info("%s", buf);
 }
+
+bool i915_psr2_selective_fetch_check(int drm_fd)
+{
+	int debugfs_fd;
+	bool ret;
+
+	if (!is_i915_device(drm_fd))
+		return false;
+
+	debugfs_fd = igt_debugfs_dir(drm_fd);
+	ret = psr2_selective_fetch_check(debugfs_fd);
+	close(debugfs_fd);
+
+	return ret;
+}
diff --git a/lib/igt_psr.h b/lib/igt_psr.h
index c47b197b1..a075f336d 100644
--- a/lib/igt_psr.h
+++ b/lib/igt_psr.h
@@ -47,4 +47,6 @@ bool psr_sink_support(int device, int debugfs_fd, enum psr_mode mode);
 bool psr2_wait_su(int debugfs_fd, uint16_t *num_su_blocks);
 void psr_print_debugfs(int debugfs_fd);
 
+bool i915_psr2_selective_fetch_check(int drm_fd);
+
 #endif
diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index 4ff7a196a..0c3821339 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -27,6 +27,7 @@
 
 #include "igt.h"
 #include "igt_aux.h"
+#include "igt_psr.h"
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <poll.h>
@@ -299,6 +300,15 @@ static void test_cursor(data_t *data)
 	struct igt_fb cursor_fb;
 	struct drm_mode_cursor cur;
 
+	/*
+	 * Intel's PSR2 selective fetch adds other planes to state when
+	 * necessary, causing the async flip to fail because async flip is not
+	 * supported in cursor plane.
+	 */
+	igt_skip_on_f(i915_psr2_selective_fetch_check(data->drm_fd),
+		      "PSR2 sel fetch causes cursor to be added to primary plane " \
+		      "pages flips and async flip is not supported in cursor\n");
+
 	do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
 	do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &height));
 
-- 
2.33.1

             reply	other threads:[~2021-11-02 19:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-02 19:43 José Roberto de Souza [this message]
2021-11-02 20:20 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_async_flips: Skip test when running with Intel's PSR2 selective fetch enabled Patchwork
2021-11-02 22:16 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-11-04  0:07   ` Souza, Jose

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=20211102194354.101023-1-jose.souza@intel.com \
    --to=jose.souza@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=petri.latvala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.