From: "Kahola, Mika" <mika.kahola@intel.com>
To: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>,
"igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane: fix rounding error
Date: Fri, 18 Jun 2021 08:19:40 +0000 [thread overview]
Message-ID: <608f458c5e4040b3833ac3247f2760e3@intel.com> (raw)
In-Reply-To: <20210615160022.31610-3-juhapekka.heikkila@gmail.com>
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Juha-
> Pekka Heikkila
> Sent: Tuesday, June 15, 2021 7:00 PM
> To: igt-dev@lists.freedesktop.org
> Subject: [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane: fix rounding error
>
> On some screen sizes with legacy hw there was possible to get rounding
> error on source clamping test which would incorrectly fail clamping tests.
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Looks solid.
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
> ---
> tests/kms_plane.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c index
> ba419bbde..f22c045d8 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -473,12 +473,19 @@ static void draw_entire_color_array(data_t *data,
> cairo_t *cr, uint32_t format,
> const int color_amount = ARRAY_SIZE(colors_extended);
> const int x = format == DRM_FORMAT_XRGB8888 ? 0 : data->crop;
>
> + if (format != DRM_FORMAT_XRGB8888) {
> + cairo_rectangle(cr, data->crop, data->crop,
> + fb->width - data->crop * 2,
> + fb->height - data->crop * 2);
> + }
> +
> +
> for (int n = 0; n < color_amount; n++) {
> int y = (fb->height - x * 2) * n / color_amount + x;
>
> igt_paint_color(cr, x, y,
> fb->width - x * 2,
> - (fb->height - x * 2) / color_amount,
> + (fb->height - x * 2) / color_amount + 1,
> colors_extended[n].red,
> colors_extended[n].green,
> colors_extended[n].blue);
> --
> 2.28.0
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2021-06-18 8:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-15 16:00 [igt-dev] [PATCH i-g-t 1/4] tests/kms_cursor_crc: use flipping instead of frontbuffer Juha-Pekka Heikkila
2021-06-15 16:00 ` [igt-dev] [PATCH i-g-t 2/4] tests/kms_ccs: separate ccs modifiers to separate subtests Juha-Pekka Heikkila
2021-06-18 13:20 ` Imre Deak
2021-06-15 16:00 ` [igt-dev] [PATCH i-g-t 3/4] tests/kms_plane: fix rounding error Juha-Pekka Heikkila
2021-06-18 8:19 ` Kahola, Mika [this message]
2021-06-15 16:00 ` [igt-dev] [PATCH i-g-t 4/4] tests/kms_flip_scaled_crc: parameterize test sizes and fix test to try other connectors Juha-Pekka Heikkila
2021-06-18 8:55 ` Kahola, Mika
2021-06-15 16:46 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/4] tests/kms_cursor_crc: use flipping instead of frontbuffer Patchwork
2021-06-16 0:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-21 9:40 ` [igt-dev] [PATCH i-g-t 1/4] " Kahola, Mika
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=608f458c5e4040b3833ac3247f2760e3@intel.com \
--to=mika.kahola@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