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