dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Leandro Ribeiro" <leandro.ribeiro@collabora.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 04/11] drm/vkms: remove linear_eotf
Date: Tue, 04 Aug 2026 20:42:36 +0000	[thread overview]
Message-ID: <20260804204237.43EEA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260804203351.148521-5-leandro.ribeiro@collabora.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `vkms_color_test_linear` KUnit test loop relies on a hardcoded multiplier of `0x101` that was designed for a 256-element LUT. The patch replaces `linear_eotf` (256 elements) with `test_linear_lut` (16 elements) without adjusting the multiplier. Since the loop now only executes 16 times (`i` from 0 to 15), the evaluated channel values only range from `0x0000` to `0x0F0F` (~5.8% of the 16-bit color space). The test fails to exercise the remaining 94% of the color range and leaves 14 out of the 16 elements of `test_linear_lut` completely untested. To restore proper test coverage over the `0x0000` to `0xFFFF` range, both instances of `0x101` should be updated to `0x1111` (since `15 * 0x1111 = 0xFFFF`).
--

--- Patch [4]: [PATCH 04/11] drm/vkms: remove linear_eotf ---
commit e4769cf1ca6d6dd3c89f50766f7a24a69c53cccb
Author: Leandro Ribeiro <leandro.ribeiro@collabora.com>

drm/vkms: remove linear_eotf

This patch removes the linear_eotf LUT, which was only used for testing,
and updates the kunit color tests to use test_linear_lut instead.

> diff --git a/drivers/gpu/drm/vkms/tests/vkms_color_test.c b/drivers/gpu/drm/vkms/tests/vkms_color_test.c
> index 3489513af3527..28614edb8eb18 100644
> --- a/drivers/gpu/drm/vkms/tests/vkms_color_test.c
> +++ b/drivers/gpu/drm/vkms/tests/vkms_color_test.c
> @@ -126,8 +126,8 @@ static void vkms_color_test_lerp(struct kunit *test)
>  
>  static void vkms_color_test_linear(struct kunit *test)
>  {
> -	for (int i = 0; i < linear_eotf.lut_length; i++) {
> -		int linear = apply_lut_to_channel_value(&linear_eotf, i * 0x101, LUT_RED);
> +	for (int i = 0; i < test_linear_lut.lut_length; i++) {
> +		int linear = apply_lut_to_channel_value(&test_linear_lut, i * 0x101, LUT_RED);

[Severity: Medium]
Since the new test_linear_lut only has 16 elements (compared to the 256
elements in linear_eotf), does leaving the multiplier as 0x101 mean we
only test values up to 0x0f0f (~5.8% of the 16-bit color space)?

Should both instances of 0x101 in this loop be updated to 0x1111 so that
the final iteration (15 * 0x1111) reaches 0xffff, restoring coverage over
the full color range?

>  
> -		KUNIT_EXPECT_EQ(test, DIV_ROUND_CLOSEST(linear, 0x101), i);
> +		KUNIT_EXPECT_EQ(test, DIV_ROUND_CLOSEST(linear, 0x101), i);
>  	}

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260804203351.148521-1-leandro.ribeiro@collabora.com?part=4

  reply	other threads:[~2026-08-04 20:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04 20:33 [PATCH 00/11] drm/vkms: improve color curve LUTs precision Leandro Ribeiro
2026-08-04 20:33 ` [PATCH 01/11] drm/vkms: rename VKMS_LUT_SIZE to VKMS_GAMMA_LUT_SIZE Leandro Ribeiro
2026-08-04 20:41   ` sashiko-bot
2026-08-04 20:33 ` [PATCH 02/11] drm/vkms: allow color curve LUTs to have different sizes Leandro Ribeiro
2026-08-04 20:33 ` [PATCH 03/11] drm/vkms: remove TEST_LUT_SIZE Leandro Ribeiro
2026-08-04 20:33 ` [PATCH 04/11] drm/vkms: remove linear_eotf Leandro Ribeiro
2026-08-04 20:42   ` sashiko-bot [this message]
2026-08-04 20:33 ` [PATCH 05/11] drm/vkms: improve the way in which we access LUT member Leandro Ribeiro
2026-08-04 20:33 ` [PATCH 06/11] drm/vkms: rename struct vkms_color_lut::base to y Leandro Ribeiro
2026-08-04 20:52   ` sashiko-bot
2026-08-04 20:33 ` [PATCH 07/11] drm/vkms: rename get_lut_index() to get_uniform_lut_index() Leandro Ribeiro
2026-08-04 20:47   ` sashiko-bot
2026-08-04 20:33 ` [PATCH 08/11] drm/vkms: add support to non-uniform LUT for internal color curves Leandro Ribeiro
2026-08-04 20:33 ` [PATCH 09/11] drm/vkms: test sRGB and inverse sRGB LUTs using more samples Leandro Ribeiro
2026-08-04 20:33 ` [PATCH 10/11] drm/vkms: add script to create optimized LUTs for color curves Leandro Ribeiro
2026-08-04 20:47   ` sashiko-bot
2026-08-04 20:33 ` [PATCH 11/11] drm/vkms: replace uniform sRGB LUT and its inverse with optimal ones Leandro Ribeiro

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=20260804204237.43EEA1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=leandro.ribeiro@collabora.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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