2012-03-19 01:37:33 +04:00
/ *
edid. S : E D I D d a t a t e m p l a t e
Copyright ( C ) 2 0 1 2 C a r s t e n E m d e < C . E m d e @osadl.org>
This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or
modify i t u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e
as p u b l i s h e d b y t h e F r e e S o f t w a r e F o u n d a t i o n ; either version 2
of t h e L i c e n s e , o r ( a t y o u r o p t i o n ) a n y l a t e r v e r s i o n .
This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
You s h o u l d h a v e r e c e i v e d a c o p y o f t h e G N U G e n e r a l P u b l i c L i c e n s e
along w i t h t h i s p r o g r a m ; if not, write to the Free Software
Foundation, I n c . , 5 1 F r a n k l i n S t , F i f t h F l o o r , B o s t o n , M A 0 2 1 1 0 - 1 3 0 1 U S A .
* /
/* Manufacturer */
# define M F G _ L N X 1 ' L '
# define M F G _ L N X 2 ' N '
# define M F G _ L N X 3 ' X '
# define S E R I A L 0
# define Y E A R 2 0 1 2
# define W E E K 5
/* EDID 1.3 standard definitions */
# define X Y _ R A T I O _ 1 6 _ 1 0 0 b00
# define X Y _ R A T I O _ 4 _ 3 0 b01
# define X Y _ R A T I O _ 5 _ 4 0 b10
# define X Y _ R A T I O _ 1 6 _ 9 0 b11
2014-05-23 19:01:43 +04:00
/* Provide defaults for the timing bits */
# ifndef E S T A B L I S H E D _ T I M I N G 1 _ B I T S
# define E S T A B L I S H E D _ T I M I N G 1 _ B I T S 0 x00
# endif
# ifndef E S T A B L I S H E D _ T I M I N G 2 _ B I T S
# define E S T A B L I S H E D _ T I M I N G 2 _ B I T S 0 x00
# endif
# ifndef E S T A B L I S H E D _ T I M I N G 3 _ B I T S
# define E S T A B L I S H E D _ T I M I N G 3 _ B I T S 0 x00
# endif
2012-03-19 01:37:33 +04:00
# define m f g n a m e 2 i d ( v1 ,v2 ,v3 ) \
( ( ( ( v1 - ' @')&0x1f)<<10)+(((v2-'@')&0x1f)<<5)+((v3-'@')&0x1f))
# define s w a p16 ( v1 ) ( ( v1 > > 8 ) + ( ( v1 & 0 x f f ) < < 8 ) )
# define m s b s2 ( v1 ,v2 ) ( ( ( ( v1 > > 8 ) & 0 x0 f ) < < 4 ) + ( ( v2 > > 8 ) & 0 x0 f ) )
# define m s b s4 ( v1 ,v2 ,v3 ,v4 ) \
( ( ( v1 & 0 x03 ) > > 2 ) + ( ( v2 & 0 x03 ) > > 4 ) + ( ( v3 & 0 x03 ) > > 6 ) + ( ( v4 & 0 x03 ) > > 8 ) )
# define p i x d p i 2 m m ( p i x ,d p i ) ( ( p i x * 2 5 ) / d p i )
# define x s i z e p i x d p i 2 m m ( X P I X ,D P I )
# define y s i z e p i x d p i 2 m m ( Y P I X ,D P I )
.data
/* Fixed header pattern */
header : .byte 0x00 , 0 xff,0 x f f ,0 x f f ,0 x f f ,0 x f f ,0 x f f ,0 x00
mfg_id : .word s w a p 16 ( mfgname2 i d ( M F G _ L N X 1 , M F G _ L N X 2 , M F G _ L N X 3 ) )
prod_code : .word 0
/* Serial number. 32 bits, little endian. */
serial_number : .long S E R I A L
/* Week of manufacture */
week : .byte W E E K
/ * Year o f m a n u f a c t u r e , l e s s 1 9 9 0 . ( 1 9 9 0 - 2 2 4 5 )
If w e e k =255 , i t i s t h e m o d e l y e a r i n s t e a d * /
year : .byte Y E A R - 1990
version : .byte V E R S I O N / * E D I D v e r s i o n , u s u a l l y 1 ( for 1 . 3 ) * /
revision : .byte R E V I S I O N / * E D I D r e v i s i o n , u s u a l l y 3 ( for 1 . 3 ) * /
/ * If B i t 7 =1 D i g i t a l i n p u t . I f s e t , t h e f o l l o w i n g b i t d e f i n i t i o n s a p p l y :
Bits 6 - 1 R e s e r v e d , m u s t b e 0
Bit 0 S i g n a l i s c o m p a t i b l e w i t h V E S A D F P 1 . x T M D S C R G B ,
1 pixel p e r c l o c k , u p t o 8 b i t s p e r c o l o r , M S B a l i g n e d ,
If B i t 7 =0 A n a l o g i n p u t . I f c l e a r , t h e f o l l o w i n g b i t d e f i n i t i o n s a p p l y :
Bits 6 - 5 V i d e o w h i t e a n d s y n c l e v e l s , r e l a t i v e t o b l a n k
0 0 = + 0 .7 / - 0 .3 V; 01=+0.714/-0.286 V;
1 0 = + 1 .0 / - 0 .4 V; 11=+0.7/0 V
Bit 4 B l a n k - t o - b l a c k s e t u p ( p e d e s t a l ) e x p e c t e d
Bit 3 S e p a r a t e s y n c s u p p o r t e d
Bit 2 C o m p o s i t e s y n c ( o n H S y n c ) s u p p o r t e d
Bit 1 S y n c o n g r e e n s u p p o r t e d
Bit 0 V S y n c p u l s e m u s t b e s e r r a t e d w h e n s o m p o s i t e o r
sync- o n - g r e e n i s u s e d . * /
video_parms : .byte 0x6d
/ * Maximum h o r i z o n t a l i m a g e s i z e , i n c e n t i m e t r e s
( max 2 9 2 c m / 1 1 5 i n a t 1 6 : 9 a s p e c t r a t i o ) * /
max_hor_size : .byte x s i z e / 10
/ * Maximum v e r t i c a l i m a g e s i z e , i n c e n t i m e t r e s .
If e i t h e r b y t e i s 0 , u n d e f i n e d ( e . g . p r o j e c t o r ) * /
max_vert_size : .byte y s i z e / 10
/* Display gamma, minus 1, times 100 (range 1.00-3.5 */
gamma : .byte 120
/ * Bit 7 D P M S s t a n d b y s u p p o r t e d
Bit 6 D P M S s u s p e n d s u p p o r t e d
Bit 5 D P M S a c t i v e - o f f s u p p o r t e d
Bits 4 - 3 D i s p l a y t y p e : 0 0 =monochrome ; 01=RGB colour;
1 0 = non- R G B m u l t i c o l o u r ; 11=undefined
Bit 2 S t a n d a r d s R G B c o l o u r s p a c e . B y t e s 2 5 - 3 4 m u s t c o n t a i n
sRGB s t a n d a r d v a l u e s .
Bit 1 P r e f e r r e d t i m i n g m o d e s p e c i f i e d i n d e s c r i p t o r b l o c k 1 .
Bit 0 G T F s u p p o r t e d w i t h d e f a u l t p a r a m e t e r v a l u e s . * /
dsp_features : .byte 0xea
/* Chromaticity coordinates. */
/ * Red a n d g r e e n l e a s t - s i g n i f i c a n t b i t s
Bits 7 - 6 R e d x v a l u e l e a s t - s i g n i f i c a n t 2 b i t s
Bits 5 - 4 R e d y v a l u e l e a s t - s i g n i f i c a n t 2 b i t s
Bits 3 - 2 G r e e n x v a l u e l s t - s i g n i f i c a n t 2 b i t s
Bits 1 - 0 G r e e n y v a l u e l e a s t - s i g n i f i c a n t 2 b i t s * /
red_green_lsb : .byte 0x5e
/* Blue and white least-significant 2 bits */
blue_white_lsb : .byte 0xc0
/ * Red x v a l u e m o s t s i g n i f i c a n t 8 b i t s .
0 - 2 5 5 encodes 0 - 0 . 9 9 6 ( 2 5 5 / 2 5 6 ) ; 0-0.999 (1023/1024) with lsbits */
red_x_msb : .byte 0xa4
/* Red y value most significant 8 bits */
red_y_msb : .byte 0x59
/* Green x and y value most significant 8 bits */
green_x_y_msb : .byte 0x4a , 0 x9 8
/* Blue x and y value most significant 8 bits */
blue_x_y_msb : .byte 0x25 , 0 x2 0
/* Default white point x and y value most significant 8 bits */
white_x_y_msb : .byte 0x50 , 0 x5 4
/* Established timings */
/ * Bit 7 7 2 0 x40 0 @ 70 Hz
Bit 6 7 2 0 x40 0 @ 88 Hz
Bit 5 6 4 0 x48 0 @ 60 Hz
Bit 4 6 4 0 x48 0 @ 67 Hz
Bit 3 6 4 0 x48 0 @ 72 Hz
Bit 2 6 4 0 x48 0 @ 75 Hz
Bit 1 8 0 0 x60 0 @ 56 Hz
Bit 0 8 0 0 x60 0 @ 60 Hz */
2014-05-23 19:01:43 +04:00
estbl_timing1 : .byte E S T A B L I S H E D _ T I M I N G 1 _ BITS
2012-03-19 01:37:33 +04:00
/ * Bit 7 8 0 0 x60 0 @ 72 Hz
Bit 6 8 0 0 x60 0 @ 75 Hz
Bit 5 8 3 2 x62 4 @ 75 Hz
Bit 4 1 0 2 4 x76 8 @ 87 Hz, interlaced (1024x768)
Bit 3 1 0 2 4 x76 8 @ 60 Hz
Bit 2 1 0 2 4 x76 8 @ 72 Hz
Bit 1 1 0 2 4 x76 8 @ 75 Hz
Bit 0 1 2 8 0 x10 2 4 @ 75 Hz */
2014-05-23 19:01:43 +04:00
estbl_timing2 : .byte E S T A B L I S H E D _ T I M I N G 2 _ BITS
2012-03-19 01:37:33 +04:00
/ * Bit 7 1 1 5 2 x87 0 @ 75 Hz (Apple Macintosh II)
Bits 6 - 0 O t h e r m a n u f a c t u r e r - s p e c i f i c d i s p l a y m o d * /
2014-05-23 19:01:43 +04:00
estbl_timing3 : .byte E S T A B L I S H E D _ T I M I N G 3 _ BITS
2012-03-19 01:37:33 +04:00
/* Standard timing */
/* X resolution, less 31, divided by 8 (256-2288 pixels) */
std_xres : .byte ( X P I X / 8 ) - 3 1
/ * Y r e s o l u t i o n , X : Y p i x e l r a t i o
Bits 7 - 6 X : Y p i x e l r a t i o : 0 0 =16 : 1 0 ; 01=4:3; 10=5:4; 11=16:9.
Bits 5 - 0 V e r t i c a l f r e q u e n c y , l e s s 6 0 ( 6 0 - 1 2 3 H z ) * /
std_vres : .byte ( X Y _ R A T I O < < 6 ) + VFREQ- 6 0
.fill 7 , 2 , 0 x0 1 0 1 / * U n u s e d * /
descriptor1 :
/* Pixel clock in 10 kHz units. (0.-655.35 MHz, little-endian) */
clock : .word C L O C K / 10
/* Horizontal active pixels 8 lsbits (0-4095) */
x_act_lsb : .byte X P I X & 0xff
/ * Horizontal b l a n k i n g p i x e l s 8 l s b i t s ( 0 - 4 0 9 5 )
End o f a c t i v e t o s t a r t o f n e x t a c t i v e . * /
x_blk_lsb : .byte X B L A N K & 0xff
/ * Bits 7 - 4 H o r i z o n t a l a c t i v e p i x e l s 4 m s b i t s
Bits 3 - 0 H o r i z o n t a l b l a n k i n g p i x e l s 4 m s b i t s * /
x_msbs : .byte m s b s 2 ( XPIX,X B L A N K )
/* Vertical active lines 8 lsbits (0-4095) */
y_act_lsb : .byte Y P I X & 0xff
/* Vertical blanking lines 8 lsbits (0-4095) */
y_blk_lsb : .byte Y B L A N K & 0xff
/ * Bits 7 - 4 V e r t i c a l a c t i v e l i n e s 4 m s b i t s
Bits 3 - 0 V e r t i c a l b l a n k i n g l i n e s 4 m s b i t s * /
y_msbs : .byte m s b s 2 ( YPIX,Y B L A N K )
/* Horizontal sync offset pixels 8 lsbits (0-1023) From blanking start */
x_snc_off_lsb : .byte X O F F S E T & 0xff
/* Horizontal sync pulse width pixels 8 lsbits (0-1023) */
x_snc_pls_lsb : .byte X P U L S E & 0xff
/ * Bits 7 - 4 V e r t i c a l s y n c o f f s e t l i n e s 4 l s b i t s - 6 3 )
Bits 3 - 0 V e r t i c a l s y n c p u l s e w i d t h l i n e s 4 l s b i t s - 6 3 ) * /
y_snc_lsb : .byte ( ( Y O F F S E T - 63 ) < < 4 ) + ( YPULSE- 6 3 )
/ * Bits 7 - 6 H o r i z o n t a l s y n c o f f s e t p i x e l s 2 m s b i t s
Bits 5 - 4 H o r i z o n t a l s y n c p u l s e w i d t h p i x e l s 2 m s b i t s
Bits 3 - 2 V e r t i c a l s y n c o f f s e t l i n e s 2 m s b i t s
Bits 1 - 0 V e r t i c a l s y n c p u l s e w i d t h l i n e s 2 m s b i t s * /
xy_snc_msbs : .byte m s b s 4 ( XOFFSET,X P U L S E ,Y O F F S E T ,Y P U L S E )
/* Horizontal display size, mm, 8 lsbits (0-4095 mm, 161 in) */
x_dsp_size : .byte x s i z e & 0xff
/* Vertical display size, mm, 8 lsbits (0-4095 mm, 161 in) */
y_dsp_size : .byte y s i z e & 0xff
/ * Bits 7 - 4 H o r i z o n t a l d i s p l a y s i z e , m m , 4 m s b i t s
Bits 3 - 0 V e r t i c a l d i s p l a y s i z e , m m , 4 m s b i t s * /
dsp_size_mbsb : .byte m s b s 2 ( xsize,y s i z e )
/* Horizontal border pixels (each side; total is twice this) */
x_border : .byte 0
/* Vertical border lines (each side; total is twice this) */
y_border : .byte 0
/ * Bit 7 I n t e r l a c e d
Bits 6 - 5 S t e r e o m o d e : 0 0 =No s t e r e o ; other values depend on bit 0:
Bit 0 =0 : 0 1 =Field s e q u e n t i a l , s y n c =1 d u r i n g r i g h t ; 10=similar,
sync=1 d u r i n g l e f t ; 11=4-way interleaved stereo
Bit 0 =1 2 - w a y i n t e r l e a v e d s t e r e o : 0 1 =Right i m a g e o n e v e n l i n e s ;
1 0 = Left i m a g e o n e v e n l i n e s ; 11=side-by-side
Bits 4 - 3 S y n c t y p e : 0 0 =Analog c o m p o s i t e ; 01=Bipolar analog composite;
1 0 = Digital c o m p o s i t e ( o n H S y n c ) ; 11=Digital separate
Bit 2 I f d i g i t a l s e p a r a t e : V e r t i c a l s y n c p o l a r i t y ( 1 =positive )
Other t y p e s : V S y n c s e r r a t e d ( H S y n c d u r i n g V S y n c )
Bit 1 I f a n a l o g s y n c : S y n c o n a l l 3 R G B l i n e s ( e l s e g r e e n o n l y )
Digital : HSync p o l a r i t y ( 1 =positive )
Bit 0 2 - w a y l i n e - i n t e r l e a v e d s t e r e o , i f b i t s 4 - 3 a r e n o t 0 0 . * /
features : .byte 0x18 + ( VSYNC_ P O L < < 2 ) + ( H S Y N C _ P O L < < 1 )
descriptor2 : .byte 0 , 0 /* Not a detailed timing descriptor */
.byte 0 /* Must be zero */
.byte 0xff /* Descriptor is monitor serial number (text) */
.byte 0 /* Must be zero */
start1 : .ascii " Linux #0 "
end1 : .byte 0x0a /* End marker */
.fill 1 2 - ( end1 - s t a r t 1 ) , 1 , 0 x20 / * P a d d e d s p a c e s * /
descriptor3 : .byte 0 , 0 /* Not a detailed timing descriptor */
.byte 0 /* Must be zero */
.byte 0xfd /* Descriptor is monitor range limits */
.byte 0 /* Must be zero */
start2 : .byte V F R E Q - 1 /* Minimum vertical field rate (1-255 Hz) */
.byte VFREQ+ 1 / * M a x i m u m v e r t i c a l f i e l d r a t e ( 1 - 2 5 5 H z ) * /
.byte ( CLOCK/ ( X P I X + X B L A N K ) ) - 1 / * M i n i m u m h o r i z o n t a l l i n e r a t e
( 1 - 2 5 5 kHz) * /
.byte ( CLOCK/ ( X P I X + X B L A N K ) ) + 1 / * M a x i m u m h o r i z o n t a l l i n e r a t e
( 1 - 2 5 5 kHz) * /
.byte ( CLOCK/ 1 0 0 0 0 ) + 1 / * M a x i m u m p i x e l c l o c k r a t e , r o u n d e d u p
to 1 0 M H z m u l t i p l e ( 1 0 - 2 5 5 0 M H z ) * /
.byte 0 /* No extended timing information type */
end2 : .byte 0x0a /* End marker */
.fill 1 2 - ( end2 - s t a r t 2 ) , 1 , 0 x20 / * P a d d e d s p a c e s * /
descriptor4 : .byte 0 , 0 /* Not a detailed timing descriptor */
.byte 0 /* Must be zero */
.byte 0xfc /* Descriptor is text */
.byte 0 /* Must be zero */
start3 : .ascii T I M I N G _ N A M E
end3 : .byte 0x0a /* End marker */
.fill 1 2 - ( end3 - s t a r t 3 ) , 1 , 0 x20 / * P a d d e d s p a c e s * /
extensions : .byte 0 /* Number of extensions to follow */
checksum : .byte C R C / * S u m o f a l l b y t e s m u s t b e 0 * /