video_common: edid: Added function headers for commenting.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
b1c3f35b17
commit
c1f33ddd8f
3 changed files with 130 additions and 14 deletions
|
@ -32,7 +32,7 @@
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @file xvidc_edid_print.c
|
* @file xvidc_edid_print_example.c
|
||||||
*
|
*
|
||||||
* Contains an example that, given a supplied base Extended Display
|
* Contains an example that, given a supplied base Extended Display
|
||||||
* Identification Data (EDID) structure, will parse, decode, and print its
|
* Identification Data (EDID) structure, will parse, decode, and print its
|
||||||
|
@ -74,6 +74,20 @@ static u8 Edid_CalculateChecksum(u8 *Data, u8 Size);
|
||||||
|
|
||||||
/*************************** Function Definitions *****************************/
|
/*************************** Function Definitions *****************************/
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure and prints its contents.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode and print.
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
* - XST_SUCCESS if the supplied base EDID has a valid EDID header.
|
||||||
|
* - XST_FAILURE otherwise. The EDID wasn't decoded further.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
u32 Edid_PrintDecodeBase(u8 *EdidRaw)
|
u32 Edid_PrintDecodeBase(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
/* Check valid header. */
|
/* Check valid header. */
|
||||||
|
@ -114,6 +128,20 @@ u32 Edid_PrintDecodeBase(u8 *EdidRaw)
|
||||||
return XST_SUCCESS;
|
return XST_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for supported video timing modes and prints all video
|
||||||
|
* timing modes that are both supported in the EDID and listed in the
|
||||||
|
* XVidC_VideoTimingModes table.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
void Edid_PrintSuppVmTable(u8 *EdidRaw)
|
void Edid_PrintSuppVmTable(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
u8 Index;
|
u8 Index;
|
||||||
|
@ -129,6 +157,18 @@ void Edid_PrintSuppVmTable(u8 *EdidRaw)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for the vendor and product ID and prints this information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintBaseVPId(u8 *EdidRaw)
|
static void Edid_PrintBaseVPId(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
char ManName[4];
|
char ManName[4];
|
||||||
|
@ -156,6 +196,19 @@ static void Edid_PrintBaseVPId(u8 *EdidRaw)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for the EDID version and revision and prints this
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintBaseVerRev(u8 *EdidRaw)
|
static void Edid_PrintBaseVerRev(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
/* EDID structure version and revision. */
|
/* EDID structure version and revision. */
|
||||||
|
@ -164,6 +217,19 @@ static void Edid_PrintBaseVerRev(u8 *EdidRaw)
|
||||||
XVidC_EdidGetStructRev(EdidRaw));
|
XVidC_EdidGetStructRev(EdidRaw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for basic display parameters and features and prints this
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintBaseBasicDisp(u8 *EdidRaw)
|
static void Edid_PrintBaseBasicDisp(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
/* Basic display parameters and features. */
|
/* Basic display parameters and features. */
|
||||||
|
@ -416,6 +482,18 @@ static void Edid_PrintBaseBasicDisp(u8 *EdidRaw)
|
||||||
xil_printf("continuous frequency.\n");
|
xil_printf("continuous frequency.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for color characteristics and prints this information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintColorChar(u8 *EdidRaw)
|
static void Edid_PrintColorChar(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
xil_printf("Color characterisitics:\n");
|
xil_printf("Color characterisitics:\n");
|
||||||
|
@ -445,6 +523,19 @@ static void Edid_PrintColorChar(u8 *EdidRaw)
|
||||||
FLOAT_FRAC_TO_U32(XVidC_EdidGetCcWhiteY(EdidRaw), 1000000000));
|
FLOAT_FRAC_TO_U32(XVidC_EdidGetCcWhiteY(EdidRaw), 1000000000));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for supported established timings and prints this
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintEstTimings(u8 *EdidRaw)
|
static void Edid_PrintEstTimings(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
xil_printf("Established timings:\n");
|
xil_printf("Established timings:\n");
|
||||||
|
@ -503,9 +594,20 @@ static void Edid_PrintEstTimings(u8 *EdidRaw)
|
||||||
XVidC_EdidGetTimingsMan(EdidRaw));
|
XVidC_EdidGetTimingsMan(EdidRaw));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for supported standard timings and prints this information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintStdTimings(u8 *EdidRaw)
|
static void Edid_PrintStdTimings(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
/* Standard timings. */
|
|
||||||
u8 Index;
|
u8 Index;
|
||||||
|
|
||||||
xil_printf("Standard timings:\n");
|
xil_printf("Standard timings:\n");
|
||||||
|
@ -522,6 +624,19 @@ static void Edid_PrintStdTimings(u8 *EdidRaw)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function decodes the supplied base Extended Display Identification Data
|
||||||
|
* (EDID) structure for the preferred timing mode (PTM) and prints its timing
|
||||||
|
* information.
|
||||||
|
*
|
||||||
|
* @param EdidRaw is the base EDID structure to decode.
|
||||||
|
*
|
||||||
|
* @return None.
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static void Edid_PrintPtm(u8 *EdidRaw)
|
static void Edid_PrintPtm(u8 *EdidRaw)
|
||||||
{
|
{
|
||||||
u8 *Ptm;
|
u8 *Ptm;
|
||||||
|
@ -605,6 +720,18 @@ static void Edid_PrintPtm(u8 *EdidRaw)
|
||||||
"Yes." : "No (progressive).");
|
"Yes." : "No (progressive).");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************************/
|
||||||
|
/**
|
||||||
|
* This function calculates a checksum.
|
||||||
|
*
|
||||||
|
* @param Data is a pointer to the data to calculate the checksum on.
|
||||||
|
* @param Size the number of bytes of Data to calculate the checksum on.
|
||||||
|
*
|
||||||
|
* @return The checksum value (truncated to a 8 bits).
|
||||||
|
*
|
||||||
|
* @note None.
|
||||||
|
*
|
||||||
|
*******************************************************************************/
|
||||||
static u8 Edid_CalculateChecksum(u8 *Data, u8 Size)
|
static u8 Edid_CalculateChecksum(u8 *Data, u8 Size)
|
||||||
{
|
{
|
||||||
u8 Index;
|
u8 Index;
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @file xvidc_edid_print.h
|
* @file xvidc_edid_print_example.h
|
||||||
*
|
*
|
||||||
* Contains an example that, given a supplied base Extended Display
|
* Contains an example that, given a supplied base Extended Display
|
||||||
* Identification Data (EDID) structure, will parse, decode, and print its
|
* Identification Data (EDID) structure, will parse, decode, and print its
|
||||||
|
|
|
@ -59,7 +59,6 @@
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function calculates pixel clock based on the inputs.
|
* This function calculates pixel clock based on the inputs.
|
||||||
*
|
*
|
||||||
* @param HTotal specifies horizontal total.
|
* @param HTotal specifies horizontal total.
|
||||||
|
@ -78,7 +77,6 @@ u32 XVidC_GetPixelClockHzByHVFr(u32 HTotal, u32 VTotal, u8 FrameRate)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function calculates pixel clock from video mode.
|
* This function calculates pixel clock from video mode.
|
||||||
*
|
*
|
||||||
* @param VmId specifies the resolution id.
|
* @param VmId specifies the resolution id.
|
||||||
|
@ -118,7 +116,6 @@ u32 XVidC_GetPixelClockHzByVmId(XVidC_VideoMode VmId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function check input video mode is interlaced/progressive.
|
* This function check input video mode is interlaced/progressive.
|
||||||
*
|
*
|
||||||
* @param VmId specifies the resolution id.
|
* @param VmId specifies the resolution id.
|
||||||
|
@ -141,7 +138,6 @@ XVidC_VideoFormat XVidC_GetVideoFormat(XVidC_VideoMode VmId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function returns the Video Mode ID that matches the detected input
|
* This function returns the Video Mode ID that matches the detected input
|
||||||
* width, height, frame rate and I/P flag
|
* width, height, frame rate and I/P flag
|
||||||
*
|
*
|
||||||
|
@ -244,7 +240,6 @@ XVidC_VideoMode XVidC_GetVideoModeId(u32 Width, u32 Height, u32 FrameRate,
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function returns the pointer to video mode data at index provided.
|
* This function returns the pointer to video mode data at index provided.
|
||||||
*
|
*
|
||||||
* @param VmId specifies the resolution id.
|
* @param VmId specifies the resolution id.
|
||||||
|
@ -289,7 +284,6 @@ const char *XVidC_GetVideoModeStr(XVidC_VideoMode VmId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function returns the frame rate name for index specified.
|
* This function returns the frame rate name for index specified.
|
||||||
*
|
*
|
||||||
* @param VmId specifies the resolution id.
|
* @param VmId specifies the resolution id.
|
||||||
|
@ -362,7 +356,6 @@ char *XVidC_GetFrameRateStr(XVidC_VideoMode VmId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function returns the color format name for index specified.
|
* This function returns the color format name for index specified.
|
||||||
*
|
*
|
||||||
* @param ColorSpaceId specifies the index of color space.
|
* @param ColorSpaceId specifies the index of color space.
|
||||||
|
@ -398,7 +391,6 @@ char *XVidC_GetColorFormatStr(XVidC_ColorSpace ColorSpaceId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function returns the frame rate for index specified.
|
* This function returns the frame rate for index specified.
|
||||||
*
|
*
|
||||||
* @param VmId specifies the resolution id.
|
* @param VmId specifies the resolution id.
|
||||||
|
@ -420,7 +412,6 @@ XVidC_FrameRate XVidC_GetFrameRate(XVidC_VideoMode VmId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function returns the timing parameters for specified resolution.
|
* This function returns the timing parameters for specified resolution.
|
||||||
*
|
*
|
||||||
* @param VmId specifies the resolution id.
|
* @param VmId specifies the resolution id.
|
||||||
|
@ -442,7 +433,6 @@ const XVidC_VideoTiming *XVidC_GetTimingInfo(XVidC_VideoMode VmId)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function prints the stream information on STDIO/UART console.
|
* This function prints the stream information on STDIO/UART console.
|
||||||
*
|
*
|
||||||
* @param Stream is a pointer to video stream.
|
* @param Stream is a pointer to video stream.
|
||||||
|
@ -468,7 +458,6 @@ void XVidC_ReportStreamInfo(XVidC_VideoStream *Stream)
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* This function prints timing information on STDIO/Uart console.
|
* This function prints timing information on STDIO/Uart console.
|
||||||
*
|
*
|
||||||
* @param Timing is a pointer to Video Timing structure of the stream.
|
* @param Timing is a pointer to Video Timing structure of the stream.
|
||||||
|
|
Loading…
Add table
Reference in a new issue