//----------------------------------------------------------------------------------------------------
// ID Code      : Panel.h No.0000
// Update Note  :
//
//----------------------------------------------------------------------------------------------------

//#ifdef __MAIN__


#if _PANEL_TYPE == _AU_M190PW01 

#define _PANEL_DISPLAY_RATIO        _PANEL_16_9

#define _DISP_WID			1440
#define _DISP_LEN			900

#define LVDS_MAP			LVDS_MAP1

//display ratio mode set
#define _RATIO_16X9					0
#define _RATIO_4X3						1
#define _DISP_RATIO_MIN				_RATIO_16X9
#define _DISP_RATIO_MAX				_RATIO_4X3
#define _DISP_RATIO_MODENUM			(_DISP_RATIO_MAX+1-_DISP_RATIO_MIN)

#define GET_DISP_DHWID_RATIO_16X9	_DISP_WID//((_DISP_LEN/9)*16)
#define GET_DISP_DHSEXT_RATIO_16X9	0//((_DISP_WID-GET_DISP_DHWID_RATIO_16X9)/2)
#define GET_DISP_DHWID_RATIO_4X3		((_DISP_LEN/3)*4)
#define GET_DISP_DHSEXT_RATIO_4X3		((_DISP_WID-GET_DISP_DHWID_RATIO_4X3)/2)

//osd position, according to panel
#define _OSD_HPOSITION_OFFSET           				8
#define _OSD_VPOSITION_OFFSET           				2

//color temp range is _COLORTEMP_MIN ~ _COLORTEMP_MIN+100
#define _CT9300_RED_VGA		44	//9300
#define _CT9300_GREEN_VGA		65
#define _CT9300_BLUE_VGA		50
#define _CT7500_RED_VGA		46	//7500
#define _CT7500_GREEN_VGA		65
#define _CT7500_BLUE_VGA		39
#define _CT6500_RED_VGA		50	//6500
#define _CT6500_GREEN_VGA		65
#define _CT6500_BLUE_VGA		30
#define _CTUSER_RED_VGA		50
#define _CTUSER_GREEN_VGA		50
#define _CTUSER_BLUE_VGA		50

#define _CT9300_RED_HDMI		44	//9300
#define _CT9300_GREEN_HDMI	50
#define _CT9300_BLUE_HDMI		51
#define _CT7500_RED_HDMI		46	//7500
#define _CT7500_GREEN_HDMI       51
#define _CT7500_BLUE_HDMI		38
#define _CT6500_RED_HDMI		49	//6500
#define _CT6500_GREEN_HDMI	50
#define _CT6500_BLUE_HDMI		28
#define _CTUSER_RED_HDMI		50
#define _CTUSER_GREEN_HDMI	50
#define _CTUSER_BLUE_HDMI		50


#define _CT9300_RED_VIDEO		43	//9300
#define _CT9300_GREEN_VIDEO	49
#define _CT9300_BLUE_VIDEO		51
#define _CT7500_RED_VIDEO		44	//7500
#define _CT7500_GREEN_VIDEO	50
#define _CT7500_BLUE_VIDEO		37
#define _CT6500_RED_VIDEO		49	//6500
#define _CT6500_GREEN_VIDEO	50
#define _CT6500_BLUE_VIDEO		28
#define _CTUSER_RED_VIDEO		50
#define _CTUSER_GREEN_VIDEO	50
#define _CTUSER_BLUE_VIDEO		50


#define _CT9300_RED_YPBPR		43	//9300
#define _CT9300_GREEN_YPBPR	49
#define _CT9300_BLUE_YPBPR		51
#define _CT7500_RED_YPBPR		44	//7500
#define _CT7500_GREEN_YPBPR	50
#define _CT7500_BLUE_YPBPR		37
#define _CT6500_RED_YPBPR		49	//6500
#define _CT6500_GREEN_YPBPR	50
#define _CT6500_BLUE_YPBPR		28
#define _CTUSER_RED_YPBPR		50
#define _CTUSER_GREEN_YPBPR	50
#define _CTUSER_BLUE_YPBPR		50

#ifdef __SCALER__

#if _DISP_RATIO_M2_SUPPORT
unsigned int code tDispDHWidRatio[_DISP_RATIO_MODENUM]=
{
	GET_DISP_DHWID_RATIO_16X9,
	GET_DISP_DHWID_RATIO_4X3,
};
unsigned int code tDispDHSExtRatio[_DISP_RATIO_MODENUM]=
{
	GET_DISP_DHSEXT_RATIO_16X9,
	GET_DISP_DHSEXT_RATIO_4X3,
};
#endif	//#if _DISP_RATIO_M2_SUPPORT


//--------------------------------------------------
// Panel Configuration :
// _DISP_DOUBLE_PORT | _DISP_EO_SWAP | _DISP_RB_SWAP | _DISP_ML_SWAP |
// _DISP_18_BIT | _RSDS_GC_SWAP | _RSDS_HL_SWAP | _RSDS_PN_SWAP,
//--------------------------------------------------
code PanelType Panel[] =
	{
		{	// CMO LVDS  19  M190A1
	  
			_PANEL_LVDS,										// Panel Style
	
			_DISP_DOUBLE_PORT | _DISP_18_BIT | _DISP_EO_SWAP,	 // Panel Configuration
			
	
			32, 												// Display Horizontal Start Position
			1440,												// Display Horizontal Width
			1432,												// Display Horizontal End Position
	
		   1728, //1604,											   // Display Horizontal Total Clock Number in One Display Line
		   2048,// 1920,											   // Maxinum Display Horizontal Total Clock Number in One Display Line
		   1520,// 1500,											   // Mininum Display Horizontal Total Clock Number in One Display Line
	
			12, 												// Display Vertical Start Position
			900,											   // Display Vertical Height
			912,											   // Display Vertical End Position
	
		   940, //926,												 // Display Vertical Total Line Number in One Frame
			2048,//1050,											   // Maxinum Display Vertical Total Line Number in One Frame
			910,//905,												 // Mininum Display Vertical Total Line Number in One Frame
	
			16, 												// Display H Sync Width
			3,													// Display V Sync Height
	
			95,//130,												 // Typical Pixel Clock in MHz
			128,//150,												  // Maxinum Pixel Clock in MHz
			90, 											   // Mininum Pixel Clock in MHz
		},
	}
;

#else

#if _DISP_RATIO_M2_SUPPORT
extern unsigned int code tDispDHWidRatio[_DISP_RATIO_MODENUM];
extern unsigned int code tDispDHSExtRatio[_DISP_RATIO_MODENUM];
#endif	//#if _DISP_RATIO_M2_SUPPORT

extern code PanelType Panel[];


#endif

#endif 


