[PATCH i-g-t 1/4] lib/i915/fbc: print current fbc status if cannot be enabled

Vinod Govindapillai vinod.govindapillai at intel.com
Fri Jun 7 14:57:29 UTC 2024


Print the current fbc status if the fbc is not enabled after
the timeout.

Signed-off-by: Vinod Govindapillai <vinod.govindapillai at intel.com>
---
 lib/i915/intel_fbc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/i915/intel_fbc.c b/lib/i915/intel_fbc.c
index 3fac60087..07ed7f469 100644
--- a/lib/i915/intel_fbc.c
+++ b/lib/i915/intel_fbc.c
@@ -92,6 +92,10 @@ bool intel_fbc_is_enabled(int device, enum pipe pipe, int log_level)
 bool intel_fbc_wait_until_enabled(int device, enum pipe pipe)
 {
 	char last_fbc_buf[FBC_STATUS_BUF_LEN] = {'\0'};
+	bool enabled = igt_wait(_intel_fbc_is_enabled(device, pipe, IGT_LOG_DEBUG, last_fbc_buf), 2000, 1);
 
-	return igt_wait(_intel_fbc_is_enabled(device, pipe, IGT_LOG_DEBUG, last_fbc_buf), 2000, 1);
+	if (!enabled)
+		igt_info("FBC is not enabled: \n%s\n", last_fbc_buf);
+
+	return enabled;
 }
-- 
2.34.1



More information about the igt-dev mailing list