All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vidya Srinivas <vidya.srinivas@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: juhapekkaheikkila@gmail.com,
	tejaskumax.surendrakumar.upadhyay@intel.com,
	"Vidya Srinivas" <vidya.srinivas@intel.com>,
	"Juha-Pekka Heikkilä" <juha-pekka.heikkila@intel.com>
Subject: [igt-dev] [PATCH i-g-t 2/2] tests/kms_plane_alpha_blend: Fix rounding in draw_squares
Date: Wed,  4 Aug 2021 08:26:37 +0530	[thread overview]
Message-ID: <20210804025637.2473-3-vidya.srinivas@intel.com> (raw)
In-Reply-To: <20210804025637.2473-1-vidya.srinivas@intel.com>

Patch fixes a rounding issue in draw_squares. Due to this,
coverage-premultiplied-constant subtest gives CRC
mismatch on panels with 1366x768 resolution.

Signed-off-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
---
 tests/kms_plane_alpha_blend.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/kms_plane_alpha_blend.c b/tests/kms_plane_alpha_blend.c
index 8616169e7ca2..b4cf039bd914 100644
--- a/tests/kms_plane_alpha_blend.c
+++ b/tests/kms_plane_alpha_blend.c
@@ -88,7 +88,7 @@ static void draw_squares(struct igt_fb *fb, int w, int h, double a)
 	igt_paint_color_alpha(cr, w / 2, 0,     w / 2, h / 2, 0., 1., 0., a);
 	igt_paint_color_alpha(cr, 0, h / 2,     w / 2, h / 2, 0., 0., 1., a);
 	igt_paint_color_alpha(cr, w / 2, h / 2, w / 4, h / 2, 1., 1., 1., a);
-	igt_paint_color_alpha(cr, 3 * w / 4, h / 2, w / 4, h / 2, 0., 0., 0., a);
+	igt_paint_color_alpha(cr, w * 3 / 4, h / 2, w - (w * 3 / 4), h / 2, 0., 0., 0., a);
 
 	igt_put_cairo_ctx(cr);
 }
-- 
2.32.0

  parent reply	other threads:[~2021-08-04  3:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04  2:56 [igt-dev] [PATCH i-g-t 0/2] Fix rounding error in draw_squares in kms_plane_alpha_blend Vidya Srinivas
2021-08-04  2:56 ` [igt-dev] [PATCH i-g-t 1/2] Revert "tests/kms_plane_alpha_blend: Align width to 256B" Vidya Srinivas
2021-08-04  2:56 ` Vidya Srinivas [this message]
2021-08-04  3:38 ` [igt-dev] ✓ Fi.CI.BAT: success for Fix rounding error in draw_squares in kms_plane_alpha_blend Patchwork
2021-08-04  6:22 ` [igt-dev] ✗ GitLab.Pipeline: warning " Patchwork
2021-08-05 13:02 ` [igt-dev] ✓ Fi.CI.IGT: success " Patchwork
2021-09-03  7:16 ` [igt-dev] [PATCH i-g-t 0/2] " Kahola, Mika
2021-09-03 10:08   ` Srinivas, Vidya

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=20210804025637.2473-3-vidya.srinivas@intel.com \
    --to=vidya.srinivas@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=juha-pekka.heikkila@intel.com \
    --cc=juhapekkaheikkila@gmail.com \
    --cc=tejaskumax.surendrakumar.upadhyay@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 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.