diff options
author | Matt DeVillier <matt.devillier@gmail.com> | 2017-10-19 22:44:18 -0500 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-10-23 16:58:35 +0000 |
commit | fd0a891ee9ed0947123e893505bdfc8ada408ab9 (patch) | |
tree | 16d58307462115acaffcd1096c4d5c21cdb2d4a0 | |
parent | fb1cd09596cfbbaa3b4ec7ec45b6ec8d8fa52411 (diff) | |
download | coreboot-fd0a891ee9ed0947123e893505bdfc8ada408ab9.tar.xz |
drv/intel/gma/opregion: fix opregion version for Windows
Although Intel's current spec[1] shows the OpRegion structure version
as being the top 16 bits of the field, Intel's Windows drivers
require the OpRegion structure version to be in the top 8 bits of
the field when not using a VGA BIOS (eg, NGI or GOP driver).
As the Linux i915 driver only checks that the version is >= 2,
there is no change in functionality there.
This change effectively matches Intel's implementation in TianoCore,
where the version is set to 0x0200 << 16.
[1] https://01.org/sites/default/files/documentation/skl_opregion_rev0p5.pdf
TEST: Boot Windows [8.1,10] in UEFI mode w/GOP graphics init and
Legacy mode with libgfxinit, observe Intel GPU driver functional.
Change-Id: Ic2903ee4829689ec4117aec93dce0b87cec6f313
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/22118
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
-rw-r--r-- | src/drivers/intel/gma/opregion.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/drivers/intel/gma/opregion.c b/src/drivers/intel/gma/opregion.c index 84bca9bd3a..b6d4e07790 100644 --- a/src/drivers/intel/gma/opregion.c +++ b/src/drivers/intel/gma/opregion.c @@ -260,7 +260,26 @@ intel_gma_init_igd_opregion(igd_opregion_t *opregion) /* 8kb */ opregion->header.size = sizeof(igd_opregion_t) / 1024; - opregion->header.version = IGD_OPREGION_VERSION; + + /* + * Left-shift version field to accomodate Intel Windows driver quirk + * when not using a VBIOS. + * Required for Legacy boot + NGI, UEFI + NGI, and UEFI + GOP driver. + * + * Tested on: (platform, GPU, windows driver version) + * samsung/stumpy (SNB, GT2, 9.17.10.4459) + * google/link (IVB, GT2, 15.33.4653) + * google/wolf (HSW, GT1, 15.40.36.4703) + * google/panther (HSW, GT2, 15.40.36.4703) + * google/rikku (BDW, GT1, 15.40.36.4703) + * google/lulu (BDW, GT2, 15.40.36.4703) + * google/chell (SKL-Y, GT2, 15.45.21.4821) + * google/sentry (SKL-U, GT1, 15.45.21.4821) + * purism/librem13v2 (SKL-U, GT2, 15.45.21.4821) + * + * No adverse effects when using VBIOS or booting Linux. + */ + opregion->header.version = IGD_OPREGION_VERSION << 24; // FIXME We just assume we're mobile for now opregion->header.mailboxes = MAILBOXES_MOBILE; |