From: Swati Sharma <swati2.sharma@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: chaitanya.kumar.borah@intel.com, Swati Sharma <swati2.sharma@intel.com>
Subject: [PATCH i-g-t, v8 3/5] tests/kms_colorop_helper: Cast pixel values to double
Date: Tue, 30 Dec 2025 12:15:50 +0530 [thread overview]
Message-ID: <20251230064552.22909-4-swati2.sharma@intel.com> (raw)
In-Reply-To: <20251230064552.22909-1-swati2.sharma@intel.com>
Explicitly cast transformed pixel channel values to double before
scaling by UINT_MAX to avoid overflows for values approaching 1.0.
v2: -improve commit message (Chaitanya)
Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Reviewed-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>
---
tests/kms_colorop_helper.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/kms_colorop_helper.c b/tests/kms_colorop_helper.c
index 76728b47b..152e90f26 100644
--- a/tests/kms_colorop_helper.c
+++ b/tests/kms_colorop_helper.c
@@ -300,9 +300,9 @@ static void fill_custom_1dlut(igt_display_t *display, kms_colorop_t *colorop)
colorop->transform(&pixel);
- colorop->lut1d->lut[i].red = pixel.r * UINT_MAX;
- colorop->lut1d->lut[i].green = pixel.g * UINT_MAX;
- colorop->lut1d->lut[i].blue = pixel.b * UINT_MAX;
+ colorop->lut1d->lut[i].red = (double)pixel.r * UINT_MAX;
+ colorop->lut1d->lut[i].green = (double)pixel.g * UINT_MAX;
+ colorop->lut1d->lut[i].blue = (double)pixel.b * UINT_MAX;
}
}
--
2.25.1
next prev parent reply other threads:[~2025-12-30 6:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-30 6:45 [PATCH i-g-t, v8 0/5] Add plane color pipeline tests for Intel hardware Swati Sharma
2025-12-30 6:45 ` [PATCH i-g-t, v8 2/5] tests/kms_colorop_helper: Add helpers to clear colorops data Swati Sharma
2025-12-30 6:45 ` Swati Sharma [this message]
2025-12-30 6:45 ` [PATCH i-g-t, v8 4/5] tests/kms_color_pipeline: Add Intel plane pipeline tests with LUT1D and CTM Swati Sharma
2026-01-05 7:47 ` [PATCH i-g-t,v8 " Borah, Chaitanya Kumar
2025-12-30 6:45 ` [PATCH i-g-t, v8 5/5] tests/kms_color_pipeline: Add 3D LUT subtest for green-only output with RGB traversal Swati Sharma
2025-12-30 7:16 ` ✓ Xe.CI.BAT: success for Add plane color pipeline tests for Intel hardware (rev9) Patchwork
2025-12-30 7:46 ` ✓ i915.CI.BAT: " Patchwork
2025-12-30 8:51 ` ✓ Xe.CI.Full: " Patchwork
2025-12-30 9:26 ` ✗ i915.CI.Full: failure " Patchwork
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=20251230064552.22909-4-swati2.sharma@intel.com \
--to=swati2.sharma@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=igt-dev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox