Skip to contentSkip to conversation

media: hantro: Prevent encoders from using post-processing

PATCH New Ezequiel Garcia 1 participant 1 message Jan 29, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/staging/media/hantro/hantro.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/media/hantro/hantro.h +1 -1
index b0faa43b3f79..327ddef45345 100644
@@ -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
Signature · 1 line
2.25.0