summaryrefslogtreecommitdiff
path: root/tests/kms_fbcon_fbt.c
diff options
context:
space:
mode:
authorGabriel Krisman Bertazi <krisman@collabora.co.uk>2017-10-30 15:54:53 -0200
committerPaulo Zanoni <paulo.r.zanoni@intel.com>2017-11-06 17:34:13 -0200
commit9fe5a9a3de9e2ce345d5967a1e10a9a586b19836 (patch)
tree7d63ffa712e0b090a00c39bb9fe8c50eecf411c8 /tests/kms_fbcon_fbt.c
parentbde7d72f58df18f86127b5b7fdcb89b64ee1a1d2 (diff)
tests/kms_fbcon_fbt: Report fbc_status on error
knowing the assertion triggered on wait_until_enabled() is not that useful without knowing what exactly caused the failure. It might be an user error, like too little stolen memory by the bios, or an actual issue in the kernel. So, let's make life easier, particularly for the CI, by printing the status before failing out. Case in point: Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101718 v2: Small typo. Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.co.uk> Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Diffstat (limited to 'tests/kms_fbcon_fbt.c')
-rw-r--r--tests/kms_fbcon_fbt.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
index d0090912..51f11728 100644
--- a/tests/kms_fbcon_fbt.c
+++ b/tests/kms_fbcon_fbt.c
@@ -95,6 +95,14 @@ static bool connector_can_fbc(drmModeConnectorPtr connector)
return true;
}
+static void fbc_print_status(int fd)
+{
+ static char buf[128];
+
+ igt_debugfs_read(fd, "i915_fbc_status", buf);
+ igt_debug("FBC status: %s\n", buf);
+}
+
static bool fbc_is_enabled(int fd)
{
char buf[128];
@@ -105,7 +113,9 @@ static bool fbc_is_enabled(int fd)
static bool fbc_wait_until_enabled(int fd)
{
- return igt_wait(fbc_is_enabled(fd), 5000, 1);
+ bool r = igt_wait(fbc_is_enabled(fd), 5000, 1);
+ fbc_print_status(fd);
+ return r;
}
typedef bool (*connector_possible_fn)(drmModeConnectorPtr connector);
@@ -160,6 +170,14 @@ static bool connector_can_psr(drmModeConnectorPtr connector)
return (connector->connector_type == DRM_MODE_CONNECTOR_eDP);
}
+static void psr_print_status(int fd)
+{
+ static char buf[256];
+
+ igt_debugfs_read(fd, "i915_edp_psr_status", buf);
+ igt_debug("PSR status: %s\n", buf);
+}
+
static bool psr_is_enabled(int fd)
{
char buf[256];
@@ -170,7 +188,9 @@ static bool psr_is_enabled(int fd)
static bool psr_wait_until_enabled(int fd)
{
- return igt_wait(psr_is_enabled(fd), 5000, 1);
+ bool r = igt_wait(psr_is_enabled(fd), 5000, 1);
+ psr_print_status(fd);
+ return r;
}
struct feature {