From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= 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 Message-ID: <20140423105456.GH18465@intel.com> References: <1397131692-2857-1-git-send-email-antti.koskipaa@linux.intel.com> <1397131692-2857-3-git-send-email-antti.koskipaa@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id EF76A6E2E0 for ; Wed, 23 Apr 2014 03:54:59 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1397131692-2857-3-git-send-email-antti.koskipaa@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Antti Koskipaa Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org 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 > --- > 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 =3D test_data->data; > + igt_display_t *display =3D &data->display; > + igt_output_t *output =3D test_data->output; > + igt_plane_t *cursor; > + > + cursor =3D 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 =3D test_data->data; > + igt_display_t *display =3D &data->display; > + igt_output_t *output =3D test_data->output; > + igt_plane_t *cursor; > + > + cursor =3D 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, i= nt x, int y) > = > printf("."); fflush(stdout); > = > + cursor_enable(test_data); > cursor =3D 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 =3D test_data->data; > - igt_display_t *display =3D &data->display; > - igt_output_t *output =3D test_data->output; > - igt_plane_t *cursor; > - > - cursor =3D 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 =3D test_data->data; > - igt_display_t *display =3D &data->display; > - igt_output_t *output =3D test_data->output; > - igt_plane_t *cursor; > - > - cursor =3D 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 =3D test_data->top; > int bottom =3D 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 =3D 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=E4l=E4 Intel OTC