[PATCH i-g-t 3/4] tests/intel/kms_frontbuffer_tracking: use intel_fbc_get_fbc_status()

Vinod Govindapillai
2026-03-26T07:27:00Z

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 | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)

diff --git a/tests/intel/kms_frontbuffer_tracking.c b/tests/intel/kms_frontbuffer_tracking.c
index e764c9ce1..ef083fe60 100644
--- a/tests/intel/kms_frontbuffer_tracking.c
+++ b/tests/intel/kms_frontbuffer_tracking.c
@@ -1574,8 +1574,8 @@ static struct timespec fbc_get_last_action(void)
char *action;
ssize_t n_read;

+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));

- debugfs_read_crtc("i915_fbc_status", buf);
action = strstr(buf, "\nLast action:");
igt_assert(action);

@@ -1623,8 +1623,8 @@ static void fbc_setup_last_action(void)
char buf[128];
char *action;

+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));

- debugfs_read_crtc("i915_fbc_status", buf);
action = strstr(buf, "\nLast action:");
if (!action) {
igt_info("FBC last action not supported\n");
@@ -1642,7 +1642,8 @@ static bool fbc_is_compressing(void)
{
char buf[128];

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(buf, "\nCompressing: yes\n") != NULL;
}

@@ -1655,7 +1656,8 @@ static bool fbc_not_enough_stolen(void)
{
char buf[128];

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(buf, "FBC disabled: not enough stolen memory\n");
}

@@ -1663,7 +1665,8 @@ static bool fbc_stride_not_supported(void)
{
char buf[128];

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(buf, "FBC disabled: stride not supported\n");
}

@@ -1671,7 +1674,8 @@ static bool fbc_plane_size_too_big(void)
{
char buf[128];

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(buf, "FBC disabled: plane size too big\n");
}

@@ -1679,7 +1683,8 @@ static bool fbc_surface_size_too_big(void)
{
char buf[128];

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(buf, "FBC disabled: surface size too big\n");
}

@@ -1687,7 +1692,8 @@ static bool fbc_psr_not_possible(void)
{
char buf[128];

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(buf, "FBC disabled: PSR1 enabled (Wa_14016291713)");
}

@@ -1698,7 +1704,8 @@ static bool fbc_enable_per_plane(int plane_index, igt_crtc_t *crtc)

sprintf(buf_plane, "%d%s", plane_index, igt_crtc_name(crtc));

- debugfs_read_crtc("i915_fbc_status", buf);
+ intel_fbc_get_fbc_status(prim_mode_params.crtc, buf, sizeof(buf));
+
return strstr(strstr(buf, "*"), buf_plane);
}

--
2.43.0