lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2b5a496fc2c114ae40b4d623ac8ad0884d334b60.camel@collabora.com>
Date: Thu, 12 Dec 2024 09:26:46 -0500
From: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Hugues Fruchet <hugues.fruchet@...s.st.com>, Mauro Carvalho Chehab	
 <mchehab@...nel.org>, Ezequiel Garcia <ezequiel@...guardiasur.com.ar>, 
 Philipp Zabel <p.zabel@...gutronix.de>, Hans Verkuil
 <hverkuil-cisco@...all.nl>, Fritz Koenig	 <frkoenig@...omium.org>,
 Sebastian Fricke <sebastian.fricke@...labora.com>,  Daniel Almeida
 <daniel.almeida@...labora.com>, Andrzej Pietrasiewicz
 <andrzej.p@...labora.com>, Benjamin Gaignard
 <benjamin.gaignard@...labora.com>, linux-media@...r.kernel.org, 
	linux-kernel@...r.kernel.org, linux-rockchip@...ts.infradead.org, 
	linux-stm32@...md-mailman.stormreply.com
Subject: Re: [PATCH v2 3/3] media: verisilicon: postproc: 4K support

Le mercredi 20 novembre 2024 à 12:01 +0100, Hugues Fruchet a écrit :
> Support input larger than 4096x2048 using extended input width/height
> fields of swreg92.
> This is needed to decode large WebP or JPEG pictures.
> 
> Signed-off-by: Hugues Fruchet <hugues.fruchet@...s.st.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>

This can likely be picked independently as it already improve JPEG support.

Nicolas

> ---
>  drivers/media/platform/verisilicon/hantro.h          | 2 ++
>  drivers/media/platform/verisilicon/hantro_g1_regs.h  | 2 +-
>  drivers/media/platform/verisilicon/hantro_postproc.c | 6 +++++-
>  3 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/platform/verisilicon/hantro.h b/drivers/media/platform/verisilicon/hantro.h
> index 811260dc3c77..d1337f7742e4 100644
> --- a/drivers/media/platform/verisilicon/hantro.h
> +++ b/drivers/media/platform/verisilicon/hantro.h
> @@ -321,6 +321,8 @@ struct hantro_postproc_regs {
>  	struct hantro_reg output_fmt;
>  	struct hantro_reg orig_width;
>  	struct hantro_reg display_width;
> +	struct hantro_reg input_width_ext;
> +	struct hantro_reg input_height_ext;
>  };
>  
>  struct hantro_vp9_decoded_buffer_info {
> diff --git a/drivers/media/platform/verisilicon/hantro_g1_regs.h b/drivers/media/platform/verisilicon/hantro_g1_regs.h
> index e7d4db788e57..f6e5bbeb1914 100644
> --- a/drivers/media/platform/verisilicon/hantro_g1_regs.h
> +++ b/drivers/media/platform/verisilicon/hantro_g1_regs.h
> @@ -351,7 +351,7 @@
>  #define     G1_REG_PP_CONTROL_OUT_WIDTH(v) (((v) << 4) & GENMASK(14, 4))
>  #define G1_REG_PP_MASK1_ORIG_WIDTH	G1_SWREG(88)
>  #define     G1_REG_PP_ORIG_WIDTH(v)	(((v) << 23) & GENMASK(31, 23))
> -#define G1_REG_PP_DISPLAY_WIDTH		G1_SWREG(92)
> +#define G1_REG_PP_DISPLAY_WIDTH_IN_EXT	G1_SWREG(92)
>  #define G1_REG_PP_FUSE			G1_SWREG(99)
>  
>  #endif /* HANTRO_G1_REGS_H_ */
> diff --git a/drivers/media/platform/verisilicon/hantro_postproc.c b/drivers/media/platform/verisilicon/hantro_postproc.c
> index 232c93eea7ee..84c8e287470d 100644
> --- a/drivers/media/platform/verisilicon/hantro_postproc.c
> +++ b/drivers/media/platform/verisilicon/hantro_postproc.c
> @@ -49,7 +49,9 @@ static const struct hantro_postproc_regs hantro_g1_postproc_regs = {
>  	.input_fmt = {G1_REG_PP_CONTROL, 29, 0x7},
>  	.output_fmt = {G1_REG_PP_CONTROL, 26, 0x7},
>  	.orig_width = {G1_REG_PP_MASK1_ORIG_WIDTH, 23, 0x1ff},
> -	.display_width = {G1_REG_PP_DISPLAY_WIDTH, 0, 0xfff},
> +	.display_width = {G1_REG_PP_DISPLAY_WIDTH_IN_EXT, 0, 0xfff},
> +	.input_width_ext = {G1_REG_PP_DISPLAY_WIDTH_IN_EXT, 26, 0x7},
> +	.input_height_ext = {G1_REG_PP_DISPLAY_WIDTH_IN_EXT, 29, 0x7},
>  };
>  
>  bool hantro_needs_postproc(const struct hantro_ctx *ctx,
> @@ -103,6 +105,8 @@ static void hantro_postproc_g1_enable(struct hantro_ctx *ctx)
>  	HANTRO_PP_REG_WRITE(vpu, output_height, ctx->dst_fmt.height);
>  	HANTRO_PP_REG_WRITE(vpu, orig_width, MB_WIDTH(ctx->dst_fmt.width));
>  	HANTRO_PP_REG_WRITE(vpu, display_width, ctx->dst_fmt.width);
> +	HANTRO_PP_REG_WRITE(vpu, input_width_ext, MB_WIDTH(ctx->dst_fmt.width) >> 9);
> +	HANTRO_PP_REG_WRITE(vpu, input_height_ext, MB_HEIGHT(ctx->dst_fmt.height >> 8));
>  }
>  
>  static int down_scale_factor(struct hantro_ctx *ctx)


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