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: 
Highlighted
Adventurer
Adventurer
181 Views
Registered: ‎10-07-2016

HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Dear community members,

I just created the "TX Only" example design, based on the HDMI2.0 Tx subsystem V3.1.  I was able to compile and start the "Tx only" example desing on my KC705. When I go into sub menu "r", I'm able to adjust several resolutions. When I look to the example source code (xvidc_timings_table.c), I can see, that there is a structure defined (XVidC_VideoTimingMode), which contains detailed information about the timing, like H/V-Active, H/V-Frontporch, H/V-SyncWdith, H/V-Total, etc. So there are pre-defined timings available in this structure, which are used, when I select a certain resolution and refresh-rate.

Unfortunately, for my current project, I'm forced to use a custom timing, which is not in listed in this structure. Even more, I do not know the detailed timing information during compile time. So I cannot simply extend this structure. Instead, I get the detailed timing information during runtime from a separate CPU. As a sequence, I'm looking for a way, how I can program the HDMI Tx Subsystem during runtime, by using the detailed timing information, provided from a separate CPU.

Is there a way to overcome this issue?

Kind regards

Steffen

 

 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
68 Views
Registered: ‎10-07-2016

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hello xud,

okay, sounds logical. Thank you for your help.

Best regards

Steffen

0 Kudos
9 Replies
Adventurer
Adventurer
176 Views
Registered: ‎10-07-2016

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Dear community members,

I just want to update my latest findings:

In the example code, I have found out that the following API function is used, to setup the timing:

u32 XV_HdmiTxSs_SetStream(XV_HdmiTxSs *InstancePtr,
    XVidC_VideoMode VideoMode,
    XVidC_ColorFormat ColorFormat,
    XVidC_ColorDepth Bpc,
    XVidC_3DInfo *Info3D);

With this function there is  porgrammed a pre-defined timing, which is referenced by the parameter VideoMode. So I cannot use this function for my application.

Instead, I have found another API function, which is maybe the correct one for my application:

void XV_HdmiTxSs_SetVideoStream(XV_HdmiTxSs *InstancePtr, XVidC_VideoStream VidStream);

The VideoStream structure looks like below:

typedef struct {
    XVidC_ColorFormat      ColorFormatId;
    XVidC_ColorDepth      ColorDepth;
    XVidC_PixelsPerClock  PixPerClk;
    XVidC_FrameRate          FrameRate;
    XVidC_AspectRatio      AspectRatio;
    u8                      IsInterlaced;
    u8                      Is3D;
    XVidC_3DInfo          Info_3D;
    XVidC_VideoMode          VmId;
    XVidC_VideoTiming      Timing;
} XVidC_VideoStream;

Can it be that I can make use of a custom timing, when I set VmId to XVIDC_VM_CUSTOM, and fill out the Timing structure with my detailed timing information?

typedef struct {
    u16 HActive;
    u16 HFrontPorch;
    u16 HSyncWidth;
    u16 HBackPorch;
    u16 HTotal;
    u8 HSyncPolarity;
    u16 VActive;
    u16 F0PVFrontPorch;
    u16 F0PVSyncWidth;
    u16 F0PVBackPorch;
    u16 F0PVTotal;
    u16 F1VFrontPorch;
    u16 F1VSyncWidth;
    u16 F1VBackPorch;
    u16 F1VTotal;
    u8 VSyncPolarity;
} XVidC_VideoTiming;

Kind regards

Steffen

 

0 Kudos
Xilinx Employee
Xilinx Employee
146 Views
Registered: ‎08-02-2007

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hi @stgateizo

Please refer to AR : https://www.xilinx.com/support/answers/68227.html

Video timing table file is the one that you can add your custom timing

0 Kudos
Adventurer
Adventurer
135 Views
Registered: ‎10-07-2016

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hello xud,

thank you for your feedback. I know that it is possible to extend the video mode table, but as I mentoined before, I do not know the timing at compile time!

I get the timing information during runtime!

Question. Is there a way to adjust the timing during runtime, by using the parameters, V/H-frontporch, V/H-sync_width, V/H-active, V/H-total, Pixelclock, etc. ???

