From: Ezequiel Garcia Date: Wed, 29 Jan 2020 21:06:08 +0000 (+0100) Subject: media: hantro: Prevent encoders from using post-processing X-Git-Tag: v5.7-rc1~193^2~183 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=986eee3a5234fa43b94928f63b9fd8b513cd96e7;p=thirdparty%2Flinux.git 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 Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/hantro/hantro.h b/drivers/staging/media/hantro/hantro.h index b0faa43b3f79c..327ddef45345e 100644 --- a/drivers/staging/media/hantro/hantro.h +++ b/drivers/staging/media/hantro/hantro.h @@ -423,7 +423,7 @@ hantro_get_dst_buf(struct hantro_ctx *ctx) static inline bool hantro_needs_postproc(struct hantro_ctx *ctx, const struct hantro_fmt *fmt) { - return fmt->fourcc != V4L2_PIX_FMT_NV12; + return !hantro_is_encoder_ctx(ctx) && fmt->fourcc != V4L2_PIX_FMT_NV12; } static inline dma_addr_t