From patchwork Sun Mar 16 14:02:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 3839251 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7EDE8BF540 for ; Sun, 16 Mar 2014 14:24:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7BEDC202D1 for ; Sun, 16 Mar 2014 14:24:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7199120270 for ; Sun, 16 Mar 2014 14:24:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 109E6896FF; Sun, 16 Mar 2014 07:24:25 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by gabe.freedesktop.org (Postfix) with ESMTP id 4757B8961D for ; Sun, 16 Mar 2014 07:24:21 -0700 (PDT) Received: by mail-ee0-f52.google.com with SMTP id e49so3149511eek.39 for ; Sun, 16 Mar 2014 07:24:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=6LRnyXyLrI0iVtc2OdC/5tsPVmu3eA21LzA5Dhp90MQ=; b=DvaTm9ZuPtkuX07EtZWKo8ukrgCM6+5JI3tyxTd5tdIjbRYF3o4ma3b/5kwCYww0/4 XTAJizmh2FfFt3kFKowfRqE7/uZT1yIFh8nfE6KmXNHz/pp2g0wQTRdvGz+JBOeY/Mtc YYUVaDaiTugWui8H1Rur7W/Yh/HrnG6ZdM7Kc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=6LRnyXyLrI0iVtc2OdC/5tsPVmu3eA21LzA5Dhp90MQ=; b=QyJq928KhnqPUHFxa0jcdKzNOUai6wN4GLJbTuOlNXqlSkZyyxyP16V1KC/nTD8Bmj jjs7UZnGq17tVCB4NoNTgmXHlFCsusSaZyqCuA5vvDrGjmemUHyJkVicsVN8MkB+eG9k /4Da9f13elmc75jfxMUqVfOLMbcmOFRi2BmxnQZKSyxye1I8yWdkdy0i2J6UW6Ck2fa+ BQIdjNeAW666hHntk++gUY1E2Y+u801vZglsRroaBknm/lgUp3mn+DjPQ5ra85Sywxyw D/LpxIhFkb4xxAwO3leo9fNyG1dC9HaSmS1YK9bFJ2a2nVUacX1IsNTWwyC/fLPdyd75 /UlQ== X-Gm-Message-State: ALoCoQlFr3vaR/9a6NCeh3SCHn5frfFUODwL6BjW1N4lskaODmDKwmhk/7gm0LQLtZO1XJvbbaNz X-Received: by 10.14.194.133 with SMTP id m5mr18890424een.38.1394979860543; Sun, 16 Mar 2014 07:24:20 -0700 (PDT) Received: from wespe.ffwll.local (84-73-67-144.dclient.hispeed.ch. [84.73.67.144]) by mx.google.com with ESMTPSA id 46sm32481433ees.4.2014.03.16.07.24.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Mar 2014 07:24:19 -0700 (PDT) From: Daniel Vetter To: Intel Graphics Development Date: Sun, 16 Mar 2014 15:02:27 +0100 Message-Id: <1394978548-26478-4-git-send-email-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1394978548-26478-1-git-send-email-daniel.vetter@ffwll.ch> References: <1394978548-26478-1-git-send-email-daniel.vetter@ffwll.ch> Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 4/5] lib/igt_debugfs: Remove debugfs from pipe crc functions X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All tests have now lost explicit references to igt_debugfs_t! Signed-off-by: Daniel Vetter --- lib/igt_debugfs.c | 7 ++----- lib/igt_debugfs.h | 5 ++--- tests/kms_cursor_crc.c | 7 ++----- tests/kms_fbc_crc.c | 7 ++----- tests/kms_pipe_crc_basic.c | 7 ++----- tests/kms_plane.c | 7 ++----- 6 files changed, 12 insertions(+), 28 deletions(-) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 16d4ffcf4b10..90a57b692643 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -327,13 +327,12 @@ static void pipe_crc_exit_handler(int sig) /** * igt_pipe_crc_check: - * @debugfs: debugfs access structure * * 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(igt_debugfs_t *debugfs) +void igt_pipe_crc_check(void) { const char *cmd = "pipe A none"; FILE *ctl; @@ -353,7 +352,6 @@ void igt_pipe_crc_check(igt_debugfs_t *debugfs) /** * igt_pipe_crc_new: - * @debugfs: debugfs access structure * @pipe: display pipe to use as source * @source: CRC tap point to use as source * @@ -364,8 +362,7 @@ void igt_pipe_crc_check(igt_debugfs_t *debugfs) * specific pipe CRC source to function properly. */ igt_pipe_crc_t * -igt_pipe_crc_new(igt_debugfs_t *debugfs, enum pipe pipe, - enum intel_pipe_crc_source source) +igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source) { igt_pipe_crc_t *pipe_crc; char buf[128]; diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h index 6e9cec2b5018..c207e019b193 100644 --- a/lib/igt_debugfs.h +++ b/lib/igt_debugfs.h @@ -100,10 +100,9 @@ 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(igt_debugfs_t *debugfs); +void igt_pipe_crc_check(void); igt_pipe_crc_t * -igt_pipe_crc_new(igt_debugfs_t *debugfs, enum pipe pipe, - enum intel_pipe_crc_source source); +igt_pipe_crc_new(enum pipe pipe, enum intel_pipe_crc_source source); void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc); void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc); diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c index 0b38a7ce7406..61eb1c237d68 100644 --- a/tests/kms_cursor_crc.c +++ b/tests/kms_cursor_crc.c @@ -42,7 +42,6 @@ enum cursor_type { typedef struct { int drm_fd; - igt_debugfs_t debugfs; igt_display_t display; struct kmstest_fb primary_fb; struct kmstest_fb fb[NUM_CURSOR_TYPES]; @@ -63,8 +62,7 @@ static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe) { igt_pipe_crc_t *crc; - crc = igt_pipe_crc_new(&data->debugfs, pipe, - INTEL_PIPE_CRC_SOURCE_AUTO); + crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); return crc; } @@ -318,8 +316,7 @@ igt_main igt_set_vt_graphics_mode(); - igt_debugfs_init(&data.debugfs); - igt_pipe_crc_check(&data.debugfs); + igt_pipe_crc_check(); 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 fce3863dc9d7..405d9bd69780 100644 --- a/tests/kms_fbc_crc.c +++ b/tests/kms_fbc_crc.c @@ -56,7 +56,6 @@ typedef struct { typedef struct { int drm_fd; - igt_debugfs_t debugfs; drmModeRes *resources; igt_crc_t ref_crc[2]; igt_pipe_crc_t **pipe_crc; @@ -353,8 +352,7 @@ static bool prepare_crtc(data_t *data, uint32_t connector_id, enum test_mode mod igt_pipe_crc_free(data->pipe_crc[data->crtc_idx]); data->pipe_crc[data->crtc_idx] = NULL; - pipe_crc = igt_pipe_crc_new(&data->debugfs, - data->crtc_idx, + pipe_crc = igt_pipe_crc_new(data->crtc_idx, INTEL_PIPE_CRC_SOURCE_AUTO); if (!pipe_crc) { printf("auto crc not supported on this connector with crtc %i\n", @@ -493,8 +491,7 @@ igt_main data.devid = intel_get_drm_devid(data.drm_fd); - igt_debugfs_init(&data.debugfs); - igt_pipe_crc_check(&data.debugfs); + igt_pipe_crc_check(); 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 da5597368f29..6b8ff116474e 100644 --- a/tests/kms_pipe_crc_basic.c +++ b/tests/kms_pipe_crc_basic.c @@ -33,7 +33,6 @@ typedef struct { int drm_fd; - igt_debugfs_t debugfs; igt_display_t display; struct kmstest_fb fb; } data_t; @@ -88,8 +87,7 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags) igt_display_commit(display); - pipe_crc = igt_pipe_crc_new(&data->debugfs, - pipe, INTEL_PIPE_CRC_SOURCE_AUTO); + pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); if (!pipe_crc) continue; @@ -139,8 +137,7 @@ igt_main igt_set_vt_graphics_mode(); - igt_debugfs_init(&data.debugfs); - igt_pipe_crc_check(&data.debugfs); + igt_pipe_crc_check(); igt_display_init(&data.display, data.drm_fd); } diff --git a/tests/kms_plane.c b/tests/kms_plane.c index 6c7275a8eb3c..09def232669e 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -35,7 +35,6 @@ typedef struct { int drm_fd; - igt_debugfs_t debugfs; igt_display_t display; } data_t; @@ -92,8 +91,7 @@ test_position_init(test_position_t *test, igt_output_t *output, enum pipe pipe) drmModeModeInfo *mode; igt_plane_t *primary; - test->pipe_crc = igt_pipe_crc_new(&data->debugfs, - pipe, INTEL_PIPE_CRC_SOURCE_AUTO); + test->pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO); igt_output_set_pipe(output, pipe); primary = igt_output_get_plane(output, 0); @@ -231,8 +229,7 @@ igt_main igt_set_vt_graphics_mode(); - igt_debugfs_init(&data.debugfs); - igt_pipe_crc_check(&data.debugfs); + igt_pipe_crc_check(); igt_display_init(&data.display, data.drm_fd); }