Kind regards

Steffen

 

0 Kudos
Xilinx Employee
Xilinx Employee
117 Views
Registered: ‎08-02-2007

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hi @stgateizo

Your design is TX only, can you elaborate on how do you get the runtime video timing?

In our passthrough design, the TX video timing is copied from RX parameters(by using following lines), which is detected from HDMI RX at the runtime

// Copy video parameters 

*HdmiTxSsVidStreamPtr = *HdmiRxSsVidStreamPtr;

XV_HdmiTxSs_SetVideoIDCode(&HdmiTxSs,XV_HdmiRxSs_GetVideoIDCode(HdmiRxSsPtr));

XV_HdmiTxSs_SetVideoStreamType(&HdmiTxSs, XV_HdmiRxSs_GetVideoStreamType(HdmiRxSsPtr));

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

XV_HdmiTxSs_VtcSetup(XV_HdmiTxSs *HdmiTxSsPtr) is used to set up TX Video Timing parameters.

So you should be able to use it to copy the timing information from your custom timing.

 

0 Kudos
Adventurer
Adventurer
108 Views
Registered: ‎10-07-2016

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hello xud,

please see my comments below:

[xud] Your design is TX only, can you elaborate on how do you get the runtime video timing?

[Steffen] Yes, we are faced to a TX only design. In the FPGA, there is implemented an HDMI Tx Subsystem, which is programmed by an internal Microblaze. This Microblaze can communicate via I2C with an external CPU-System. This external CPU-System shall controll the HDMI output timing (all H and V parameters, as well as the pixel-clock). The internal Microblaze will receive a command from the external CPU system via I2C during runtime, which tells the Microblaze how to adjust the HDMI output timing. I hope its clear what I wannt to do?

[xud] In our passthrough design, the TX video timing is copied from RX timing (by using following lines), which is detected from HDMI RX at the runtime

[Steffen] Yes, you are right. The pass-through design, also gets the output timing information during runtime. So it is maybe the best design to anaylze how the output timing is set. The difference between the pass-through design and my design is, that the input parameters for the two API functions you mentoined will be provided by API calls available in the HDMI Rx subsystem.

When I look to the fist API function

XV_HdmiTxSs_SetVideoIDCode(&HdmiTxSs,XV_HdmiRxSs_GetVideoIDCode(HdmiRxSsPtr));

there is called XV_HdmiRxSs_GetVideoIDCode(HdmiRxSsPtr) to get the input parameter.
When I analyze this function, it just returns the Video Identification Code named Vid. The Vids are defined in xv_hdmic.c:

