Thread (6 messages) 6 messages, 2 authors, 2023-01-30

Re: [PATCH v5 1/2] media: verisilicon: Do not change context bit depth before validating the format

From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Date: 2023-01-30 03:08:32
Also in: linux-media, linux-rockchip, lkml


On Fri, Jan 27 2023 at 10:21:25 AM +0100, Benjamin Gaignard 
[off-list ref] 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@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.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!


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help