Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 2/2] tests/intel/kms_psr: Add FBC support to PSR/PSR2 tests
Date: Tue, 21 Nov 2023 11:53:20 +0530	[thread overview]
Message-ID: <20231121062320.1860993-3-jeevan.b@intel.com> (raw)
In-Reply-To: <20231121062320.1860993-1-jeevan.b@intel.com>

For intel_display_ver 20, FBC can be enabled along with PSR/PSR2,
thereby adding FBC checks to validate this scenario.

Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
 tests/intel/kms_psr.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/tests/intel/kms_psr.c b/tests/intel/kms_psr.c
index 6b80f6f4b..88ee03ac2 100644
--- a/tests/intel/kms_psr.c
+++ b/tests/intel/kms_psr.c
@@ -35,6 +35,7 @@
 #include <stdbool.h>
 #include <stdio.h>
 #include <string.h>
+#include "i915/intel_fbc.h"
 #include "xe/xe_ioctl.h"
 #include "xe/xe_query.h"
 
@@ -376,6 +377,7 @@ typedef struct {
 	int mod_stride;
 	drmModeModeInfo *mode;
 	igt_output_t *output;
+	bool fbc_flag;
 } data_t;
 
 static void create_cursor_fb(data_t *data)
@@ -802,6 +804,11 @@ static void test_setup(data_t *data)
 			psr_entered = true;
 			break;
 		}
+
+		if (data->fbc_flag)
+			igt_assert_f(intel_fbc_wait_until_enabled(data->drm_fd,
+								  pipe),
+								  "FBC still disabled");
 	}
 
 	igt_assert(psr_entered);
@@ -821,6 +828,7 @@ igt_main
 {
 	int z;
 	enum operations op;
+	enum pipe pipe;
 	const char *append_subtest_name[3] = {
 		"psr_",
 		"psr2_",
@@ -837,6 +845,11 @@ igt_main
 		data.bops = buf_ops_create(data.drm_fd);
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require_f(output_supports_psr(&data), "Sink does not support PSR/PSR2/PR\n");
+		if ((intel_display_ver(intel_get_drm_devid(data.drm_fd) == 20)) &&
+		    (intel_fbc_supported_on_chipset(data.drm_fd, pipe))) {
+			data.fbc_flag = true;
+			intel_fbc_enable(data.drm_fd);
+		}
 	}
 
 	for (z = 0; z < ARRAY_SIZE(modes); z++) {
-- 
2.25.1

  parent reply	other threads:[~2023-11-21  6:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-21  6:23 [igt-dev] [PATCH i-g-t 0/2] Add FBC support to PSR/PSR2 tests Jeevan B
2023-11-21  6:23 ` [igt-dev] [PATCH i-g-t 1/2] tests/intel/kms_psr2_sf: Add FBC support to PSR2 tests Jeevan B
2023-11-21  6:23 ` Jeevan B [this message]
2023-11-21  7:50 ` [igt-dev] ✗ GitLab.Pipeline: warning for Add FBC support to PSR/PSR2 tests Patchwork
2023-11-21  8:28 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-11-21  8:48 ` [igt-dev] ✗ CI.xeBAT: failure " Patchwork
2023-11-21 10:54 ` [igt-dev] ✓ Fi.CI.BAT: success for Add FBC support to PSR/PSR2 tests (rev2) Patchwork
2023-11-21 10:55 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-21 23:00 ` [igt-dev] ✗ Fi.CI.IGT: failure for Add FBC support to PSR/PSR2 tests Patchwork
2023-11-22  4:30 ` [igt-dev] ✗ Fi.CI.IGT: failure for Add FBC support to PSR/PSR2 tests (rev2) 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=20231121062320.1860993-3-jeevan.b@intel.com \
    --to=jeevan.b@intel.com \
    --cc=igt-dev@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