[PATCH 2/2] media: verisilicon: rockchip_vpu2_hw_jpeg_enc: Add data_offset to source addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This accommodates planes that are backed by a single dmabuf.

Signed-off-by: Andri Yngvason <andri@xxxxxxxxxxx>
---
 drivers/media/platform/verisilicon/rockchip_vpu2_hw_jpeg_enc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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));
 	}
 }
-- 
2.40.1




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux