From: Paul Elder <paul.elder@ideasonboard.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org,
Dafna Hirschfeld <dafna@fastmail.com>,
Jacopo Mondi <jacopo.mondi@ideasonboard.com>,
linux-rockchip@lists.infradead.org
Subject: Re: [PATCH v2 2/5] media: rkisp1: Add features mask to extensible block handlers
Date: Fri, 5 Jul 2024 20:31:31 +0900 [thread overview]
Message-ID: <ZofZk0yD40Hsgbrl@pyrite.rasen.tech> (raw)
In-Reply-To: <20240704154932.6686-3-laurent.pinchart@ideasonboard.com>
On Thu, Jul 04, 2024 at 06:49:29PM +0300, Laurent Pinchart wrote:
> Future ISP parameter blocks for i.MX8MP-specific features will not
> support on Rockchip platforms as they lack the corresponding hardware.
> Introduce a features mask in the extensible block handlers to indicate
> which device features a block require, and ignore blocks that require
> unavailable features.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
> ---
> Changes since v1:
>
> - Expand comment
> - Fix feature check test
> ---
> drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 10 +++++++++-
> 1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> index c56365c7c51f..d3a7c7f55db0 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> @@ -1845,6 +1845,7 @@ static const struct rkisp1_ext_params_handler {
> size_t size;
> rkisp1_block_handler handler;
> unsigned int group;
> + unsigned int features;
> } rkisp1_ext_params_handlers[] = {
> [RKISP1_EXT_PARAMS_BLOCK_TYPE_BLS] = {
> .size = sizeof(struct rkisp1_ext_params_bls_config),
> @@ -1951,11 +1952,18 @@ static void rkisp1_ext_params_config(struct rkisp1_params *params,
> &cfg->data[block_offset];
> block_offset += block->header.size;
>
> - /* Make sure the block is in the list of groups to configure. */
> + /*
> + * Make sure the block is supported by the platform and in the
> + * list of groups to configure.
> + */
> block_handler = &rkisp1_ext_params_handlers[block->header.type];
> if (!(block_handler->group & block_group_mask))
> continue;
>
> + if ((params->rkisp1->info->features & block_handler->features) !=
> + block_handler->features)
> + continue;
> +
> block_handler->handler(params, block);
>
> if (block->header.enable == RKISP1_EXT_PARAMS_BLOCK_DISABLE)
_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2024-07-05 11:31 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 15:49 [PATCH v2 0/5] media: rkisp1: Add support for the companding block Laurent Pinchart
2024-07-04 15:49 ` [PATCH v2 1/5] media: rkisp1: Add helper function to swap colour channels Laurent Pinchart
2024-07-04 19:50 ` Jacopo Mondi
2024-07-05 11:28 ` Paul Elder
2024-07-04 15:49 ` [PATCH v2 2/5] media: rkisp1: Add features mask to extensible block handlers Laurent Pinchart
2024-07-04 19:51 ` Jacopo Mondi
2024-07-05 11:31 ` Paul Elder [this message]
2024-07-04 15:49 ` [PATCH v2 3/5] media: rkisp1: Add register definitions for the companding block Laurent Pinchart
2024-07-04 15:49 ` [PATCH v2 4/5] media: rkisp1: Add feature flags for BLS and compand Laurent Pinchart
2024-07-04 19:53 ` Jacopo Mondi
2024-07-04 15:49 ` [PATCH v2 5/5] media: rkisp1: Add support for the companding block Laurent Pinchart
2024-07-04 20:03 ` Jacopo Mondi
2024-07-05 11:43 ` Paul Elder
2024-07-09 16:53 ` Adam Ford
2024-07-10 8:09 ` Jacopo Mondi
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=ZofZk0yD40Hsgbrl@pyrite.rasen.tech \
--to=paul.elder@ideasonboard.com \
--cc=dafna@fastmail.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.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