From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation: align rendered image correctly for rotation
Date: Fri, 11 Jan 2019 16:31:08 +0200 [thread overview]
Message-ID: <20190111143108.GA20097@intel.com> (raw)
In-Reply-To: <1545989391-17050-1-git-send-email-juhapekka.heikkila@gmail.com>
On Fri, Dec 28, 2018 at 11:29:50AM +0200, Juha-Pekka Heikkila wrote:
> rendered test image had off-by-one error in size calculation
> which was failing some tests on certain resolutions and plane
> sizes.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> tests/kms_rotation_crc.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c
> index c67f608..796115a 100644
> --- a/tests/kms_rotation_crc.c
> +++ b/tests/kms_rotation_crc.c
> @@ -126,6 +126,9 @@ paint_squares(data_t *data, igt_rotation_t rotation,
> unsigned int h = fb->height;
> rgb_color_t tl, tr, bl, br;
>
> + igt_assert_f(!(w&1), "rotation image must be even width, now attempted %d\n", w);
> + igt_assert_f(!(h&1), "rotation image must be even height, now attempted %d\n", h);
> +
> cr = igt_get_cairo_ctx(data->gfx_fd, fb);
>
> set_color(&tl, o, 0.0f, 0.0f);
> @@ -439,8 +442,12 @@ static void get_multiplane_crc(data_t *data, igt_output_t *output,
> planes[c].plane = igt_output_get_plane_type(output,
> planeinfo[c].planetype);
>
> - w = planeinfo[c].width;
> - h = planeinfo[c].height;
> + /*
> + * make plane and fb width and height always even due to
> + * test image rendering
> + */
> + w = planeinfo[c].width & ~1;
> + h = planeinfo[c].height & ~1;
>
> if (planeinfo[c].rotation_sw & (IGT_ROTATION_90 | IGT_ROTATION_270))
> igt_swap(w, h);
> --
> 2.7.4
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-01-11 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-28 9:29 [igt-dev] [PATCH i-g-t 1/2] tests/kms_rotation: align rendered image correctly for rotation Juha-Pekka Heikkila
2018-12-28 9:29 ` [igt-dev] [PATCH i-g-t 2/2] tests/kms_rotation_crc: add NV12 support for multiplane* tests Juha-Pekka Heikkila
2019-01-11 14:35 ` Ville Syrjälä
2019-01-15 16:28 ` Ville Syrjälä
2018-12-28 10:00 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_rotation: align rendered image correctly for rotation Patchwork
2018-12-28 11:12 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-01-11 14:31 ` Ville Syrjälä [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-21 14:05 [igt-dev] [PATCH i-g-t 1/2] " Juha-Pekka Heikkila
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=20190111143108.GA20097@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=juhapekka.heikkila@gmail.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