From: Arun Iyengar A missing reference falls back to the CAPTURE buffer. With the post-processor on, that is the post-processor output, not a decoded picture in the decoder's layout. Use the decoder buffer, as the output setup does. Fixes: 8c2d66b036c7 ("media: hantro: Support color conversion via post-processing") Cc: stable@vger.kernel.org Signed-off-by: Arun Iyengar --- drivers/media/platform/verisilicon/hantro_g1_vp8_dec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/verisilicon/hantro_g1_vp8_dec.c b/drivers/media/platform/verisilicon/hantro_g1_vp8_dec.c index 041723fd4c91..d344e8dadadd 100644 --- a/drivers/media/platform/verisilicon/hantro_g1_vp8_dec.c +++ b/drivers/media/platform/verisilicon/hantro_g1_vp8_dec.c @@ -378,7 +378,7 @@ static void cfg_ref(struct hantro_ctx *ctx, if (!ref) { vpu_debug(0, "failed to find last frame ts=%llu\n", hdr->last_frame_ts); - ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); + ref = hantro_get_dec_buf_addr(ctx, &vb2_dst->vb2_buf); } vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(0)); @@ -387,7 +387,7 @@ static void cfg_ref(struct hantro_ctx *ctx, vpu_debug(0, "failed to find golden frame ts=%llu\n", hdr->golden_frame_ts); if (!ref) - ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); + ref = hantro_get_dec_buf_addr(ctx, &vb2_dst->vb2_buf); if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_GOLDEN) ref |= G1_REG_ADDR_REF_TOPC_E; vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(4)); @@ -397,7 +397,7 @@ static void cfg_ref(struct hantro_ctx *ctx, vpu_debug(0, "failed to find alt frame ts=%llu\n", hdr->alt_frame_ts); if (!ref) - ref = vb2_dma_contig_plane_dma_addr(&vb2_dst->vb2_buf, 0); + ref = hantro_get_dec_buf_addr(ctx, &vb2_dst->vb2_buf); if (hdr->flags & V4L2_VP8_FRAME_FLAG_SIGN_BIAS_ALT) ref |= G1_REG_ADDR_REF_TOPC_E; vdpu_write_relaxed(vpu, ref, G1_REG_ADDR_REF(5)); -- 2.55.0