diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-21 14:47:35 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-21 21:30:30 +0000 |
commit | 9cc545e1d90b36fcce2eeed1235f0b19b764b508 (patch) | |
tree | 1ec97af491d8c347b735e2dff26e12396c4b2f79 /tests | |
parent | 960e55a87d7b7d7385063e37cc9f281df2be8037 (diff) |
igt/kms_fbcon_fbt: Handle ENODEV when checking i915_fbc_info for chipset support
If the machine doesn't support FBC, it will return -ENODEV from
i915_fbc_info, which we want to interpret as unsupported.
Reported-by: Marta Lofstedt<marta.lofstedt@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Marta Lofstedt<marta.lofstedt@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_fbcon_fbt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c index 51f11728..1b236f8b 100644 --- a/tests/kms_fbcon_fbt.c +++ b/tests/kms_fbcon_fbt.c @@ -87,6 +87,9 @@ static bool fbc_supported_on_chipset(int fd) char buf[128]; igt_debugfs_read(fd, "i915_fbc_status", buf); + if (*buf == '\0') /* !HAS_FBC -> -ENODEV*/ + return false; + return !strstr(buf, "FBC unsupported on this chipset\n"); } |