How do I add support for custom resolutions to the Video Timing Table?
The default timing table in the video common library covers many of the common timing tables, but how do I add a resolution for my application?
Bare-metal Application
The Video Timing is defined in the XIDC_timings_table.c file of the Video Common library. It has an API for creating a custom resolution table and registering it.
Here is an example of how to register a specific resolution.
Both 1 and 2 can be placed wherever the constant declarations are made, such as in a .h file, however 3 will need to be done at run time.
1) Assign Mode ID Enumeration. These must be greater than the XVIDC_VM_CUSTOM constant.
2) Create a custom table with entries for each of the custom resolutions that the user wants to support.
3) The user will then need to register this table in their application.
This can be done prior to initializing peripherals.
Linux Application
The Video Timing information is defined in https://github.com/Xilinx/linux-xlnx/blob/master/drivers/gpu/drm/drm_edid.c.
User needs to add new resolution in static const struct drm_display_mode drm_dmt_modes[] = {}
/* 0x59 - 1440x2560@50Hz 16:9 */ //customer size
{ DRM_MODE("1440x2560", DRM_MODE_TYPE_DRIVER, 204792, 1440, 1510,
1545, 1590, 0, 2560, 2572, 2574, 2576, 0,
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC) },
Also add new resolution in static const struct drm_display_mode edid_cea_modes[] = {}
/* 108 - 1440x2560@50Hz 16:9 */ //customer size
{ DRM_MODE("1440x2560", DRM_MODE_TYPE_DRIVER, 204792, 1440, 1510,
1545, 1590, 0, 2560, 2572, 2574, 2576, 0,
DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC),
.vrefresh = 50, .picture_aspect_ratio = HDMI_PICTURE_ASPECT_NONE, },
Now rebuild the kernel.
Answer Number | Answer Title | Version Found | Version Resolved |
---|---|---|---|
54546 | HDMI 1.4/2.0 Receiver (RX) Subsystem - Release Notes and Known Issues for the Vivado 2015.1 tool and later versions | N/A | N/A |
AR# 68227 | |
---|---|
Date | 10/23/2020 |
Status | Active |
Type | General Article |
IP |