Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Govindapillai <vinod.govindapillai@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: vinod.govindapillai@intel.com, santhosh.reddy.guddati@intel.com,
	swati2.sharma@intel.com, jani.nikula@intel.com
Subject: [PATCH i-g-t v3 02/11] tests/intel/kms_frontbuffer_tracking: use intel_fbc_get_fbc_status()
Date: Thu, 16 Apr 2026 12:25:50 +0300	[thread overview]
Message-ID: <20260416092559.88735-3-vinod.govindapillai@intel.com> (raw)
In-Reply-To: <20260416092559.88735-1-vinod.govindapillai@intel.com>

Use the common intel_fbc_get_fbc_status() to get the fbc status

Signed-off-by: Vinod Govindapillai <vinod.govindapillai@intel.com>
---
 tests/intel/kms_frontbuffer_tracking.c | 54 ++++++++++++++------------
 1 file changed, 30 insertions(+), 24 deletions(-)

diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index c16f63199..b01959d2c 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -1570,13 +1570,13 @@ static void drrs_print_status(void)
 static struct timespec fbc_get_last_action(void)
 {
 	struct timespec ret = { 0, 0 };
-	char buf[128];
+	char fbc_status[128];
 	char *action;
 	ssize_t n_read;
 
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	action = strstr(buf, "\nLast action:");
+	action = strstr(fbc_status, "\nLast action:");
 	igt_assert(action);
 
 	n_read = sscanf(action, "Last action: %ld.%ld",
@@ -1620,12 +1620,12 @@ static void fbc_update_last_action(void)
 static void fbc_setup_last_action(void)
 {
 	ssize_t n_read;
-	char buf[128];
+	char fbc_status[128];
 	char *action;
 
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	action = strstr(buf, "\nLast action:");
+	action = strstr(fbc_status, "\nLast action:");
 	if (!action) {
 		igt_info("FBC last action not supported\n");
 		return;
@@ -1640,10 +1640,11 @@ static void fbc_setup_last_action(void)
 
 static bool fbc_is_compressing(void)
 {
-	char buf[128];
+	char fbc_status[128];
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	return strstr(buf, "\nCompressing: yes\n") != NULL;
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
+
+	return strstr(fbc_status, "\nCompressing: yes\n");
 }
 
 static bool fbc_wait_for_compression(void)
@@ -1653,45 +1654,50 @@ static bool fbc_wait_for_compression(void)
 
 static bool fbc_not_enough_stolen(void)
 {
-	char buf[128];
+	char fbc_status[128];
+
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	return strstr(buf, "FBC disabled: not enough stolen memory\n");
+	return strstr(fbc_status, "FBC disabled: not enough stolen memory\n");
 }
 
 static bool fbc_stride_not_supported(void)
 {
-	char buf[128];
+	char fbc_status[128];
+
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	return strstr(buf, "FBC disabled: framebuffer stride not supported\n");
+	return strstr(fbc_status, "FBC disabled: framebuffer stride not supported\n");
 }
 
 static bool fbc_mode_too_large(void)
 {
-	char buf[128];
+	char fbc_status[128];
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	return strstr(buf, "FBC disabled: mode too large for compression\n");
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
+
+	return strstr(fbc_status, "FBC disabled: mode too large for compression\n");
 }
 
 static bool fbc_psr_not_possible(void)
 {
-	char buf[128];
+	char fbc_status[128];
+
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	return strstr(buf, "FBC disabled: PSR1 enabled (Wa_14016291713)");
+	return strstr(fbc_status, "FBC disabled: PSR1 enabled (Wa_14016291713)");
 }
 
 static bool fbc_enable_per_plane(int plane_index, igt_crtc_t *crtc)
 {
-	char buf[PATH_MAX];
+	char fbc_status[PATH_MAX];
 	char buf_plane[128];
 
 	sprintf(buf_plane, "%d%s", plane_index, igt_crtc_name(crtc));
 
-	debugfs_read_crtc("i915_fbc_status", buf);
-	return strstr(strstr(buf, "*"), buf_plane);
+	intel_fbc_get_fbc_status(prim_mode_params.crtc, fbc_status, sizeof(fbc_status));
+
+	return strstr(strstr(fbc_status, "*"), buf_plane);
 }
 
 static bool drrs_wait_until_rr_switch_to_low(void)
-- 
2.43.0


  parent reply	other threads:[~2026-04-16  9:26 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  9:25 [PATCH i-g-t v3 00/11] updates to fbc tests Vinod Govindapillai
2026-04-16  9:25 ` [PATCH i-g-t v3 01/11] lib/i915/fbc: extract intel_fbc_get_fbc_status() Vinod Govindapillai
2026-04-30  2:56   ` Reddy Guddati, Santhosh
2026-04-16  9:25 ` Vinod Govindapillai [this message]
2026-04-30  3:18   ` [PATCH i-g-t v3 02/11] tests/intel/kms_frontbuffer_tracking: use intel_fbc_get_fbc_status() Reddy Guddati, Santhosh
2026-04-16  9:25 ` [PATCH i-g-t v3 03/11] tests/intel/kms_frontbuffer_tracking: update the outdated fbc status reasons Vinod Govindapillai
2026-04-30  3:37   ` Reddy Guddati, Santhosh
2026-04-30  7:05     ` Govindapillai, Vinod
2026-04-30  8:30       ` Jani Nikula
2026-04-16  9:25 ` [PATCH i-g-t v3 04/11] tests/intel/kms_frontbuffer_tracking: consolidate fbc tests skip checks Vinod Govindapillai
2026-04-30  4:35   ` Reddy Guddati, Santhosh
2026-04-30  7:12     ` Govindapillai, Vinod
2026-04-16  9:25 ` [PATCH i-g-t v3 05/11] tests/intel/kms_frontbuffer_tracking: use a bigger buffer for fbc status Vinod Govindapillai
2026-04-30  3:45   ` Reddy Guddati, Santhosh
2026-04-16  9:25 ` [PATCH i-g-t v3 06/11] tests/intel/kms_fbcon_fbt: " Vinod Govindapillai
2026-04-30  3:46   ` Reddy Guddati, Santhosh
2026-04-16  9:25 ` [PATCH i-g-t v3 07/11] tests/intel/kms_fbcon_fbt: update the outdated fbc skip reasons Vinod Govindapillai
2026-04-30  3:56   ` Reddy Guddati, Santhosh
2026-04-30  7:11     ` Govindapillai, Vinod
2026-04-16  9:25 ` [PATCH i-g-t v3 08/11] tests/intel/kms_fbcon_fbt: refactor the code to get the right fbc status Vinod Govindapillai
2026-04-16  9:25 ` [PATCH i-g-t v3 09/11] tests/intel/kms_fbcon_fbt: find and store the crtc index Vinod Govindapillai
2026-04-16  9:25 ` [PATCH i-g-t v3 10/11] tests/intel/kms_fbcon_fbt: find the correct fbc status of a pipe Vinod Govindapillai
2026-04-16  9:25 ` [PATCH i-g-t v3 11/11] tests/intel/kms_fbcon_fbt: use common routine to skip tests on fbc status Vinod Govindapillai
2026-04-30  4:06   ` Reddy Guddati, Santhosh
2026-04-16 16:24 ` ✓ i915.CI.BAT: success for updates to fbc tests (rev3) Patchwork
2026-04-16 16:24 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-16 18:08 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-17  4:43 ` ✗ i915.CI.Full: " 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=20260416092559.88735-3-vinod.govindapillai@intel.com \
    --to=vinod.govindapillai@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=santhosh.reddy.guddati@intel.com \
    --cc=swati2.sharma@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