All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 1/3] lib/igt_debugfs: s/igt_pipe_crc_check/igt_require_pipe_crc/
Date: Sun, 16 Mar 2014 20:09:58 +0100	[thread overview]
Message-ID: <1394997000-3022-1-git-send-email-daniel.vetter@ffwll.ch> (raw)

Functions which provide feature checks through igt_skip should be of
the form <prefix>_require_<feature>.

Otoh feature checks which return in a boolean whether the feature is
available should be of the form <prefix>_has_<feature>, e.g.
gem_has_blt.

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 lib/igt_debugfs.c          | 4 ++--
 lib/igt_debugfs.h          | 2 +-
 tests/kms_cursor_crc.c     | 2 +-
 tests/kms_fbc_crc.c        | 2 +-
 tests/kms_pipe_crc_basic.c | 2 +-
 tests/kms_plane.c          | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index fe3ec3a55a7d..1879dcd5cbfa 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -320,13 +320,13 @@ static void pipe_crc_exit_handler(int sig)
 }
 
 /**
- * igt_pipe_crc_check:
+ * igt_require_pipe_crc:
  *
  * Convenience helper to check whether pipe CRC capturing is supported by the
  * kernel. Uses igt_skip to automatically skip the test/subtest if this isn't
  * the case.
  */
-void igt_pipe_crc_check(void)
+void igt_require_pipe_crc(void)
 {
 	const char *cmd = "pipe A none";
 	FILE *ctl;
diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
index 1618d8e4e833..d3d23896b50c 100644
--- a/lib/igt_debugfs.h
+++ b/lib/igt_debugfs.h
@@ -89,7 +89,7 @@ bool igt_crc_is_null(igt_crc_t *crc);
 bool igt_crc_equal(igt_crc_t *a, igt_crc_t *b);
 char *igt_crc_to_string(igt_crc_t *crc);
 
-void igt_pipe_crc_check(void);
+void igt_require_pipe_crc(void);
 igt_pipe_crc_t *
 igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source);
 void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index 61eb1c237d68..704eac2ee359 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -316,7 +316,7 @@ igt_main
 
 		igt_set_vt_graphics_mode();
 
-		igt_pipe_crc_check();
+		igt_require_pipe_crc();
 
 		igt_display_init(&data.display, data.drm_fd);
 		data.pipe_crc = calloc(igt_display_get_n_pipes(&data.display),
diff --git a/tests/kms_fbc_crc.c b/tests/kms_fbc_crc.c
index 405d9bd69780..2f1b90d28e18 100644
--- a/tests/kms_fbc_crc.c
+++ b/tests/kms_fbc_crc.c
@@ -491,7 +491,7 @@ igt_main
 
 		data.devid = intel_get_drm_devid(data.drm_fd);
 
-		igt_pipe_crc_check();
+		igt_require_pipe_crc();
 
 		status = igt_debugfs_fopen("i915_fbc_status", "r");
 		igt_require_f(status, "No i915_fbc_status found\n");
diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index 6b8ff116474e..75217df4f5e1 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -137,7 +137,7 @@ igt_main
 
 		igt_set_vt_graphics_mode();
 
-		igt_pipe_crc_check();
+		igt_require_pipe_crc();
 
 		igt_display_init(&data.display, data.drm_fd);
 	}
diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 09def232669e..223f0a772021 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -229,7 +229,7 @@ igt_main
 
 		igt_set_vt_graphics_mode();
 
-		igt_pipe_crc_check();
+		igt_require_pipe_crc();
 		igt_display_init(&data.display, data.drm_fd);
 	}
 
-- 
1.8.1.4

             reply	other threads:[~2014-03-16 19:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-16 19:09 Daniel Vetter [this message]
2014-03-16 19:09 ` [PATCH 2/3] lib/igt_core: Small api doc fix Daniel Vetter
2014-03-16 19:10 ` [PATCH 3/3] lib/igt_core: Document library design best practices Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394997000-3022-1-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.