diff --git a/drivers/staging/media/hantro/hantro_postproc.c b/drivers/staging/media/hantro/hantro_postproc.c index b55730011d0cce5cfc54b9e9a25b7bc2a038d770..28a85d301d7f5732f4aa44da5efd28f9966960b2 100644 --- a/drivers/staging/media/hantro/hantro_postproc.c +++ b/drivers/staging/media/hantro/hantro_postproc.c @@ -57,6 +57,9 @@ void hantro_postproc_enable(struct hantro_ctx *ctx) u32 src_pp_fmt, dst_pp_fmt; dma_addr_t dst_dma; + if (!vpu->variant->postproc_regs) + return; + /* Turn on pipeline mode. Must be done first. */ HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x1); @@ -138,5 +141,8 @@ void hantro_postproc_disable(struct hantro_ctx *ctx) { struct hantro_dev *vpu = ctx->dev; + if (!vpu->variant->postproc_regs) + return; + HANTRO_PP_REG_WRITE_S(vpu, pipeline_en, 0x0); }