[PATCH 2/2] media: verisilicon: rockchip_vpu2_hw_jpeg_enc: Add data_offset to source addresses
Andri Yngvason
andri at yngvason.is
Tue May 9 09:20:19 PDT 2023
þri., 9. maí 2023 kl. 15:03 skrifaði Andri Yngvason <andri at yngvason.is>:
>
> This accommodates planes that are backed by a single dmabuf.
>
> Signed-off-by: Andri Yngvason <andri at yngvason.is>
> ---
> 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
>
I see now that there is already a patch submitted for this:
https://marc.info/?l=linux-arm-kernel&m=167992346404789&w=2
Let's continue with that instead. I can confirm though, that setting
the offset works fine for me.
Regards,
Andri
More information about the Linux-rockchip
mailing list