From: Daniel Vetter <daniel@ffwll.ch>
To: Mika Kahola <mika.kahola@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling
Date: Wed, 16 May 2018 13:36:31 +0200 [thread overview]
Message-ID: <20180516113631.GI3438@phenom.ffwll.local> (raw)
In-Reply-To: <1526380099-14257-1-git-send-email-mika.kahola@intel.com>
On Tue, May 15, 2018 at 01:28:19PM +0300, Mika Kahola wrote:
> Make sure framebuffer compression is disabled when running this test.
Why? Commit message shouldn't just explain what you're doing, but much
more important is why you're doing something.
-Daniel
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
> tests/kms_flip_tiling.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/tests/kms_flip_tiling.c b/tests/kms_flip_tiling.c
> index 5aae29a..8dde5c8 100644
> --- a/tests/kms_flip_tiling.c
> +++ b/tests/kms_flip_tiling.c
> @@ -33,12 +33,23 @@
>
> IGT_TEST_DESCRIPTION("Test page flips and tiling scenarios");
>
> +#define fbc_enable() igt_set_module_param_int("enable_fbc", 1)
> +#define fbc_disable() igt_set_module_param_int("enable_fbc", 0)
> +
> typedef struct {
> int drm_fd;
> igt_display_t display;
> int gen;
> } data_t;
>
> +static bool fbc_is_enabled(int fd)
> +{
> + char buf[128];
> +
> + igt_debugfs_read(fd, "i915_fbc_status", buf);
> + return strstr(buf, "FBC enabled\n");
> +}
> +
> static igt_pipe_crc_t *_pipe_crc;
>
> static igt_pipe_crc_t *pipe_crc_new(data_t *data, int pipe)
> @@ -88,6 +99,10 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t ti
> igt_pipe_crc_t *pipe_crc;
> igt_crc_t reference_crc, crc;
> int fb_id, ret, width;
> + bool fbc_enabled = fbc_is_enabled(data->drm_fd);
> +
> + if (fbc_enabled)
> + fbc_disable();
>
> pipe_crc = pipe_crc_new(data, pipe);
> igt_output_set_pipe(output, pipe);
> @@ -153,6 +168,9 @@ test_flip_tiling(data_t *data, enum pipe pipe, igt_output_t *output, uint64_t ti
>
> igt_remove_fb(data->drm_fd, &fb[0]);
> igt_remove_fb(data->drm_fd, &fb[1]);
> +
> + if (fbc_enabled)
> + fbc_enable();
> }
>
> static data_t data;
> --
> 2.7.4
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2018-05-16 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-15 10:28 [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling Mika Kahola
2018-05-15 12:59 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip_tiling Patchwork
2018-05-15 21:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2018-05-16 11:36 ` Daniel Vetter [this message]
2018-05-16 11:45 ` [igt-dev] [PATCH CI_TEST] tests/kms_flip_tiling Arkadiusz Hiler
2018-05-16 12:48 ` Mika Kahola
-- strict thread matches above, loose matches on Subject: below --
2018-05-16 11:57 Mika Kahola
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=20180516113631.GI3438@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
--cc=mika.kahola@intel.com \
/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