From: Damien Lespiau <damien.lespiau@intel.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] lib: make igt_pipe_crc_start never fail
Date: Fri, 6 Dec 2013 12:52:34 +0000 [thread overview]
Message-ID: <20131206125234.GA16277@strange.amr.corp.intel.com> (raw)
In-Reply-To: <1386323324-19196-3-git-send-email-daniel.vetter@ffwll.ch>
On Fri, Dec 06, 2013 at 10:48:44AM +0100, Daniel Vetter wrote:
> It's what callers expect - pipe_crc_new is the function where
> we pass a potential failure back to callers.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Oh, yes, initially ono had to specify the point at _start() time, but I
moved it to _new() mid-development and forgot to remove the return
value.
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> lib/igt_debugfs.c | 7 ++-----
> lib/igt_debugfs.h | 2 +-
> tests/kms_pipe_crc_basic.c | 2 +-
> 3 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
> index 139be893f75b..4b96521331af 100644
> --- a/lib/igt_debugfs.c
> +++ b/lib/igt_debugfs.c
> @@ -269,12 +269,11 @@ void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc)
> free(pipe_crc);
> }
>
> -bool igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
> +void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
> {
> igt_crc_t *crcs = NULL;
>
> - if (!igt_pipe_crc_do_start(pipe_crc))
> - return false;
> + igt_assert(igt_pipe_crc_do_start(pipe_crc));
>
> /*
> * For some no yet identified reason, the first CRC is bonkers. So
> @@ -282,8 +281,6 @@ bool igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
> */
> igt_pipe_crc_get_crcs(pipe_crc, 1, &crcs);
> free(crcs);
> -
> - return true;
> }
>
> void igt_pipe_crc_stop(igt_pipe_crc_t *pipe_crc)
> diff --git a/lib/igt_debugfs.h b/lib/igt_debugfs.h
> index 393b5767adbe..075e44625213 100644
> --- a/lib/igt_debugfs.h
> +++ b/lib/igt_debugfs.h
> @@ -75,7 +75,7 @@ igt_pipe_crc_t *
> igt_pipe_crc_new(igt_debugfs_t *debugfs, int drm_fd, enum pipe pipe,
> enum intel_pipe_crc_source source);
> void igt_pipe_crc_free(igt_pipe_crc_t *pipe_crc);
> -bool igt_pipe_crc_start(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);
> void igt_pipe_crc_get_crcs(igt_pipe_crc_t *pipe_crc, int n_crcs,
> igt_crc_t **out_crcs);
> diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
> index 90d9b9404877..3fc59344d90d 100644
> --- a/tests/kms_pipe_crc_basic.c
> +++ b/tests/kms_pipe_crc_basic.c
> @@ -180,7 +180,7 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
> continue;
> valid_connectors++;
>
> - igt_assert(igt_pipe_crc_start(pipe_crc));
> + igt_pipe_crc_start(pipe_crc);
>
> /* wait for 3 vblanks and the corresponding 3 CRCs */
> igt_pipe_crc_get_crcs(pipe_crc, 3, &crcs);
> --
> 1.8.4.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2013-12-06 12:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-06 9:48 [PATCH 1/3] tests: drm_open_any doesn't fail Daniel Vetter
2013-12-06 9:48 ` [PATCH 2/3] lib: add igt_pipe_crc_check Daniel Vetter
2013-12-06 12:56 ` Damien Lespiau
2013-12-06 9:48 ` [PATCH 3/3] lib: make igt_pipe_crc_start never fail Daniel Vetter
2013-12-06 12:52 ` Damien Lespiau [this message]
2013-12-06 12:58 ` [PATCH 1/3] tests: drm_open_any doesn't fail Damien Lespiau
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=20131206125234.GA16277@strange.amr.corp.intel.com \
--to=damien.lespiau@intel.com \
--cc=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox