[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yr3exPUv0OVKgwlk@eze-laptop>
Date: Thu, 30 Jun 2022 14:35:00 -0300
From: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
To: Benjamin Gaignard <benjamin.gaignard@...labora.com>
Cc: mchehab@...nel.org, hverkuil@...all.nl, p.zabel@...gutronix.de,
gregkh@...uxfoundation.org, mripard@...nel.org,
paul.kocialkowski@...tlin.com, wens@...e.org,
jernej.skrabec@...il.com, samuel@...lland.org,
nicolas.dufresne@...labora.com, andrzej.p@...labora.com,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-staging@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org, linux-sunxi@...ts.linux.dev,
kernel@...labora.com
Subject: Re: [PATCH 4/7] media: hantro: postproc: Configure output regs to
support 10bit
Hi Benjamin,
On Fri, Jun 17, 2022 at 01:57:59PM +0200, Benjamin Gaignard wrote:
> Move output format setting in postproc and make sure that
> 8/10bit configuration is correctly set.
>
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
Reviewed-by: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
Thanks,
Ezequiel
> ---
> drivers/staging/media/hantro/hantro_g2_hevc_dec.c | 2 --
> drivers/staging/media/hantro/hantro_postproc.c | 7 ++++++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
> index 8407ad45b7b7..c929f2974a01 100644
> --- a/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
> +++ b/drivers/staging/media/hantro/hantro_g2_hevc_dec.c
> @@ -167,8 +167,6 @@ static void set_params(struct hantro_ctx *ctx)
> hantro_reg_write(vpu, &g2_bit_depth_y_minus8, sps->bit_depth_luma_minus8);
> hantro_reg_write(vpu, &g2_bit_depth_c_minus8, sps->bit_depth_chroma_minus8);
>
> - hantro_reg_write(vpu, &g2_output_8_bits, 0);
> -
> hantro_reg_write(vpu, &g2_hdr_skip_length, compute_header_skip_lenght(ctx));
>
> min_log2_cb_size = sps->log2_min_luma_coding_block_size_minus3 + 3;
> diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c
> index a0928c508434..09d8cf942689 100644
> --- a/drivers/staging/media/hantro/hantro_postproc.c
> +++ b/drivers/staging/media/hantro/hantro_postproc.c
> @@ -114,6 +114,7 @@ static void hantro_postproc_g2_enable(struct hantro_ctx *ctx)
> struct hantro_dev *vpu = ctx->dev;
> struct vb2_v4l2_buffer *dst_buf;
> int down_scale = down_scale_factor(ctx);
> + int out_depth;
> size_t chroma_offset;
> dma_addr_t dst_dma;
>
> @@ -132,8 +133,9 @@ static void hantro_postproc_g2_enable(struct hantro_ctx *ctx)
> hantro_write_addr(vpu, G2_RS_OUT_LUMA_ADDR, dst_dma);
> hantro_write_addr(vpu, G2_RS_OUT_CHROMA_ADDR, dst_dma + chroma_offset);
> }
> +
> + out_depth = hantro_get_format_depth(ctx->dst_fmt.pixelformat);
> if (ctx->dev->variant->legacy_regs) {
> - int out_depth = hantro_get_format_depth(ctx->dst_fmt.pixelformat);
> u8 pp_shift = 0;
>
> if (out_depth > 8)
> @@ -141,6 +143,9 @@ static void hantro_postproc_g2_enable(struct hantro_ctx *ctx)
>
> hantro_reg_write(ctx->dev, &g2_rs_out_bit_depth, out_depth);
> hantro_reg_write(ctx->dev, &g2_pp_pix_shift, pp_shift);
> + } else {
> + hantro_reg_write(vpu, &g2_output_8_bits, out_depth > 8 ? 0 : 1);
> + hantro_reg_write(vpu, &g2_output_format, out_depth > 8 ? 1 : 0);
> }
> hantro_reg_write(vpu, &g2_out_rs_e, 1);
> }
> --
> 2.32.0
>
Powered by blists - more mailing lists