mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Leandro Ribeiro <leandro.ribeiro@collabora.com>
Cc: airlied@gmail.com, alex.hung@amd.com, daniel@fooishbar.org,
	hamohammed.sa@gmail.com, harry.wentland@amd.com,
	maarten.lankhorst@linux.intel.com, melissa.srw@gmail.com,
	mripard@kernel.org, pekka.paalanen@collabora.com,
	robert.mader@collabora.com, simona@ffwll.ch, tzimmermann@suse.de,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 07/12] drm/vkms: rename struct vkms_color_lut::base to y
Date: Wed, 18 Nov 2026 15:44:07 +0100	[thread overview]
Message-ID: <d26bc038-0d3b-40f1-8021-345282dad49a@bootlin.com> (raw)
In-Reply-To: <20261106201813.129911-8-leandro.ribeiro@collabora.com>



On 11/6/26 21:18, Leandro Ribeiro wrote:
> No behavior change. In the following commits we'll add x, so y better
> matches that.
> 
> Reviewed-by: Robert Mader <robert.mader@collabora.com>
> Tested-by: Robert Mader <robert.mader@collabora.com>
> Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>

Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>

> ---
>   drivers/gpu/drm/vkms/tests/vkms_color_test.c |  2 +-
>   drivers/gpu/drm/vkms/vkms_composer.c         | 10 +++++-----
>   drivers/gpu/drm/vkms/vkms_drv.h              |  2 +-
>   drivers/gpu/drm/vkms/vkms_luts.c             |  4 ++--
>   4 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vkms/tests/vkms_color_test.c b/drivers/gpu/drm/vkms/tests/vkms_color_test.c
> index 83ef2afcc819..c223797a542a 100644
> --- a/drivers/gpu/drm/vkms/tests/vkms_color_test.c
> +++ b/drivers/gpu/drm/vkms/tests/vkms_color_test.c
> @@ -81,7 +81,7 @@ static const struct vkms_color_test_lerp_params color_test_lerp_cases[] = {
>   };
>   
>   static const struct vkms_color_lut test_linear_lut = {
> -	.base = test_linear_array,
> +	.y = test_linear_array,
>   	.lut_length = ARRAY_SIZE(test_linear_array),
>   	.channel_value2index_ratio = 0xf000fll
>   };
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> index b4a433be1b2d..640a1a03f06f 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -114,12 +114,12 @@ VISIBLE_IF_KUNIT u16 apply_lut_to_channel_value(const struct vkms_color_lut *lut
>   	 */
>   	static_assert(sizeof(struct drm_color_lut) == sizeof(__u16) * 4);
>   
> -	lut_y_floor = &lut->base[drm_fixp2int(lut_index)];
> +	lut_y_floor = &lut->y[drm_fixp2int(lut_index)];
>   	if (drm_fixp2int(lut_index) == (lut->lut_length - 1))
>   		/* We're at the end of the LUT array, use same value for ceil and floor */
>   		lut_y_ceil = lut_y_floor;
>   	else
> -		lut_y_ceil = &lut->base[drm_fixp2int_ceil(lut_index)];
> +		lut_y_ceil = &lut->y[drm_fixp2int_ceil(lut_index)];
>   
>   	floor_channel_value = lut_channel_value(lut_y_floor, channel);
>   	ceil_channel_value = lut_channel_value(lut_y_ceil, channel);
> @@ -132,7 +132,7 @@ EXPORT_SYMBOL_IF_KUNIT(apply_lut_to_channel_value);
>   
>   static void apply_lut(const struct vkms_crtc_state *crtc_state, struct line_buffer *output_buffer)
>   {
> -	if (!crtc_state->gamma_lut.base)
> +	if (!crtc_state->gamma_lut.y)
>   		return;
>   
>   	if (!crtc_state->gamma_lut.lut_length)
> @@ -647,7 +647,7 @@ void vkms_composer_worker(struct work_struct *work)
>   		s64 max_lut_index_fp;
>   		s64 u16_max_fp = drm_int2fixp(0xffff);
>   
> -		crtc_state->gamma_lut.base = (struct drm_color_lut *)crtc->state->gamma_lut->data;
> +		crtc_state->gamma_lut.y = (struct drm_color_lut *)crtc->state->gamma_lut->data;
>   		crtc_state->gamma_lut.lut_length =
>   			crtc->state->gamma_lut->length / sizeof(struct drm_color_lut);
>   		max_lut_index_fp = drm_int2fixp(crtc_state->gamma_lut.lut_length - 1);
> @@ -655,7 +655,7 @@ void vkms_composer_worker(struct work_struct *work)
>   									       u16_max_fp);
>   
>   	} else {
> -		crtc_state->gamma_lut.base = NULL;
> +		crtc_state->gamma_lut.y = NULL;
>   	}
>   
>   	spin_unlock_irq(&out->composer_lock);
> diff --git a/drivers/gpu/drm/vkms/vkms_drv.h b/drivers/gpu/drm/vkms/vkms_drv.h
> index 34b855431af3..cdcf7a79697b 100644
> --- a/drivers/gpu/drm/vkms/vkms_drv.h
> +++ b/drivers/gpu/drm/vkms/vkms_drv.h
> @@ -159,7 +159,7 @@ struct vkms_plane {
>   };
>   
>   struct vkms_color_lut {
> -	struct drm_color_lut *base;
> +	struct drm_color_lut *y;
>   	size_t lut_length;
>   	s64 channel_value2index_ratio;
>   };
> diff --git a/drivers/gpu/drm/vkms/vkms_luts.c b/drivers/gpu/drm/vkms/vkms_luts.c
> index d0e96df2c120..7b0c8eaf83b8 100644
> --- a/drivers/gpu/drm/vkms/vkms_luts.c
> +++ b/drivers/gpu/drm/vkms/vkms_luts.c
> @@ -272,7 +272,7 @@ static struct drm_color_lut srgb_array[] = {
>   };
>   
>   const struct vkms_color_lut srgb_eotf = {
> -	.base = srgb_array,
> +	.y = srgb_array,
>   	.lut_length = ARRAY_SIZE(srgb_array),
>   	.channel_value2index_ratio = 0xff00ffll
>   };
> @@ -538,7 +538,7 @@ static struct drm_color_lut srgb_inv_array[] = {
>   };
>   
>   const struct vkms_color_lut srgb_inv_eotf = {
> -	.base = srgb_inv_array,
> +	.y = srgb_inv_array,
>   	.lut_length = ARRAY_SIZE(srgb_inv_array),
>   	.channel_value2index_ratio = 0xff00ffll
>   };


  reply	other threads:[~2026-11-18 14:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-06 20:18 [PATCH v2 00/12] drm/vkms: improve color curve LUTs precision Leandro Ribeiro
2026-11-06 20:18 ` [PATCH v2 01/12] drm/vkms: rename VKMS_LUT_SIZE to VKMS_GAMMA_LUT_SIZE Leandro Ribeiro
2026-11-18 14:30   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 02/12] vkms: properly compute gamma LUT size in vkms_atomic_check() Leandro Ribeiro
2026-11-18 14:31   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 03/12] drm/vkms: allow color curve LUTs to have different sizes Leandro Ribeiro
2026-11-18 14:32   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 04/12] drm/vkms: remove TEST_LUT_SIZE Leandro Ribeiro
2026-11-18 14:37   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 05/12] drm/vkms: remove linear_eotf Leandro Ribeiro
2026-11-18 14:39   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 06/12] drm/vkms: improve the way in which we access LUT member Leandro Ribeiro
2026-11-18 14:43   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 07/12] drm/vkms: rename struct vkms_color_lut::base to y Leandro Ribeiro
2026-11-18 14:44   ` Louis Chauvet [this message]
2026-11-06 20:18 ` [PATCH v2 08/12] drm/vkms: rename get_lut_index() to get_uniform_lut_index() Leandro Ribeiro
2026-11-18 14:44   ` Louis Chauvet
2026-11-06 20:18 ` [PATCH v2 09/12] drm/vkms: add support to non-uniform LUT for internal color curves Leandro Ribeiro
2026-11-06 20:18 ` [PATCH v2 10/12] drm/vkms: test sRGB and inverse sRGB LUTs using more samples Leandro Ribeiro
2026-11-06 20:18 ` [PATCH v2 11/12] drm/vkms: add script to create optimized LUTs for color curves Leandro Ribeiro
2026-11-06 20:18 ` [PATCH v2 12/12] 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=d26bc038-0d3b-40f1-8021-345282dad49a@bootlin.com \
    --to=louis.chauvet@bootlin.com \
    --cc=airlied@gmail.com \
    --cc=alex.hung@amd.com \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hamohammed.sa@gmail.com \
    --cc=harry.wentland@amd.com \
    --cc=leandro.ribeiro@collabora.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=melissa.srw@gmail.com \
    --cc=mripard@kernel.org \
    --cc=pekka.paalanen@collabora.com \
    --cc=robert.mader@collabora.com \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /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

all inboxes | Powered by JetHome®