From: paul.elder@ideasonboard.com
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org,
Dafna Hirschfeld <dafna@fastmail.com>,
Florian Sylvestre <fsylvestre@baylibre.com>
Subject: Re: [PATCH 1/3] media: rockchip: rkisp1: Set DPCC methods enable bits inside loop
Date: Fri, 15 Jul 2022 16:44:28 +0900 [thread overview]
Message-ID: <20220715074428.GE3411283@pyrite.rasen.tech> (raw)
In-Reply-To: <20220616160456.21549-2-laurent.pinchart@ideasonboard.com>
Hi Laurent,
On Thu, Jun 16, 2022 at 07:04:54PM +0300, Laurent Pinchart wrote:
> The rkisp1_dpcc_config() function looks over methods sets to configure
> them, but sets the RKISP1_CIF_ISP_DPCC_METHODS_SET_* registers outside
> of the loop with hand-unrolled code. Move this to the loop to simplify
> the code.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
> ---
> drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> index c88a9c0fa86e..140012fa18f0 100644
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c
> @@ -18,6 +18,8 @@
> #define RKISP1_ISP_PARAMS_REQ_BUFS_MIN 2
> #define RKISP1_ISP_PARAMS_REQ_BUFS_MAX 8
>
> +#define RKISP1_ISP_DPCC_METHODS_SET(n) \
> + (RKISP1_CIF_ISP_DPCC_METHODS_SET_1 + 0x4 * (n))
> #define RKISP1_ISP_DPCC_LINE_THRESH(n) \
> (RKISP1_CIF_ISP_DPCC_LINE_THRESH_1 + 0x14 * (n))
> #define RKISP1_ISP_DPCC_LINE_MAD_FAC(n) \
> @@ -66,13 +68,9 @@ static void rkisp1_dpcc_config(struct rkisp1_params *params,
> rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_DPCC_SET_USE,
> arg->set_use);
>
> - rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_DPCC_METHODS_SET_1,
> - arg->methods[0].method);
> - rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_DPCC_METHODS_SET_2,
> - arg->methods[1].method);
> - rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_DPCC_METHODS_SET_3,
> - arg->methods[2].method);
> for (i = 0; i < RKISP1_CIF_ISP_DPCC_METHODS_MAX; i++) {
> + rkisp1_write(params->rkisp1, RKISP1_ISP_DPCC_METHODS_SET(i),
> + arg->methods[i].method);
> rkisp1_write(params->rkisp1, RKISP1_ISP_DPCC_LINE_THRESH(i),
> arg->methods[i].line_thresh);
> rkisp1_write(params->rkisp1, RKISP1_ISP_DPCC_LINE_MAD_FAC(i),
next prev parent reply other threads:[~2022-07-15 7:44 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 16:04 [PATCH 0/3] media: rkisp1: Improve DPCC configuration Laurent Pinchart
2022-06-16 16:04 ` [PATCH 1/3] media: rockchip: rkisp1: Set DPCC methods enable bits inside loop Laurent Pinchart
2022-07-15 7:44 ` paul.elder [this message]
2022-07-16 5:11 ` Dafna Hirschfeld
2022-06-16 16:04 ` [PATCH 2/3] media: rockchip: rkisp1: Mask invalid bits in DPCC parameters Laurent Pinchart
2022-07-15 7:56 ` paul.elder
2022-07-16 5:56 ` Dafna Hirschfeld
2022-07-16 11:47 ` Laurent Pinchart
2022-07-16 6:12 ` Dafna Hirschfeld
2022-07-16 11:49 ` Laurent Pinchart
2022-06-16 16:04 ` [PATCH 3/3] media: rockchip: rkisp1: Define macros for DPCC configurations in UAPI Laurent Pinchart
2022-07-15 7:49 ` paul.elder
2022-08-23 17:24 ` Laurent Pinchart
2022-08-26 19:04 ` Dafna Hirschfeld
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=20220715074428.GE3411283@pyrite.rasen.tech \
--to=paul.elder@ideasonboard.com \
--cc=dafna@fastmail.com \
--cc=fsylvestre@baylibre.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