DVR RDK V4.00 GA App Notes Supporting NEW Resolutions

advertisement
DVR RDK V4.00 GA App Notes Supporting NEW Resolutions
DVR RDK V4.00 GA App Notes Supporting
NEW Resolutions
Abstract
TI81xx class of devices support multiple display ports. Each display port can support different resolution,
simultaneously. The RDK provides methods to control and configure each of the display ports.
RDK has pre built support for most widely used and common set of resolutions. There could be cases where new and
custom resolution are required (i.e. the required resolution is not supported by RDK). This app note lists the steps
that are required to add new and custom resolution to the RDK.
Introduction
Display port configurations are controlled and configured by “VDIS” module of RDK McFW APIs. This module is
responsible for configuring on-chip peripherals (e.g. on-chip HDMI transmitter, HDDAC, SDDAC) and off-chip
peripherals (such as sii9022a, THS filters, etc…) that drive various displays.
Typically in TI81xx class of devices VENC drives digital or analog lines that would be required for a display. All
aspects related to a display such as pixel clock, height, width, and sync signals are generated by the VENC.
The VENCs on TI81xx devices could broadly be classified into 2 classes,
• (A) VENC generates digital video signals that might require an encoder to convert these digital signals into a
display standard that could be understood by the TV/Monitors.
• (B) VENC generates digital or analog signals that could be directly connected to a monitor / TV.
The figure below pictorially depicts different kinds on VENCs and its relation to VDIS module
1
DVR RDK V4.00 GA App Notes Supporting NEW Resolutions
Sequence of operations done to change resolution
In RDK architecture, the frames that are to be displayed on a given display port, would typically match the resolution
currently configured on the display port. i.e. If a given display port is configured for 1920X1080 @ 60 FPS, the
software/hardware (typically SWMS link) component is configured to generate a video stream of 1920 X 1080 @ 60
FPS.
When changing a resolution, depending on the VENC used for display, VENC and/or external video encoders would
require re-configuration.
The steps below should be followed to change resolution on a given display port,
1.
2.
3.
4.
Stop audio play back – If changing resolution on HDMI and audio is currently being played out
Stop connected graphics pipe line, if graphics is being used
Stop the display port
Apply the new resolution – reconfigure VDIS module for the new resolution with a call to function
Vdis_setResolution ()
5. Re-generate display layout – choose which channels to be displayed and position on the screen, including the size
of each channels.
6. Apply the new generated layout
7. Restart Display port
8. Restart Graphics – if required
9. Restart audio play back – If the display port is HDMI and audio was being played out.
Step 4 and 6 will re-configure VENCs for external and/or internal encoders as well as the software components
(SWMS link) for the new resolution.
Steps to add a “new/custom” resolution in McFW
When a new resolution is to be added, primarily, operations performed in step 4 and 6 performed in section
Sequence of operations done to change resolution should be updated to support the new resolution.
Following steps details the changes required to support a “new” resolution
• Define an enum that identifies the new resolution.
1. Update enum VSYS_VIDEO_STANDARD_E in file
\mcfw\interfaces\common_def\ti_vsys_common_def.h
2. E.g. VSYS_STD_VGA_60 is added for 640X480
3. Note, multiple standards are defined in this enum, but not all display resolutions for that standard are
supported.
4. If a standard is already defined, then no need to define a new standard. Move to next step
• Add a MACRO that describs the VENC timings.
1.
2.
3.
4.
Update in the file \mcfw\interfaces\ti_vdis_timings.h
We use Linux sysfs entry to configure the VENC, to generate desired video timings
Linux standard mode line parameters are used to describe the timings
Please refer http://processors.wiki.ti.com/index.php/
TI81XX_PSP_VPSS_Video_Driver_User_Guide#VPSS_Library:_display, section "VPSS
Library-display0:", sysfs attributes, under "timings" acronym.
5. E.g. VDIS_TIMINGS_VGA_CEA "25200,640/16/48/96,480/9/34/2,1" for 640X480
• Update VDIS module to recognize new resolution and apply new resolution.
• Function Vdis_setResolution ()
2
DVR RDK V4.00 GA App Notes Supporting NEW Resolutions
1. In file \mcfw\src_linux\mcfw_api\ti_vdis.c checks if the resolution is supported, if supported,
reconfigure the VENC for the specified resolution
2. This function will check if VENC that requires re-configuration is tied with any other VENC. If tied, the
tied VENC is also re-configured for the chosen resolution.
3. E.g. following code is added in the above function.
case VSYS_STD_VGA_60:
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS, VDIS_SYSFS_HD);
break;
• Function System_getOutSize ()
•
•
•
•
•
In file \mcfw\src_bios6\links_m3vpss\system\system_m3vpss.c
Used to specify the width / height of the frame for a given resolution.
Update this function to specify the size of frame for the new resolution.
E.g. Following code is added in the above function
Note, below code would need to be added in the same function at multiple places for each platform,
VENC
case VSYS_STD_VGA_60:
• width = 640;
• height = 480;
break;
• Function MultiCh_swMsGetOutSize ()
•
•
•
•
In file \mcfw\src_linux\mcfw_api\usecases\multich_common.c
Used to specify the width / height of a frame for SWMS component.
Update this function to specify the size of frame for the new resolution.
E.g. Following code is added in the above function
case VSYS_STD_VGA_60:
• width = 640;
• height = 480;
break;
• At this point resolution VSYS_STD_VGA_60 is supported by McFW.
Steps to add a “new/custom” resolution in McFW Demo
• Update Menu / UI to support new resolution
• Update Menu option to support new resolution
1. In file \demos\mcfw_api_demos\mcfw_demo\demo_display.c
2. Update the menu defined by string gDemo_ResolutionMenu
• If user selects new resolution, update code to handle the resolution change
1. In file \demos\mcfw_api_demos\mcfw_demo\demo_display.c
2. In function Demo_displaySettings ()
• Update function arguments for function Demo_getIntValue()
• Handle case when user selects “new” resolution
• Update SWMS to support new resolution
• In file \demos\mcfw_api_demos\mcfw_demo\demo_swms.c
• Function Demo_swMsGetOutSize (), update to return the height and width for the new resolution.
3
DVR RDK V4.00 GA App Notes Supporting NEW Resolutions
References
• 1. Linux VPSS User Guide http://processors.wiki.ti.com/index.php/
TI81XX_PSP_VPSS_Video_Driver_User_Guide#Read_This_First
Highlighting Changes Required in ti_vdis.c
The following changes highlight the changes required in display module. Please pay close attention to changes done
in function Vdis_setResolution (), In cases where one or more VENCs are tied.
Incorrect / incomplete changes will result in no display.
Section of code that precedes with “+” indicates code has been added and sections of the code that precedes with
“-“indicate code removed.
diff --git a/mcfw/src_linux/mcfw_api/ti_vdis.c b/mcfw/src_linux/mcfw_api/ti_vdis.c
index e47b623..c044102 100755
--- a/mcfw/src_linux/mcfw_api/ti_vdis.c
+++ b/mcfw/src_linux/mcfw_api/ti_vdis.c
@@ -1986,6 +1986,9 @@ Int32 Vdis_setResolution(VDIS_DEV devId, UInt32 resolution)
VDIS_SYSFS_HDMI,
+
+
VDIS_SYSFS_HDMI,
+
case VSYS_STD_SXGA_60:
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_TIMINGS_SXGA_60);
break;
case VSYS_STD_VGA_60:
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_TIMINGS_VGA_CEA);
break;
default:
printf("\n Resolution not supported for HDMI!!
\n");
break;
@@ -2079,6 +2082,10 @@ Int32 Vdis_setResolution(VDIS_DEV devId, UInt32 resolution)
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI, VDIS_TIMINGS_SXGA_60);
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_DVO2, VDIS_TIMINGS_SXGA_60);
break;
+
case VSYS_STD_VGA_60:
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI, VDIS_TIMINGS_VGA_CEA);
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_DVO2, VDIS_TIMINGS_VGA_CEA);
+
break;
default:
printf("\n Resolution not supported for this Venc!!
\n");
break;
4
DVR RDK V4.00 GA App Notes Supporting NEW Resolutions
@@ -2125,6 +2132,10 @@ Int32 Vdis_setResolution(VDIS_DEV devId, UInt32 resolution)
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI,
VDIS_TIMINGS_SXGA_60);
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDCOMP, VDIS_TIMINGS_SXGA_60);
break;
+
case VSYS_STD_VGA_60:
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI, VDIS_TIMINGS_VGA_CEA);
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDCOMP, VDIS_TIMINGS_VGA_CEA);
+
break;
default:
printf("\n Resolution not supported for this Venc!!
\n");
break;
@@ -2222,6 +2233,9 @@ Int32 Vdis_setResolution(VDIS_DEV devId, UInt32 resolution)
case VSYS_STD_576P:
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI , VDIS_TIMINGS_576P);
break;
+
case VSYS_STD_VGA_60:
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI, VDIS_TIMINGS_VGA_CEA);
+
break;
default:
printf("\n Resolution not supported for HDMI!!
\n");
break;
@@ -2275,6 +2289,10 @@ Int32 Vdis_setResolution(VDIS_DEV devId, UInt32 resolution)
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDCOMP, VDIS_TIMINGS_576P);
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI , VDIS_TIMINGS_576P);
break;
+
case VSYS_STD_VGA_60:
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDCOMP, VDIS_TIMINGS_VGA_CEA);
+
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETTIMINGS,
VDIS_SYSFS_HDMI, VDIS_TIMINGS_VGA_CEA);
+
break;
default:
printf("\n Resolution not supported for HDMI!!
\n");
break;
5
DVR RDK V4.00 GA App Notes Supporting NEW Resolutions
@@ -2290,7 +2308,7 @@ Int32 Vdis_setResolution(VDIS_DEV devId, UInt32 resolution)
}
else if (devId == VDIS_DEV_DVO2) {
/* Stop the driver, before stopping the VENC */
Vdis_hdmiCtrl_stop();
Vdis_sysfsCmd(3,VDIS_SYSFSCMD_SETVENC, VDIS_SYSFS_DVO2,
VDIS_OFF);
6
Article Sources and Contributors
Article Sources and Contributors
DVR RDK V4. 00 GA App Notes Supporting NEW Resolutions Source: http://ap-fpdsp-swapps.dal.design.ti.com/index.php?oldid=155209 Contributors: Kedarsc, SujithShivalingappa
Image Sources, Licenses and Contributors
Image:display_block_vdis.PNG Source: http://ap-fpdsp-swapps.dal.design.ti.com/index.php?title=File:Display_block_vdis.PNG License: unknown Contributors: SujithShivalingappa
7
Download