summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_kms.c32
-rw-r--r--lib/igt_kms.h7
2 files changed, 38 insertions, 1 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c
index 3f561e9a..064b741c 100644
--- a/lib/igt_kms.c
+++ b/lib/igt_kms.c
@@ -946,7 +946,21 @@ static int igt_output_commit(igt_output_t *output)
return 0;
}
-int igt_display_commit(igt_display_t *display)
+/**
+ * igt_display_commit2:
+ * @display: DRM device handle
+ * @s: Commit style
+ *
+ * Commits framebuffer and positioning changes to all planes of each display
+ * pipe, using a specific API to perform the programming. This function should
+ * be used to exercise a specific driver programming API; igt_display_commit
+ * should be used instead if the API used is unimportant to the test being run.
+ *
+ * Returns: 0 upon success. This function will never return upon failure
+ * since igt_fail() at lower levels will longjmp out of it.
+ */
+int igt_display_commit2(igt_display_t *display,
+ enum igt_commit_style s)
{
int i;
@@ -971,6 +985,22 @@ int igt_display_commit(igt_display_t *display)
return 0;
}
+/**
+ * igt_display_commit:
+ * @display: DRM device handle
+ * @s: Commit style
+ *
+ * Commits framebuffer and positioning changes to all planes of each display
+ * pipe.
+ *
+ * Returns: 0 upon success. This function will never return upon failure
+ * since igt_fail() at lower levels will longjmp out of it.
+ */
+int igt_display_commit(igt_display_t *display)
+{
+ return igt_display_commit2(display, COMMIT_LEGACY);
+}
+
const char *igt_output_name(igt_output_t *output)
{
return output->name;
diff --git a/lib/igt_kms.h b/lib/igt_kms.h
index a9a42368..62dc73c5 100644
--- a/lib/igt_kms.h
+++ b/lib/igt_kms.h
@@ -65,6 +65,12 @@ enum port {
};
#define port_name(p) ((p) + 'A')
+enum igt_commit_style {
+ COMMIT_LEGACY = 0,
+ COMMIT_UNIVERSAL,
+ /* We'll add atomic here eventually. */
+};
+
#include "igt_fb.h"
struct kmstest_connector_config {
@@ -150,6 +156,7 @@ void igt_set_vt_graphics_mode(void);
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_get_n_pipes(igt_display_t *display);