mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-23 06:43:06 +07:00
media: imx: vdic: rely on VDIC for correct field order
prepare_vdi_in_buffers() was setting up the dma pointers as if the VDIC is always programmed to receive the fields in bottom-top order, i.e. as if ipu_vdi_set_field_order() only programs BT order in the VDIC. But that's not true, ipu_vdi_set_field_order() is working correctly. So fix prepare_vdi_in_buffers() to give the VDIC the fields in whatever order they were received by the video source, and rely on the VDIC to sort out which is top and which is bottom. Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
792f061b9f
commit
6e537b58de
@ -219,26 +219,18 @@ static void __maybe_unused prepare_vdi_in_buffers(struct vdic_priv *priv,
|
||||
|
||||
switch (priv->fieldtype) {
|
||||
case V4L2_FIELD_SEQ_TB:
|
||||
prev_phys = vb2_dma_contig_plane_dma_addr(prev_vb, 0);
|
||||
curr_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0) + fs;
|
||||
next_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0);
|
||||
break;
|
||||
case V4L2_FIELD_SEQ_BT:
|
||||
prev_phys = vb2_dma_contig_plane_dma_addr(prev_vb, 0) + fs;
|
||||
curr_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0);
|
||||
next_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0) + fs;
|
||||
break;
|
||||
case V4L2_FIELD_INTERLACED_TB:
|
||||
case V4L2_FIELD_INTERLACED_BT:
|
||||
case V4L2_FIELD_INTERLACED:
|
||||
prev_phys = vb2_dma_contig_plane_dma_addr(prev_vb, 0) + is;
|
||||
curr_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0);
|
||||
next_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0) + is;
|
||||
break;
|
||||
default:
|
||||
/* assume V4L2_FIELD_INTERLACED_TB */
|
||||
prev_phys = vb2_dma_contig_plane_dma_addr(prev_vb, 0);
|
||||
curr_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0) + is;
|
||||
next_phys = vb2_dma_contig_plane_dma_addr(curr_vb, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
ipu_cpmem_set_buffer(priv->vdi_in_ch_p, 0, prev_phys);
|
||||
|
Loading…
Reference in New Issue
Block a user