summaryrefslogtreecommitdiff
path: root/tests/kms_atomic.c
diff options
context:
space:
mode:
authorLiu Ying <gnuiyl@gmail.com>2016-09-12 15:11:53 +0800
committerTomeu Vizoso <tomeu.vizoso@collabora.com>2016-09-26 17:12:09 +0200
commitb7096c690142474647d79071d0c3c978bed69a29 (patch)
treeeb885b976ce4179c0e69aadbe5dae48570ed1783 /tests/kms_atomic.c
parent8e4ce75542a958ed62dcc5f1f80d92767e0187c8 (diff)
kms_atomic: Expose atomic commit flags to crtc_commit_atomic()
This patch exposes atomic commit flags to crtc_commit_atomic() so that users of the macro may control the flags. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Marius Vlad <marius.c.vlad@intel.com> Cc: Micah Fedke <micah.fedke@collabora.com> Cc: Daniel Stone <daniels@collabora.com> Signed-off-by: Liu Ying <gnuiyl@gmail.com>
Diffstat (limited to 'tests/kms_atomic.c')
-rw-r--r--tests/kms_atomic.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/kms_atomic.c b/tests/kms_atomic.c
index f27ee46b..bc6e5757 100644
--- a/tests/kms_atomic.c
+++ b/tests/kms_atomic.c
@@ -234,11 +234,11 @@ static uint32_t blob_duplicate(int fd, uint32_t id_orig)
igt_assert_eq(errno, err); \
}
-#define crtc_commit_atomic(crtc, plane, req, relax) { \
+#define crtc_commit_atomic(crtc, plane, req, relax, flags) { \
drmModeAtomicSetCursor(req, 0); \
crtc_populate_req(crtc, req); \
plane_populate_req(plane, req); \
- do_atomic_commit((crtc)->state->desc->fd, req, 0); \
+ do_atomic_commit((crtc)->state->desc->fd, req, flags); \
crtc_check_current_state(crtc, plane, relax); \
plane_check_current_state(plane, relax); \
}
@@ -928,10 +928,10 @@ static void plane_primary(struct kms_atomic_crtc_state *crtc,
/* Flip the primary plane using the atomic API, and double-check
* state is what we think it should be. */
- crtc_commit_atomic(crtc, &plane, req, ATOMIC_RELAX_NONE);
+ crtc_commit_atomic(crtc, &plane, req, ATOMIC_RELAX_NONE, 0);
/* Restore the primary plane and check the state matches the old. */
- crtc_commit_atomic(crtc, plane_old, req, ATOMIC_RELAX_NONE);
+ crtc_commit_atomic(crtc, plane_old, req, ATOMIC_RELAX_NONE, 0);
/* Re-enable the plane through the legacy CRTC/primary-plane API, and
* verify through atomic. */
@@ -942,7 +942,7 @@ static void plane_primary(struct kms_atomic_crtc_state *crtc,
crtc_commit_legacy(crtc, plane_old, CRTC_RELAX_MODE);
/* Finally, restore to the original state. */
- crtc_commit_atomic(crtc, plane_old, req, ATOMIC_RELAX_NONE);
+ crtc_commit_atomic(crtc, plane_old, req, ATOMIC_RELAX_NONE, 0);
drmModeAtomicFree(req);
}
@@ -1117,7 +1117,7 @@ static void crtc_invalid_params(struct kms_atomic_crtc_state *crtc_old,
ATOMIC_RELAX_NONE, EINVAL);
crtc.mode.id = crtc_old->mode.id;
- crtc_commit_atomic(&crtc, plane, req, ATOMIC_RELAX_NONE);
+ crtc_commit_atomic(&crtc, plane, req, ATOMIC_RELAX_NONE, 0);
/* Create a blob which is the wrong size to be a valid mode. */
do_or_die(drmModeCreatePropertyBlob(crtc.state->desc->fd,
@@ -1136,7 +1136,7 @@ static void crtc_invalid_params(struct kms_atomic_crtc_state *crtc_old,
ATOMIC_RELAX_NONE, EINVAL);
/* Restore the CRTC and check the state matches the old. */
- crtc_commit_atomic(crtc_old, plane, req, ATOMIC_RELAX_NONE);
+ crtc_commit_atomic(crtc_old, plane, req, ATOMIC_RELAX_NONE, 0);
drmModeAtomicFree(req);
}