[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <TC3APR.E9HSCZZ5SCPF@vanguardiasur.com.ar>
Date: Mon, 30 Jan 2023 00:07:41 -0300
From: Ezequiel Garcia <ezequiel@...guardiasur.com.ar>
To: Benjamin Gaignard <benjamin.gaignard@...labora.com>
Cc: p.zabel@...gutronix.de, mchehab@...nel.org, shawnguo@...nel.org,
s.hauer@...gutronix.de, kernel@...gutronix.de, festevam@...il.com,
linux-imx@....com, hverkuil-cisco@...all.nl,
nicolas.dufresne@...labora.co.uk, linux-media@...r.kernel.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, kernel@...labora.com,
Nicolas Dufresne <nicolas.dufresne@...labora.com>
Subject: Re: [PATCH v5 1/2] media: verisilicon: Do not change context bit
depth before validating the format
On Fri, Jan 27 2023 at 10:21:25 AM +0100, Benjamin Gaignard
<benjamin.gaignard@...labora.com> wrote:
> It is needed to check if the proposed pixels format is valid before
> updating context bit depth and other internal states.
> Stop using ctx->bit_depth to check format depth match and return
> result to the caller.
>
> Fixes: dc39473d0340 ("media: hantro: imx8m: Enable 10bit decoding")
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...labora.com>
> Reviewed-by: Nicolas Dufresne <nicolas.dufresne@...labora.com>
> ---
..
> */
> if (ctx->is_encoder)
> - hantro_reset_raw_fmt(ctx);
> + hantro_reset_raw_fmt(ctx, 0);
Explicit is better than implicit.
Please replace the "0" to imply default, and instead
pass HANTRO_DEFAULT_BIT_DEPTH explicitly.
Thanks!
>
Powered by blists - more mailing lists