From: Vincenzo Frascino <vincenzo.frascino@arm.com>
To: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
Cc: Nayden.Kanchev@arm.com,
Konstantin Babin <Konstantin.Babin@arm.com>,
Anthony McGivern <anthony.mcgivern@arm.com>,
linus.walleij@arm.com, laurent.pinchart@ideasonboard.com,
Daniel Scally <dan.scally@ideasonboard.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Subject: Re: [PATCH v3 4/4] media: mali-c55: Implement Gamma block validation
Date: Mon, 29 Jun 2026 11:14:06 +0100 [thread overview]
Message-ID: <bbe03963-8b79-4291-9d29-18819fe40440@arm.com> (raw)
In-Reply-To: <akI3qTMs_P0aJpWU@zed>
Hi Jacopo,
On 29/06/2026 10:19, Jacopo Mondi wrote:
>>> + /* Check the first and last gamma lut entries match the expectations. */
>>> + if (gamma->lut[0] != 0 ||
>>> + gamma->lut[MALI_C55_NUM_GAMMA_LUT_ELEMENTS - 1] != 0xfff) {
>> I am still learning about these things and might be wrong. Should not we also
>> validate that intermediate LUT entries are monotonic and non-decreasing?
>>
> Eh, good question.
>
> This all new for everyone, as this would be the first user of
> 'block_validate()' in tree.
>
> Here I checked only the first and last member because it seems like a
> good compromise between performances and correctness. This function
> might potentially run for every frame (where a CCM table is specified
> by userspace), so I'm a bit unsure how far we should go with
> validation.
>
> I kept these two patches broken out from the ones that introduce the
> uapi specifically to get feedback on this. Maybe I'm overconcerned
> about the additional cost of validation ?
I am not sure either. As a strategy I always prefer to be on the safe side hence
my comment. Is there any way we could come up with a comparative analysis and
check what's the impact of these additional costs? This should answer my
question I guess.
--
Regards,
Vincenzo
next prev parent reply other threads:[~2026-06-29 10:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-27 14:29 [PATCH v3 0/4] media: mali-c55: Add support for CCM and Gamma Jacopo Mondi
2026-06-27 14:29 ` [PATCH v3 1/4] media: mali-c55: Add support for CCM Jacopo Mondi
2026-06-27 14:29 ` [PATCH v3 2/4] media: mali-c55: Implement CCM block validation Jacopo Mondi
2026-06-29 7:52 ` Vincenzo Frascino
2026-06-29 9:15 ` Jacopo Mondi
2026-06-29 9:57 ` Laurent Pinchart
2026-06-29 11:08 ` Vincenzo Frascino
2026-06-29 11:33 ` Jacopo Mondi
2026-06-29 13:07 ` Vincenzo Frascino
2026-06-29 12:05 ` Laurent Pinchart
2026-06-29 13:17 ` Vincenzo Frascino
2026-06-29 13:32 ` Laurent Pinchart
2026-06-29 13:42 ` Vincenzo Frascino
2026-06-27 14:29 ` [PATCH v3 3/4] media: mali-c55: Add support for RGB Gamma Jacopo Mondi
2026-06-27 14:29 ` [PATCH v3 4/4] media: mali-c55: Implement Gamma block validation Jacopo Mondi
2026-06-29 8:10 ` Vincenzo Frascino
2026-06-29 9:19 ` Jacopo Mondi
2026-06-29 10:14 ` Vincenzo Frascino [this message]
2026-06-29 10:20 ` Laurent Pinchart
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=bbe03963-8b79-4291-9d29-18819fe40440@arm.com \
--to=vincenzo.frascino@arm.com \
--cc=Konstantin.Babin@arm.com \
--cc=Nayden.Kanchev@arm.com \
--cc=anthony.mcgivern@arm.com \
--cc=dan.scally@ideasonboard.com \
--cc=jacopo.mondi+renesas@ideasonboard.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linus.walleij@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.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
all inboxes | Powered by JetHome®