lib/kms: Add igt_display_try_commit2()

Add a new public API that will attempt a display commit, but will return
an error code upon failure rather than failing the IGT test.  This is
intended to allow igt tests to verify that the expected error codes are
returned to userspace when invalid requests are issued.

Note that with non-atomic programming, a single commit operation has
several potential failure points internally; the first non-zero error
code encountered will be returned immediately and no further programming
will be performed by the commit.  It is the caller's responsibility to
return to a sane state.

Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
This commit is contained in:
Matt Roper
2014-06-30 16:44:25 -07:00
committed by Damien Lespiau
parent 1c25547d48
commit 82bc03f392
2 changed files with 97 additions and 38 deletions
+1
View File
@@ -158,6 +158,7 @@ void igt_display_init(igt_display_t *display, int drm_fd);
void igt_display_fini(igt_display_t *display);
int igt_display_commit2(igt_display_t *display, enum igt_commit_style s);
int igt_display_commit(igt_display_t *display);
int igt_display_try_commit2(igt_display_t *display, enum igt_commit_style s);
int igt_display_get_n_pipes(igt_display_t *display);
const char *igt_output_name(igt_output_t *output);