2 * This file is part of the coreboot project.
4 * Copyright 2013 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
20 EDID_MODE_640x480_60Hz
,
21 EDID_MODE_720x480_60Hz
,
22 EDID_MODE_1280x720_60Hz
,
23 EDID_MODE_1920x1080_60Hz
,
31 unsigned int pixel_clock
;
32 int lvds_dual_channel
;
50 /* structure for communicating EDID information from a raw EDID block to
51 * higher level functions.
52 * The size of the data types is not critical, so we leave them as
53 * unsigned int. We can move more into into this struct as needed.
56 #define EDID_ASCII_STRING_LENGTH 13
59 /* These next three things used to all be called bpp.
60 * Merriment ensued. The identifier
61 * 'bpp' is herewith banished from our
64 /* How many bits in the framebuffer per pixel.
65 * Under all reasonable circumstances, it's 32.
67 unsigned int framebuffer_bits_per_pixel
;
68 /* On the panel, how many bits per color?
69 * In almost all cases, it's 6 or 8.
70 * The standard allows for much more!
72 unsigned int panel_bits_per_color
;
73 /* On the panel, how many bits per pixel.
74 * On Planet Earth, there are three colors
75 * per pixel, but this is convenient to have here
76 * instead of having 3*panel_bits_per_color
79 unsigned int panel_bits_per_pixel
;
80 /* used to compute timing for graphics chips. */
81 struct edid_mode mode
;
82 u8 mode_is_supported
[NUM_KNOWN_MODES
];
83 unsigned int link_clock
;
84 /* 3 variables needed for coreboot framebuffer.
85 * In most cases, they are the same as the ha
86 * and va variables, but not always, as in the
87 * case of a 1366 wide display.
93 int hdmi_monitor_detected
;
94 char ascii_string
[EDID_ASCII_STRING_LENGTH
+ 1];
103 /* Defined in src/lib/edid.c */
104 int decode_edid(unsigned char *edid
, int size
, struct edid
*out
);
105 void edid_set_framebuffer_bits_per_pixel(struct edid
*edid
, int fb_bpp
,
106 int row_byte_alignment
);
107 void set_vbe_mode_info_valid(const struct edid
*edid
, uintptr_t fb_addr
);
108 int set_display_mode(struct edid
*edid
, enum edid_modes mode
);