aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/intel/gma/hires_fb
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-07-16 16:40:41 +0200
committerNico Huber <nico.h@gmx.de>2017-10-28 19:46:17 +0000
commit504d1eff4bd324915f5c44223ab03086b0cbbd2c (patch)
treebde35bdf0c7bd59456af336735c4e5c69bfc71ae /src/drivers/intel/gma/hires_fb
parent18228168a5e5ada33390ca96ef4b6ee80a509a89 (diff)
3rdparty/lib{hwbase,gfxinit}: Update to latest master
Simplifies our C interface function gma_gfxinit(), due to the following changes: * *libgfxinit* knows about the underlying PCI device now and can probe MMIO addresses by itself. * The framebuffer mapping is now completely handled inside the library where we validate that we neither overflow - the stolen memory, - the GTT address space, the GTT itself nor - the aperture window (i.e. resource2 of the PCI device) that we use to access the framebuffer. Other changes: * Fixes and a quirk for DP training. * Fix for DP-VGA adapters that report an analog display in EDID. * Fixes for Skylake support with coreboot. * DDI Buffer drive-strength configuration for Haswell, Broadwell and Skylake. * `gfx_test` can now be run from X windows (with glitches). * Compatibility with GCC 7 and SPARK GPL 2017. TEST=Booted lenovo/t420 and verified that everything works as usual. Change-Id: I001ba973d864811503410579fd7ad55ab8612759 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/20606 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src/drivers/intel/gma/hires_fb')
-rw-r--r--src/drivers/intel/gma/hires_fb/gma.adb27
1 files changed, 13 insertions, 14 deletions
diff --git a/src/drivers/intel/gma/hires_fb/gma.adb b/src/drivers/intel/gma/hires_fb/gma.adb
index 7fe4e1200d..b1168acd4d 100644
--- a/src/drivers/intel/gma/hires_fb/gma.adb
+++ b/src/drivers/intel/gma/hires_fb/gma.adb
@@ -50,13 +50,10 @@ is
----------------------------------------------------------------------------
- procedure gfxinit
- (mmio_base : in word64;
- linear_fb : in word64;
- phys_fb : in word32;
- lightup_ok : out Interfaces.C.int)
+ procedure gfxinit (lightup_ok : out Interfaces.C.int)
is
use type pos32;
+ use type word64;
ports : Port_List;
configs : Pipe_Configs;
@@ -68,9 +65,7 @@ is
begin
lightup_ok := 0;
- HW.GFX.GMA.Initialize
- (MMIO_Base => mmio_base,
- Success => success);
+ HW.GFX.GMA.Initialize (Success => success);
if success then
ports := Mainboard.ports;
@@ -98,15 +93,19 @@ is
HW.GFX.GMA.Dump_Configs (configs);
- HW.GFX.GMA.Setup_Default_GTT (fb, phys_fb);
- HW.GFX.Framebuffer_Filler.Fill (linear_fb, fb);
+ HW.GFX.GMA.Setup_Default_FB
+ (FB => fb,
+ Clear => true,
+ Success => success);
- HW.GFX.GMA.Update_Outputs (configs);
+ if success then
+ HW.GFX.GMA.Update_Outputs (configs);
- linear_fb_addr := linear_fb;
- fb_valid := true;
+ HW.GFX.GMA.Map_Linear_FB (linear_fb_addr, fb);
+ fb_valid := linear_fb_addr /= 0;
- lightup_ok := 1;
+ lightup_ok := (if fb_valid then 1 else 0);
+ end if;
end if;
end if;
end gfxinit;