From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Antti Koskipaa <antti.koskipaa@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong
Date: Wed, 23 Apr 2014 13:54:56 +0300 [thread overview]
Message-ID: <20140423105456.GH18465@intel.com> (raw)
In-Reply-To: <1397131692-2857-3-git-send-email-antti.koskipaa@linux.intel.com>
On Thu, Apr 10, 2014 at 03:08:06PM +0300, Antti Koskipaa wrote:
> We can't have the hw cursor enabled during software render tests.
>
> Signed-off-by: Antti Koskipaa <antti.koskipaa@linux.intel.com>
> ---
> tests/kms_cursor_crc.c | 54 ++++++++++++++++++++++++--------------------------
> 1 file changed, 26 insertions(+), 28 deletions(-)
>
> diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
> index 52281d0..8802da6 100644
> --- a/tests/kms_cursor_crc.c
> +++ b/tests/kms_cursor_crc.c
> @@ -67,6 +67,30 @@ static void draw_cursor(cairo_t *cr, int x, int y, int w)
> igt_paint_color_alpha(cr, x + w, y + w, w, w, 0.5, 0.5, 0.5, 1.0);
> }
>
> +static void cursor_enable(test_data_t *test_data)
> +{
> + data_t *data = test_data->data;
> + igt_display_t *display = &data->display;
> + igt_output_t *output = test_data->output;
> + igt_plane_t *cursor;
> +
> + cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> + igt_plane_set_fb(cursor, &data->fb);
> + igt_display_commit(display);
> +}
> +
> +static void cursor_disable(test_data_t *test_data)
> +{
> + data_t *data = test_data->data;
> + igt_display_t *display = &data->display;
> + igt_output_t *output = test_data->output;
> + igt_plane_t *cursor;
> +
> + cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> + igt_plane_set_fb(cursor, NULL);
> + igt_display_commit(display);
> +}
> +
> static igt_pipe_crc_t *create_crc(data_t *data, enum pipe pipe)
> {
> igt_pipe_crc_t *crc;
> @@ -85,10 +109,12 @@ static void do_single_test(test_data_t *test_data, int x, int y)
>
> printf("."); fflush(stdout);
>
> + cursor_enable(test_data);
> cursor = igt_output_get_plane(test_data->output, IGT_PLANE_CURSOR);
> igt_plane_set_position(cursor, x, y);
> igt_display_commit(display);
> igt_wait_for_vblank(data->drm_fd, test_data->pipe);
> + cursor_disable(test_data);
>
> igt_pipe_crc_collect_crc(pipe_crc, &crc);
Cursor is getting disabled before we collect the crc:?
> if (test_data->crc_must_match)
> @@ -106,30 +132,6 @@ static void do_test(test_data_t *test_data,
> do_single_test(test_data, left, bottom);
> }
>
> -static void cursor_enable(test_data_t *test_data)
> -{
> - data_t *data = test_data->data;
> - igt_display_t *display = &data->display;
> - igt_output_t *output = test_data->output;
> - igt_plane_t *cursor;
> -
> - cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> - igt_plane_set_fb(cursor, &data->fb);
> - igt_display_commit(display);
> -}
> -
> -static void cursor_disable(test_data_t *test_data)
> -{
> - data_t *data = test_data->data;
> - igt_display_t *display = &data->display;
> - igt_output_t *output = test_data->output;
> - igt_plane_t *cursor;
> -
> - cursor = igt_output_get_plane(output, IGT_PLANE_CURSOR);
> - igt_plane_set_fb(cursor, NULL);
> - igt_display_commit(display);
> -}
> -
> static void test_crc(test_data_t *test_data,
> bool onscreen, int cursor_w, int cursor_h)
> {
> @@ -138,8 +140,6 @@ static void test_crc(test_data_t *test_data,
> int top = test_data->top;
> int bottom = test_data->bottom;
>
> - cursor_enable(test_data);
> -
> if (onscreen) {
> /* cursor onscreen, crc should match, except when white visible cursor is used */
> test_data->crc_must_match = false;
> @@ -183,8 +183,6 @@ static void test_crc(test_data_t *test_data,
> /* go nuts */
> do_test(test_data, INT_MIN, INT_MAX, INT_MIN, INT_MAX);
> }
> -
> - cursor_disable(test_data);
> }
>
> static bool prepare_crtc(test_data_t *test_data, igt_output_t *output,
> --
> 1.8.3.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-04-23 10:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-10 12:08 [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 1/8] kms_cursor_crc: Remove some test cases and change cursor to color Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 2/8] kms_cursor_crc: Move cursor enable and disable calls where they belong Antti Koskipaa
2014-04-23 10:54 ` Ville Syrjälä [this message]
2014-04-10 12:08 ` [PATCH i-g-t v2 3/8] kms_cursor_crc: Use a function pointer to call test Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 4/8] kms_cursor_crc: Separate onscreen and offscreen tests Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 5/8] kms_cursor_crc: Add reference software rendering Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 6/8] kms_cursor_crc: Add moving cursor test Antti Koskipaa
2014-04-10 12:08 ` [PATCH i-g-t v2 7/8] kms_cursor_crc: Add random cursor placement test Antti Koskipaa
2014-04-23 11:04 ` Ville Syrjälä
2014-04-10 12:08 ` [PATCH i-g-t v2 8/8] kms_cursor_crc: Add background picture Antti Koskipaa
2014-04-25 13:27 ` [PATCH i-g-t v2 0/8] kms_cursor_crc enhancements Ville Syrjälä
2014-04-25 14:07 ` 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=20140423105456.GH18465@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=antti.koskipaa@linux.intel.com \
--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.