diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-12 11:23:09 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-12 19:36:53 +0200 |
commit | 33f0884f3c711551a89483e438a6cf18af8ab25e (patch) | |
tree | 6fbf6f0f54175cc8ddb9d87b50860f381c637fd4 /lib | |
parent | 9a15b5a5e2cb0ab34c0e11dc53a183919664157f (diff) | |
download | intel-gpu-tools-33f0884f3c711551a89483e438a6cf18af8ab25e.tar.gz intel-gpu-tools-33f0884f3c711551a89483e438a6cf18af8ab25e.tar.bz2 intel-gpu-tools-33f0884f3c711551a89483e438a6cf18af8ab25e.zip |
lib/igt_kms: set_vt_graphics_mode is a low-level helper
So give it a kmstest_ prefix and shuffle it around a bit.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/igt_kms.c | 14 | ||||
-rw-r--r-- | lib/igt_kms.h | 9 |
2 files changed, 15 insertions, 8 deletions
diff --git a/lib/igt_kms.c b/lib/igt_kms.c index fec859c0..e28d7a82 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -287,12 +287,16 @@ static void restore_vt_mode_at_exit(int sig) set_vt_mode(orig_vt_mode); } -/* - * Set the VT to graphics mode and install an exit handler to restore the - * original mode. +/** + * kmstest_set_vt_graphics_mode: + * + * Sets the controlling VT (if available) into graphics/raw mode and installs an + * igt exit handler to set the VT back to text mode on exit. + * + * All kms tests must call this function to make sure that the fbcon doesn't + * interfere by e.g. blanking the screen. */ - -void igt_set_vt_graphics_mode(void) +void kmstest_set_vt_graphics_mode(void) { long ret; diff --git a/lib/igt_kms.h b/lib/igt_kms.h index 342208a5..09f15455 100644 --- a/lib/igt_kms.h +++ b/lib/igt_kms.h @@ -36,6 +36,8 @@ #include "igt_fb.h" +/* Low-level helpers with kmstest_ prefix */ + enum pipe { PIPE_A = 0, PIPE_B, @@ -163,6 +165,10 @@ void kmstest_unset_all_crtcs(int drm_fd, drmModeResPtr resources); * A small modeset API */ +/* set vt into graphics mode, required to prevent fbcon from interfering */ +void kmstest_set_vt_graphics_mode(void); + +/* High-level kms api with igt_ prefix */ enum igt_commit_style { COMMIT_LEGACY = 0, COMMIT_UNIVERSAL, @@ -239,9 +245,6 @@ struct igt_display { bool has_universal_planes; }; -/* set vt into graphics mode, required to prevent fbcon from interfering */ -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); |