* This table contains the attributes for various standard resolutions.
* Each entry is of the format:
* 1) Resolution ID
* 2) Video Identification Code.
*/
const XHdmiC_VicTable VicTable[VICTABLE_SIZE] = {
    {XVIDC_VM_640x480_60_P, 1},     // Vic 1
    {XVIDC_VM_720x480_60_P, 2},     // Vic 2
    {XVIDC_VM_720x480_60_P, 3},     // Vic 3
    {XVIDC_VM_1280x720_60_P, 4},    // Vic 4
    {XVIDC_VM_1920x1080_60_I, 5},   // Vic 5
    {XVIDC_VM_1440x480_60_I, 6},    // Vic 6
    {XVIDC_VM_1440x480_60_I, 7},    // Vic 7

    {XVIDC_VM_1920x1080_60_P, 16},  // Vic 16
    {XVIDC_VM_720x576_50_P, 17},    // Vic 17
    {XVIDC_VM_720x576_50_P, 18},    // Vic 18
    {XVIDC_VM_1280x720_50_P, 19},   // Vic 19
    {XVIDC_VM_1920x1080_50_I, 20},  // Vic 20
    {XVIDC_VM_1440x576_50_I, 21},   // Vic 21
    {XVIDC_VM_1440x576_50_I, 22},   // Vic 22

    // 1680 x 720
    {XVIDC_VM_1680x720_50_P, 82},   // Vic 82
    {XVIDC_VM_1680x720_60_P, 83},   // Vic 83
    {XVIDC_VM_1680x720_100_P, 84},  // Vic 84
    {XVIDC_VM_1680x720_120_P, 85},  // Vic 85

    // 1920 x 1080
    {XVIDC_VM_1920x1080_24_P, 32},  // Vic 32
    {XVIDC_VM_1920x1080_25_P, 33},  // Vic 33
    {XVIDC_VM_1920x1080_30_P, 34},  // Vic 34
    {XVIDC_VM_1920x1080_50_P, 31},  // Vic 31
    {XVIDC_VM_1920x1080_100_P, 64}, // Vic 64
    {XVIDC_VM_1920x1080_120_P, 63}, // Vic 63

    // 2560 x 1080
    {XVIDC_VM_2560x1080_50_P, 89},  // Vic 89
    {XVIDC_VM_2560x1080_60_P, 90},  // Vic 89
    {XVIDC_VM_2560x1080_100_P, 91}, // Vic 91
    {XVIDC_VM_2560x1080_120_P, 92}, // Vic 92

    // 3840 x 2160
    {XVIDC_VM_3840x2160_24_P, 93},  // Vic 93
    {XVIDC_VM_3840x2160_25_P, 94},  // Vic 94
    {XVIDC_VM_3840x2160_30_P, 95},  // Vic 95
    {XVIDC_VM_3840x2160_50_P, 96},  // Vic 96
    {XVIDC_VM_3840x2160_60_P, 97},  // Vic 97

    // 4096 x 2160
    {XVIDC_VM_4096x2160_24_P, 98},  // Vic 98
    {XVIDC_VM_4096x2160_25_P, 99},  // Vic 99
    {XVIDC_VM_4096x2160_30_P, 100}, // Vic 100
    {XVIDC_VM_4096x2160_50_P, 101}, // Vic 101
    {XVIDC_VM_4096x2160_60_P, 102}  // Vic 102
};

This brings me to my first question. What shall I enter here, if the timing is not confom to one of those listed above, or if it is not compliant to a CTA timing ?

Best regards

0 Kudos
Xilinx Employee
Xilinx Employee
103 Views
Registered: ‎08-02-2007

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

 Hi @stgateizo

I think you have posted the message before I edit my last reply.

XV_HdmiTxSs_VtcSetup(XV_HdmiTxSs *HdmiTxSsPtr) is used to set up TX Video Timing parameters.

So you should be able to use it to copy the timing information from your custom timing.

Adventurer
Adventurer
78 Views
Registered: ‎10-07-2016

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hello xud,

thank you for your help, but unfortunately, you didn't answered my initial question in the previous mail.

You said, that I have to call the following function:

XV_HdmiTxSs_SetVideoIDCode(&HdmiTxSs,XV_HdmiRxSs_GetVideoIDCode(HdmiRxSsPtr));

Since I have no HDMI Rx Subsystem, I need to change this line of code to the following line of code:

XV_HdmiTxSs_SetVideoIDCode(&HdmiTxSs, VID);

My question was, what shall I use for the parameter VID in the case, if the timing I want to adjust is not compliant to any VIC timing as specified by the CTA-Standard ?

See VICs on page 16-27 in CTA-861-F Standard => https://glenwing.github.io/docs/CTA-861-F.pdf

Do you understand my question, or shall I try to explain it in more detail?

Best regards

Steffen

0 Kudos
Xilinx Employee
Xilinx Employee
73 Views
Registered: ‎08-02-2007

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hi @stgateizo

If VIC isn't defined in the spec CEA_861_F spec, we consider it as custom mode (XVIDC_VM_CUSTOM).

You can use XVIDC_VM_CUSTOM as VIC code in this case. 

 

0 Kudos
Adventurer
Adventurer
69 Views
Registered: ‎10-07-2016

Re: HDMI2.0 TX Subsystem: How to adjust a custom timing

Jump to solution

Hello xud,

okay, sounds logical. Thank you for your help.

Best regards

Steffen

0 Kudos