summaryrefslogtreecommitdiff
path: root/src/drivers/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/intel')
-rw-r--r--src/drivers/intel/gma/gma.ads6
-rw-r--r--src/drivers/intel/gma/hires_fb/gma.adb27
-rw-r--r--src/drivers/intel/gma/libgfxinit.h2
-rw-r--r--src/drivers/intel/gma/text_fb/gma.adb10
4 files changed, 17 insertions, 28 deletions
diff --git a/src/drivers/intel/gma/gma.ads b/src/drivers/intel/gma/gma.ads
index 157ec89fcc..7286e7e568 100644
--- a/src/drivers/intel/gma/gma.ads
+++ b/src/drivers/intel/gma/gma.ads
@@ -6,11 +6,7 @@ use HW;
package GMA
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);
pragma Export (C, gfxinit, "gma_gfxinit");
----------------------------------------------------------------------------
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;
diff --git a/src/drivers/intel/gma/libgfxinit.h b/src/drivers/intel/gma/libgfxinit.h
index 9b28f80b5f..c67870e4e0 100644
--- a/src/drivers/intel/gma/libgfxinit.h
+++ b/src/drivers/intel/gma/libgfxinit.h
@@ -14,6 +14,6 @@
#ifndef DRIVERS_INTEL_GMA_LIBGFXINIT_H
#define DRIVERS_INTEL_GMA_LIBGFXINIT_H
-void gma_gfxinit(u64 mmio_base, u64 linear_fb, u32 phys_fb, int *success);
+void gma_gfxinit(int *lightup_ok);
#endif
diff --git a/src/drivers/intel/gma/text_fb/gma.adb b/src/drivers/intel/gma/text_fb/gma.adb
index 6453571d8c..ded7b9ee62 100644
--- a/src/drivers/intel/gma/text_fb/gma.adb
+++ b/src/drivers/intel/gma/text_fb/gma.adb
@@ -22,11 +22,7 @@ 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
ports : Port_List;
configs : Pipe_Configs;
@@ -41,9 +37,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;