diff options
author | Iru Cai <mytbk920423@gmail.com> | 2016-11-09 09:55:20 +0800 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-11-15 18:10:30 +0100 |
commit | 9f1f1e0cb81af376ef1ea138939b97332ce61331 (patch) | |
tree | 6808d43578d935aff279809c95427d153091e9cf | |
parent | eeaf9e4687249c73fb93efc4fdc12215210efcdf (diff) |
google/link/i915.c: Fix build error when native gfx init enabled
- Move members of struct edid to struct edid_mode
- Change `u32 pmmio` to `u8 *pmmio` in i915_lightup_sandy
Change-Id: Id64daf5eae1d4d8265105067b2e6ae55786a5638
Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Reviewed-on: https://review.coreboot.org/17332
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
-rw-r--r-- | src/mainboard/google/link/i915.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c index 12c7dc347d..9ab31494f5 100644 --- a/src/mainboard/google/link/i915.c +++ b/src/mainboard/google/link/i915.c @@ -231,9 +231,10 @@ static int run(int index) } int i915lightup_sandy(const struct i915_gpu_controller_info *info, - u32 pphysbase, u16 piobase, u32 pmmio, u32 pgfx) + u32 pphysbase, u16 piobase, u8 *pmmio, u32 pgfx) { static struct edid edid; + const struct edid_mode *mode; int edid_ok; int index; @@ -251,26 +252,28 @@ int i915lightup_sandy(const struct i915_gpu_controller_info *info, edid_ok = decode_edid((unsigned char *)&link_edid_data, sizeof(link_edid_data), &edid); + mode = &edid.mode; printk(BIOS_SPEW, "decode edid returns %d\n", edid_ok); edid.framebuffer_bits_per_pixel = 32; - htotal = (edid.ha - 1) | ((edid.ha + edid.hbl- 1) << 16); + htotal = (mode->ha - 1) | ((mode->ha + mode->hbl - 1) << 16); printk(BIOS_SPEW, "I915_WRITE(HTOTAL(pipe), %08x)\n", htotal); - hblank = (edid.ha - 1) | ((edid.ha + edid.hbl- 1) << 16); + hblank = (mode->ha - 1) | ((mode->ha + mode->hbl - 1) << 16); printk(BIOS_SPEW, "I915_WRITE(HBLANK(pipe),0x%08x)\n", hblank); - hsync = (edid.ha + edid.hso - 1) | - ((edid.ha + edid.hso + edid.hspw- 1) << 16); + hsync = (mode->ha + mode->hso - 1) | + ((mode->ha + mode->hso + mode->hspw - 1) << 16); printk(BIOS_SPEW, "I915_WRITE(HSYNC(pipe),0x%08x)\n", hsync); - vtotal = (edid.va - 1) | ((edid.va + edid.vbl- 1) << 16); + vtotal = (mode->va - 1) | ((mode->va + mode->vbl - 1) << 16); printk(BIOS_SPEW, "I915_WRITE(VTOTAL(pipe), %08x)\n", vtotal); - vblank = (edid.va - 1) | ((edid.va + edid.vbl- 1) << 16); + vblank = (mode->va - 1) | ((mode->va + mode->vbl - 1) << 16); printk(BIOS_SPEW, "I915_WRITE(VBLANK(pipe),0x%08x)\n", vblank); - vsync = (edid.va + edid.vso - 1) |((edid.va + edid.vso + edid.vspw- 1) << 16); + vsync = (mode->va + mode->vso - 1) | + ((mode->va + mode->vso + mode->vspw - 1) << 16); printk(BIOS_SPEW, "I915_WRITE(VSYNC(pipe),0x%08x)\n", vsync); printk(BIOS_SPEW, "Table has %d elements\n", niodefs); |