From: Sidharth Saha <ssaha2000@gmail.com>
To: Matheus Alves de Almeida <matheus.aalmeida@inf.ufrgs.br>,
Louis Chauvet <louis.chauvet@bootlin.com>,
Haneen Mohammed <hamohammed.sa@gmail.com>,
Simona Vetter <simona@ffwll.ch>,
Melissa Wen <melissa.srw@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/5] drm/vkms: make argb_u16_to_RGB565 round resulting values
Date: Sat, 7 Nov 2026 20:12:29 -0700 [thread overview]
Message-ID: <097af97e-4d8a-477e-8eae-89f3fe485dc1@gmail.com> (raw)
In-Reply-To: <20260928005301.367977-2-matheus.aalmeida@inf.ufrgs.br>
Hi Matheus,
I wrote a KUnit test for argb_u16_to_RGB565() covering zero and max
values, the channel midpoint (0x8000 -> 16/32/16), the 0->1 rounding
step for a 5-bit channel (1057 -> 0, 1058 -> 1), and distinct values
per channel to catch channel placement.
Without this patch, the midpoint, above-step and distinct cases fail
(e.g. green comes out 31 instead of 32, i.e. truncated). With it, all
six cases pass.
Tested-by: Sidharth Saha ssaha2000@gmail.com
Since this rounding fix was lost once before in a refactor, I'm happy
to send the test as a follow-up patch once this series lands, or you're
welcome to fold it into a v2 if that's easier.
Thanks,
Sidharth
On 9/27/2026 5:52 PM, Matheus Alves de Almeida wrote:
> Currently, argb_u16_to_RGB565() truncates the resulting channel values.
next prev parent reply other threads:[~2026-11-08 3:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 0:52 [PATCH 0/5] drm/vkms: support more formats and fix RGB565 regression Matheus Alves de Almeida
2026-09-28 0:52 ` [PATCH 1/5] drm/vkms: make argb_u16_to_RGB565 round resulting values Matheus Alves de Almeida
2026-11-08 3:12 ` Sidharth Saha [this message]
2026-09-28 0:52 ` [PATCH 2/5] drm/vkms: support BGR565 writeback Matheus Alves de Almeida
2026-09-28 0:52 ` [PATCH 3/5] drm/vkms: add a helper for channel to argb_u16 conversion Matheus Alves de Almeida
2026-09-28 0:53 ` [PATCH 4/5] drm/vkms: add support for RGB332 Matheus Alves de Almeida
2026-09-28 0:53 ` [PATCH 5/5] drm/vkms: add support for BGR233 Matheus Alves de Almeida
2026-10-12 19:18 ` [PATCH 0/5] drm/vkms: support more formats and fix RGB565 regression Matheus Alves de Almeida
2026-11-08 3:08 ` Sidharth Saha
2026-11-13 0:18 ` Sidharth Saha
2026-11-13 1:51 ` Matheus Alves de Almeida
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=097af97e-4d8a-477e-8eae-89f3fe485dc1@gmail.com \
--to=ssaha2000@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=louis.chauvet@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matheus.aalmeida@inf.ufrgs.br \
--cc=melissa.srw@gmail.com \
--cc=mripard@kernel.org \
--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 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.