1 /* SPDX-License-Identifier: GPL-2.0-only */
7 #include <framebuffer_info.h>
8 #include "commonlib/coreboot_tables.h"
11 EDID_MODE_640x480_60Hz
,
12 EDID_MODE_720x480_60Hz
,
13 EDID_MODE_1280x720_60Hz
,
14 EDID_MODE_1920x1080_60Hz
,
22 unsigned int pixel_clock
;
23 int lvds_dual_channel
;
41 /* structure for communicating EDID information from a raw EDID block to
42 * higher level functions.
43 * The size of the data types is not critical, so we leave them as
44 * unsigned int. We can move more into this struct as needed.
47 #define EDID_ASCII_STRING_LENGTH 13
50 /* These next three things used to all be called bpp.
51 * Merriment ensued. The identifier
52 * 'bpp' is herewith banished from our
55 /* How many bits in the framebuffer per pixel.
56 * Under all reasonable circumstances, it's 32.
58 unsigned int framebuffer_bits_per_pixel
;
59 /* On the panel, how many bits per color?
60 * In almost all cases, it's 6 or 8.
61 * The standard allows for much more!
63 unsigned int panel_bits_per_color
;
64 /* On the panel, how many bits per pixel.
65 * On Planet Earth, there are three colors
66 * per pixel, but this is convenient to have here
67 * instead of having 3*panel_bits_per_color
70 unsigned int panel_bits_per_pixel
;
71 /* used to compute timing for graphics chips. */
72 struct edid_mode mode
;
73 u8 mode_is_supported
[NUM_KNOWN_MODES
];
74 unsigned int link_clock
;
75 /* 3 variables needed for coreboot framebuffer.
76 * In most cases, they are the same as the ha
77 * and va variables, but not always, as in the
78 * case of a 1366 wide display.
84 int hdmi_monitor_detected
;
85 char ascii_string
[EDID_ASCII_STRING_LENGTH
+ 1];
86 char manufacturer_name
[3 + 1];
95 /* Defined in src/lib/edid.c */
96 int decode_edid(unsigned char *edid
, int size
, struct edid
*out
);
97 void edid_set_framebuffer_bits_per_pixel(struct edid
*edid
, int fb_bpp
,
98 int row_byte_alignment
);
99 int set_display_mode(struct edid
*edid
, enum edid_modes mode
);