media: rockchip: rkcif fixed buf error when used dma_sg

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Icbf960fe532a746342634566f06537d0fe87fd5d
This commit is contained in:
Zefa Chen
2022-03-21 20:21:45 +08:00
committed by Tao Huang
parent d5e0728c35
commit 4979094097
2 changed files with 2 additions and 2 deletions

View File

@@ -2865,7 +2865,7 @@ static void rkcif_buf_queue(struct vb2_buffer *vb)
for (i = 0; i < fmt->mplanes; i++) {
void *addr = vb2_plane_vaddr(vb, i);
if (hw_dev->iommu_en) {
if (hw_dev->is_dma_sg_ops) {
struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, i);
cifbuf->buff_addr[i] = sg_dma_address(sgt->sgl);

View File

@@ -517,7 +517,7 @@ static void rkcif_scale_vb2_buf_queue(struct vb2_buffer *vb)
for (i = 0; i < fmt->mplanes; i++) {
void *addr = vb2_plane_vaddr(vb, i);
if (hw_dev->iommu_en) {
if (hw_dev->is_dma_sg_ops) {
struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, i);
cifbuf->buff_addr[i] = sg_dma_address(sgt->sgl);