cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tschesnok
Observer
Observer
201 Views
Registered: ‎07-23-2019

VDMA is Scrolling input image (no regard to V-Sync)

I'm trying to figure out if I have two issues or just one.

I'm customizing a DVI2RGB IP (Digilent) to swap pins after the BUFDS since my PCB has swapped TMDS lines (these are the only changes). My output currently seems to be in CMY color space - so definitely messed up. (CMY Not YUV!).

But ALSO my image is scrolling. I have determined that this is the input image - not the output image - that is scrolling. At 1080p is seems to be scrolling down at about 160 lines per second. If I change the resolution it scrolls up perhaps 3 times faster if Y=1050... so the VDMA is simply wrapping the buffer at 1080 with no regard to V-sync. (or my DVI2RGB is not putting out a V-sync).

Is my setup correct - has anyone seen this before?

TMDS -> DVI2RGB -> Video_to_AXI(no timing control used) -> VDMA -> DDR3  -> same VDMA -> AXI_to_Video(with timing control) -> TI Chipset -> HDMIOut.

VDMA has only one FB and in and out write/read from same buffer at different rates.. don't care about overlapping. 

All driver settings are the same for read and write in the Microblaze VDMA setup.

Did I hook something up wrong or is the my DVI2RGB not outputting a v-sync. (which now that I write this.. I will check

0 Kudos
1 Reply
tschesnok
Observer
Observer
190 Views
Registered: ‎07-23-2019

DVI2RGB is putting out a v-sync of 60.001hz - solid - according to my scope! So I'm doing something wrong with my VDMA setup! Please Help

VDMA Advanced settings = none for glock. (I don't have more than one buffer)

C Code:

// setup the DMA buffer to read from the FB
myVDMAConfig = XAxiVdma_LookupConfig(XPAR_AXI_VDMA_0_DEVICE_ID);
status = XAxiVdma_CfgInitialize(&myVDMA, myVDMAConfig, myVDMAConfig->BaseAddress);
if(status != XST_SUCCESS){
xil_printf("VDMA Initialization failed");
return XST_FAILURE;
}

ReadCfg.VertSizeInput = FRAME_SIZE_Y;
ReadCfg.HoriSizeInput = FRAME_SIZE_X*3;
ReadCfg.Stride = FRAME_SIZE_X*3;
ReadCfg.FrameDelay = 0;
ReadCfg.EnableCircularBuf = 1;
ReadCfg.EnableSync = 1;
ReadCfg.PointNum = 0;
ReadCfg.EnableFrameCounter = 0;
ReadCfg.FixedFrameStoreAddr = 0;
status = XAxiVdma_DmaConfig(&myVDMA, XAXIVDMA_READ, &ReadCfg);
if (status != XST_SUCCESS) {
xil_printf("read channel config failed %d\r\n", status);
return status;
}

status = XAxiVdma_DmaConfig(&myVDMA, XAXIVDMA_WRITE, &ReadCfg);
if (status != XST_SUCCESS) {
xil_printf("Write channel config failed %d\r\n", status);
return status;
}

//Addr = (u32)&(Buffer[0]);

for(Index = 0; Index < myVDMA.MaxNumFrames; Index++) {
ReadCfg.FrameStoreStartAddr[Index] = (u32 ) FB; // converting pointer into address
//Addr += FrameSize;
}

status = XAxiVdma_DmaSetBufferAddr(&myVDMA, XAXIVDMA_READ,ReadCfg.FrameStoreStartAddr);
if (status != XST_SUCCESS) {
xil_printf("Read channel set Read buffer address failed %d\r\n", status);
return XST_FAILURE;
}

status = XAxiVdma_DmaSetBufferAddr(&myVDMA, XAXIVDMA_WRITE,ReadCfg.FrameStoreStartAddr);
if (status != XST_SUCCESS) {
xil_printf("Read channel set Write buffer address failed %d\r\n", status);
return XST_FAILURE;
}


XAxiVdma_IntrEnable(&myVDMA, XAXIVDMA_IXR_COMPLETION_MASK, XAXIVDMA_READ);
XAxiVdma_IntrEnable(&myVDMA, XAXIVDMA_IXR_COMPLETION_MASK, XAXIVDMA_WRITE);

status = XAxiVdma_DmaStart(&myVDMA,XAXIVDMA_READ);
if (status != XST_SUCCESS) {
if(status == XST_VDMA_MISMATCH_ERROR)
xil_printf("DMA Mismatch Error\r\n");
return XST_FAILURE;
}

status = XAxiVdma_DmaStart(&myVDMA,XAXIVDMA_WRITE);
if (status != XST_SUCCESS) {
if(status == XST_VDMA_MISMATCH_ERROR)
xil_printf("DMA Mismatch Error\r\n");
return XST_FAILURE;
}

0 Kudos