video_common: edid: Use color depth enumeration type.
Signed-off-by: Andrei-Liviu Simion <andrei.simion@xilinx.com>
This commit is contained in:
parent
9beb00b9b9
commit
051ddc74e5
4 changed files with 16 additions and 15 deletions
|
@ -119,10 +119,9 @@ static void Edid_Print_BaseBasicDisp(u8 *EdidRaw)
|
|||
/* Input is a digital video signal interface. */
|
||||
xil_printf("\tVideo signal interface is digital.\n");
|
||||
|
||||
if (XVidC_EdidGetBDispVidDigBpc(EdidRaw) !=
|
||||
XVIDC_EDID_BDISP_VID_DIG_BPC_UNDEF) {
|
||||
if (XVidC_EdidGetColorDepth(EdidRaw) != XVIDC_BPC_UNKNOWN) {
|
||||
xil_printf("\tColor bit depth:\t%d\n",
|
||||
XVidC_EdidGetBDispVidDigBpc(EdidRaw));
|
||||
XVidC_EdidGetColorDepth(EdidRaw));
|
||||
}
|
||||
else {
|
||||
xil_printf("\tColor bit depth is undefined.\n");
|
||||
|
|
|
@ -248,8 +248,9 @@ typedef enum {
|
|||
XVIDC_BPC_8 = 8,
|
||||
XVIDC_BPC_10 = 10,
|
||||
XVIDC_BPC_12 = 12,
|
||||
XVIDC_BPC_14 = 14,
|
||||
XVIDC_BPC_16 = 16,
|
||||
XVIDC_BPC_NUM_SUPPORTED = 5,
|
||||
XVIDC_BPC_NUM_SUPPORTED = 6,
|
||||
XVIDC_BPC_UNKNOWN
|
||||
} XVidC_ColorDepth;
|
||||
|
||||
|
|
|
@ -99,7 +99,8 @@ void XVidC_EdidGetVpiIdManName(u8 *EdidRaw, char ManName[4])
|
|||
|
||||
/******************************************************************************/
|
||||
/**
|
||||
* Get the color bit depth (bits per primary color) as specified in the supplied
|
||||
* Get the color bit depth (bits per primary color) as specified in the basic
|
||||
* display parameters and features, video input definition field of the supplied
|
||||
* base Extended Display Identification Data (EDID).
|
||||
*
|
||||
* @param EdidRaw is the supplied base EDID to retrieve color depth
|
||||
|
@ -111,7 +112,7 @@ void XVidC_EdidGetVpiIdManName(u8 *EdidRaw, char ManName[4])
|
|||
* @note None.
|
||||
*
|
||||
*******************************************************************************/
|
||||
u8 XVidC_EdidGetBDispVidDigBpc(u8 *EdidRaw)
|
||||
XVidC_ColorDepth XVidC_EdidGetColorDepth(u8 *EdidRaw)
|
||||
{
|
||||
u8 Bpc;
|
||||
|
||||
|
@ -119,31 +120,31 @@ u8 XVidC_EdidGetBDispVidDigBpc(u8 *EdidRaw)
|
|||
XVIDC_EDID_BDISP_VID_DIG_BPC_MASK) >>
|
||||
XVIDC_EDID_BDISP_VID_DIG_BPC_SHIFT)) {
|
||||
case XVIDC_EDID_BDISP_VID_DIG_BPC_6:
|
||||
Bpc = 6;
|
||||
Bpc = XVIDC_BPC_6;
|
||||
break;
|
||||
|
||||
case XVIDC_EDID_BDISP_VID_DIG_BPC_8:
|
||||
Bpc = 8;
|
||||
Bpc = XVIDC_BPC_8;
|
||||
break;
|
||||
|
||||
case XVIDC_EDID_BDISP_VID_DIG_BPC_10:
|
||||
Bpc = 10;
|
||||
Bpc = XVIDC_BPC_10;
|
||||
break;
|
||||
|
||||
case XVIDC_EDID_BDISP_VID_DIG_BPC_12:
|
||||
Bpc = 12;
|
||||
Bpc = XVIDC_BPC_12;
|
||||
break;
|
||||
|
||||
case XVIDC_EDID_BDISP_VID_DIG_BPC_14:
|
||||
Bpc = 14;
|
||||
Bpc = XVIDC_BPC_14;
|
||||
break;
|
||||
|
||||
case XVIDC_EDID_BDISP_VID_DIG_BPC_16:
|
||||
Bpc = 16;
|
||||
Bpc = XVIDC_BPC_16;
|
||||
break;
|
||||
|
||||
default:
|
||||
Bpc = XVIDC_EDID_BDISP_VID_DIG_BPC_UNDEF;
|
||||
Bpc = XVIDC_BPC_UNKNOWN;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@
|
|||
((E[XVIDC_EDID_BDISP_VID] & XVIDC_EDID_BDISP_VID_ANA_COMP_SYNC_G_MASK) != 0)
|
||||
#define XVidC_EdidSuppBDispVidAnaSerrVsync(E) \
|
||||
((E[XVIDC_EDID_BDISP_VID] & XVIDC_EDID_BDISP_VID_ANA_SERR_V_SYNC_MASK) != 0)
|
||||
/* u8 XVidC_EdidGetBDispVidDigBpc(u8 *EdidRaw); */
|
||||
/* XVidC_ColorDepth XVidC_EdidGetColorDepth(u8 *EdidRaw); */
|
||||
#define XVidC_EdidGetBDispVidDigVis(E) \
|
||||
(E[XVIDC_EDID_BDISP_VID] & XVIDC_EDID_BDISP_VID_DIG_VIS_MASK)
|
||||
|
||||
|
@ -457,7 +457,7 @@
|
|||
void XVidC_EdidGetVpiIdManName(u8 *EdidRaw, char ManName[4]);
|
||||
|
||||
/* Basic display parameters and features: Video input definition. */
|
||||
u8 XVidC_EdidGetBDispVidDigBpc(u8 *EdidRaw);
|
||||
XVidC_ColorDepth XVidC_EdidGetColorDepth(u8 *EdidRaw);
|
||||
|
||||
/* Color characteristics (display x,y chromaticity coordinates). */
|
||||
float XVidC_EdidGetCcRedX(u8 *EdidRaw);
|
||||
|
|
Loading…
Add table
Reference in a new issue