summaryrefslogtreecommitdiffstats
path: root/src/include/edid.h
diff options
context:
space:
mode:
authorJulius Werner <jwerner@chromium.org>2016-03-14 17:29:55 -0700
committerJulius Werner <jwerner@chromium.org>2016-03-24 20:25:12 +0100
commit6911219ccc445f833264cf5a5a4b9439b9670b40 (patch)
treed458afc047c6a8da7ee2ee5252b72eabe40ea6b8 /src/include/edid.h
parenta45a0b70a5d84f76bae903c5b079c73ee794f773 (diff)
downloadcoreboot-6911219ccc445f833264cf5a5a4b9439b9670b40.tar.gz
coreboot-6911219ccc445f833264cf5a5a4b9439b9670b40.tar.bz2
coreboot-6911219ccc445f833264cf5a5a4b9439b9670b40.zip
edid: Add helper function to calculate bits-per-pixel dependent values
Coreboot and most payloads support three basic pixel widths for the framebuffer. It assumes 32 by default, but several chipsets need to override that value with whatever else they're supporting. Our struct edid contains multiple convenience values that are directly derived from this (and other properties), so changing the bits per pixel always requires recalculating all those dependents in the chipset code. This patch provides a small convenience wrapper that can be used to consistently update the whole struct edid with a new pixel width instead, so we no longer need to duplicate those calculations everywhere. BUG=None TEST=Booted Oak in all three pixel widths (which it conveniently all supports), confirmed that images looked good. Change-Id: I5376dd4e28cf107ac2fba1dc418f5e1c5a2e2de6 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/14158 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/include/edid.h')
-rw-r--r--src/include/edid.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/edid.h b/src/include/edid.h
index d3cab17f497d..f46c7619354b 100644
--- a/src/include/edid.h
+++ b/src/include/edid.h
@@ -93,6 +93,7 @@ struct edid {
/* Defined in src/lib/edid.c */
int decode_edid(unsigned char *edid, int size, struct edid *out);
+void edid_set_framebuffer_bits_per_pixel(struct edid *edid, int fb_bpp);
void set_vbe_mode_info_valid(struct edid *edid, uintptr_t fb_addr);
int set_display_mode(struct edid *edid, enum edid_modes mode);