Message ID | 20230509150249.824440-2-andri@yngvason.is |
---|---|
State | New |
Headers | show |
Series | [1/2] media: verisilicon: rockchip_vpu2_hw_jpeg_enc: Consolidate setting of source buffer addresses | expand |
diff --git a/drivers/media/platform/verisilicon/rockchip_vpu2_hw_jpeg_enc.c b/drivers/media/platform/verisilicon/rockchip_vpu2_hw_jpeg_enc.c index 52c76fb91c56..716c248dc2bf 100644 --- a/drivers/media/platform/verisilicon/rockchip_vpu2_hw_jpeg_enc.c +++ b/drivers/media/platform/verisilicon/rockchip_vpu2_hw_jpeg_enc.c @@ -99,7 +99,8 @@ static void rockchip_vpu2_jpeg_enc_set_buffers(struct hantro_dev *vpu, vepu_write_relaxed(vpu, size_left, VEPU_REG_STR_BUF_LIMIT); for (i = 0; i < num_planes; i++) { - src = vb2_dma_contig_plane_dma_addr(src_buf, i); + src = vb2_dma_contig_plane_dma_addr(src_buf, i) + + src_buf->planes[i].data_offset; vepu_write_relaxed(vpu, src, __vepu_reg_addr_for_plane(i)); } }
This accommodates planes that are backed by a single dmabuf. Signed-off-by: Andri Yngvason <andri@yngvason.is> --- drivers/media/platform/verisilicon/rockchip_vpu2_hw_jpeg_enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)