UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor reuvena
Visitor
440 Views
Registered: ‎11-13-2018

DPDMA Example design in RGB888 not working

Jump to solution

Hello,

I am running the DPDMA Video Example on the ZCU102.

The Example is running fine and I get 1920x1080 Black and Green display.

When I change the example design from RGBA to RGB888 and run again the design hangs and do not reach the exit.

Here are the changes that I made:

 

	/* Set the format graphics frame for DPDMA*/
//	Status = XDpDma_SetGraphicsFormat(DpDmaPtr, RGBA8888);
	Status = XDpDma_SetGraphicsFormat(DpDmaPtr, RGB888_GFX);
	if (Status != XST_SUCCESS) {
			return XST_FAILURE;
	}
	/* Set the format graphics frame for Video Pipeline*/
//	Status = XAVBuf_SetInputNonLiveGraphicsFormat(AVBufPtr, RGBA8888);
	Status = XAVBuf_SetInputNonLiveGraphicsFormat(AVBufPtr, RGB888_GFX);
	if (Status != XST_SUCCESS) {
			return XST_FAILURE;
	}

In addition I changed the buffer size:

#define BUFFERSIZE			1920 * 1080 * 3		/* HTotal * VTotal * BPP */
#define LINESIZE			1920 * 3			/* HTotal * BPP */
#define STRIDE				LINESIZE			/* The stride value should
													be aligned to 256*/

I think that my problem is that I am not calculating correctly the buffer size. I understand that I need to change from 4 Byte per pixel to 3 Byte per pixel. 

Or I missed additional configuration that need to be changed.

 

Thank you in advance for your help,

Reuven Aboudi

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor reuvena
Visitor
254 Views
Registered: ‎11-13-2018

Re: DPDMA Example design in RGB888 not working

Jump to solution

Yes I need to change the Alpha setting to enable the global Alpha to stream #1

 

	/* Disable the global alpha, since we are using the pixel based alpha */
//	XAVBuf_SetBlenderAlpha(AVBufPtr, 0, 0);
	/* Enable the global alpha. Set to 255, in order to passes stream1 */
	XAVBuf_SetBlenderAlpha(AVBufPtr, 255, 1);

But still I had a black screen at the DisplaPort, because of the DMA setting (descriptor settings).

I found out the at the resolution that I was working, 1080p, the line size for RGB888 was not aligned to 256.

1920 x 3 /256 = 22.5

So I need to change the Value to 5888

#define BUFFERSIZE			1920 * 3 * 1080		/* HTotal * VTotal * BPP */
#define LINESIZE			1920 * 3			/* HTotal * BPP */
//#define STRIDE				LINESIZE			/* The stride value should be aligned to 256*/
#define STRIDE				5888			/* The stride value should be aligned to 256*/

Now the DisplayPort example for RGB888 is working fine.

Thank you,

Reuven

 

5 Replies
Moderator
Moderator
331 Views
Registered: ‎11-09-2015

Re: DPDMA Example design in RGB888 not working

Jump to solution

Hi @reuvena,

I think there is something else you are missing. In the example, the graphic overlay is generated on the beginning of the application (as a soft pattern generator).

	xil_printf("Generating Overlay.....\n\r");
	GraphicsOverlay(Frame, RunCfgPtr);

This is generated in RGBA

Thus, when you are reading in RGB888, the color formats probably do not match, causing issue in the application.

Hope that helps,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Visitor reuvena
Visitor
299 Views
Registered: ‎11-13-2018

Re: DPDMA Example design in RGB888 not working

Jump to solution

Yes, The GraphicsOverlay() function was the reason for the program to hung.

But now the program is running till exit but I only get a black screen.

The monitor recognize the correct resolution but all the screen is in black color and I can not get any color at the output.

If I use the RGB888 there are no Alpha values for each pixel and pixel. So maybe this is the problem? But I do not know how the Alpha can be set to all the pixels?

Thank you in advance!

Reuven

 

0 Kudos
Moderator
Moderator
280 Views
Registered: ‎11-09-2015

Re: DPDMA Example design in RGB888 not working

Jump to solution

HI @reuvena,

Now that you are not in RGBA anymore you might need to disable the overlay.


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos
Highlighted
Visitor reuvena
Visitor
255 Views
Registered: ‎11-13-2018

Re: DPDMA Example design in RGB888 not working

Jump to solution

Yes I need to change the Alpha setting to enable the global Alpha to stream #1

 

	/* Disable the global alpha, since we are using the pixel based alpha */
//	XAVBuf_SetBlenderAlpha(AVBufPtr, 0, 0);
	/* Enable the global alpha. Set to 255, in order to passes stream1 */
	XAVBuf_SetBlenderAlpha(AVBufPtr, 255, 1);

But still I had a black screen at the DisplaPort, because of the DMA setting (descriptor settings).

I found out the at the resolution that I was working, 1080p, the line size for RGB888 was not aligned to 256.

1920 x 3 /256 = 22.5

So I need to change the Value to 5888

#define BUFFERSIZE			1920 * 3 * 1080		/* HTotal * VTotal * BPP */
#define LINESIZE			1920 * 3			/* HTotal * BPP */
//#define STRIDE				LINESIZE			/* The stride value should be aligned to 256*/
#define STRIDE				5888			/* The stride value should be aligned to 256*/

Now the DisplayPort example for RGB888 is working fine.

Thank you,

Reuven

 

Moderator
Moderator
247 Views
Registered: ‎11-09-2015

Re: DPDMA Example design in RGB888 not working

Jump to solution

Hi @reuvena,

Great. Good to know that it is working for you now and thank you for sharing your solution (you deserve a kudos ;) ).

Could you kindly mark your last reply as accepted solution to close the topic?

Thanks and Regards,


Florent
Product Application Engineer - Xilinx Technical Support EMEA
**~ Don't forget to reply, give kudos, and accept as solution.~**
0 Kudos