cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
4,748 Views
Registered: ‎09-30-2015

Vpss - custom resolution problem

Hi,

I have problem, with custom resolution. Follow this guide: https://www.xilinx.com/support/answers/68227.html . This is my custom resolutions definition:

 

 

typedef enum {
	XVIDC_VM_768x576_50_I = (XVIDC_VM_CUSTOM + 1),
	XVIDC_VM_768x576_50_P = (XVIDC_VM_768x576_50_I + 1),
    XVIDC_CM_NUM_SUPPORTED
} XVIDC_CUSTOM_MODES;

/* Create entry for each mode in the custom table */
const XVidC_VideoTimingMode XVidC_MyVideoTimingMode[(XVIDC_CM_NUM_SUPPORTED - (XVIDC_VM_CUSTOM + 1))] =
{
	{ XVIDC_VM_768x576_50_I, "768x576@50Hz (I)", XVIDC_FR_50HZ,
		{768, 12, 63, 69, 864, 0,
		288, 2, 3, 19, 312, 3, 3, 19, 313, 0} },
	{ XVIDC_VM_768x576_50_P, "768x576@50Hz", XVIDC_FR_50HZ,
		{768, 12, 64, 68, 864, 0,
		 576, 5, 5, 39, 625, 0, 0, 0, 0, 0} },
};

 Registration:

 

 

	/* User registers custom timing table */
	xil_printf("INFO> Registering Custom Timing Table with %d entries \r\n", (XVIDC_CM_NUM_SUPPORTED - (XVIDC_VM_CUSTOM + 1)));
	status = XVidC_RegisterCustomTimingModes(XVidC_MyVideoTimingMode, (XVIDC_CM_NUM_SUPPORTED - (XVIDC_VM_CUSTOM + 1)));
	if (status != XST_SUCCESS) {
		xil_printf("ERR: Unable to register custom timing table\r\n\r\n");
	}

Problem is in function XVprocSs_SetSubsystemConfig which return XST_FAILURE. I found problem in file xvprocss.c (function - static int ValidateSubsystemConfig(XVprocSs *InstancePtr) this code:

 

 

/* Check if Subsystem HW Configuration can process requested resolution*/
if(((StrmIn->PixPerClk == XVIDC_PPC_1) &&
(StrmIn->VmId > XVIDC_VM_3840x2160_30_P)) ||
((StrmOut->PixPerClk == XVIDC_PPC_1) &&
(StrmOut->VmId > XVIDC_VM_3840x2160_30_P) )) {
XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VPSS, XVPROCSS_EDAT_VPSS_RESBAD);
return(XST_FAILURE);
}

This test always return XST_FAILURE regardless of custom resolution is correct or not, because user resolution ID ((XVIDC_VM_CUSTOM + 1)) was greater then XVIDC_VM_3840x2160_30_P. When I comment this test, VPSS was working correctly with my user resolution.

.  

Regards

Kulich 

0 Kudos
6 Replies
Highlighted
Xilinx Employee
Xilinx Employee
4,717 Views
Registered: ‎05-07-2015

Re: Vpss - custom resolution problem

Hi @kulich

 

Thanks for reporting this to us.
So by removing the following checks  from the If statement , you were able to work with   registered customer resolutions without any issues right?


StrmIn->VmId > XVIDC_VM_3840x2160_30_P

StrmOut->VmId > XVIDC_VM_3840x2160_30_P

 

Thanks
Bharath
--------------------------------------------------​--------------------------------------------
Please mark the Answer as "Accept as solution" if information provided addresses your query/concern.
Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Highlighted
Contributor
Contributor
4,711 Views
Registered: ‎09-30-2015

Re: Vpss - custom resolution problem

Yes,

without this checks, my custom resolution was working without problem. This is my hotfix in file xvprocss.c

  /* Check if Subsystem HW Configuration can process requested resolution*/
#if 0
  if(((StrmIn->PixPerClk == XVIDC_PPC_1) &&
	  (StrmIn->VmId > XVIDC_VM_3840x2160_30_P)) ||
	  ((StrmOut->PixPerClk == XVIDC_PPC_1) &&
	  (StrmOut->VmId > XVIDC_VM_3840x2160_30_P) )) {
    XVprocSs_LogWrite(InstancePtr, XVPROCSS_EVT_CFG_VPSS, XVPROCSS_EDAT_VPSS_RESBAD);
	return(XST_FAILURE);
  }
#endif

Regards

Kulich

Highlighted
Xilinx Employee
Xilinx Employee
4,676 Views
Registered: ‎05-07-2015

Re: Vpss - custom resolution problem

HI @kulich

 

Reported this to XIlinx development (via CR-968766). They will take the appropriate corrective action.
Thanks for reporting this to us.

Thanks
Bharath
--------------------------------------------------​--------------------------------------------
Please mark the Answer as "Accept as solution" if information provided addresses your query/concern.
Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos
Highlighted
Newbie
Newbie
4,623 Views
Registered: ‎02-13-2017

Re: Vpss - custom resolution problem

Heyii Kulich .. thanks fro the post and it was really helpful for me.
But I am trying to add custom resolution to accomodate 8 small screen in a single window. I have added below line for 320x180 resolution output,
--------------

const XVidC_VideoTimingMode XVidC_MyVideoTimingMode[(XVIDC_CM_NUM_SUPPORTED
- (XVIDC_VM_CUSTOM + 1))] = { { XVIDC_VM_320x180_60_I,
"320x180@60Hz (P)", XVIDC_FR_60HZ, { 320, 20, 44, 148, 532, 1,
180, 4, 5, 36, 225, 0, 0, 0, 0, 1 } } };

--------------

My question is, how to calculate the values for the custom table input? The lines above are given values with a wild guess of mine. I tested and got output. It works!!!! But i do not know how??? Can you please help me how to fill the array of timing mode for a custom resolution.

Thank You.

 

 

0 Kudos
Highlighted
Contributor
Contributor
4,568 Views
Registered: ‎09-30-2015

Re: Vpss - custom resolution problem

Hello,

good question. In my opinion Xilinx video timing struct is similar to this http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/video/display-timing.txt?v=3.12 . Your resolution is working, because VPSS driver use only values HActive and VActive from struct XVidC_VideoTiming (xvidc.h). This make sense, because AxiStream transport only active pixels area and no blanking. XVidC_VideoTiming is complex, VPSS use only small part (this may change during time), but other values you can use for configuration Video Timing Controller.

Kulich

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
4,535 Views
Registered: ‎05-07-2015

Re: Vpss - custom resolution problem

HI @kulich

 

This has been fixed in the 2017.1 release of the vivado/SDK drivers.
Thanks again for pointing this out.

Thanks
Bharath
--------------------------------------------------​--------------------------------------------
Please mark the Answer as "Accept as solution" if information provided addresses your query/concern.
Give Kudos to a post which you think is helpful.
--------------------------------------------------​-------------------------------------------
0 Kudos