Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: hantro: Prevent encoders from using post-processing

The post-processing feature is meant to be used by decoding
only. Prevent encoding jobs from enabling it.

Fixes: 8c2d66b036c77 ("media: hantro: Support color conversion via post-processing")
Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Ezequiel Garcia and committed by
Mauro Carvalho Chehab
986eee3a 042584e9

+1 -1
+1 -1
drivers/staging/media/hantro/hantro.h
··· 423 423 static inline bool 424 424 hantro_needs_postproc(struct hantro_ctx *ctx, const struct hantro_fmt *fmt) 425 425 { 426 - return fmt->fourcc != V4L2_PIX_FMT_NV12; 426 + return !hantro_is_encoder_ctx(ctx) && fmt->fourcc != V4L2_PIX_FMT_NV12; 427 427 } 428 428 429 429 static inline dma_addr_t