summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2022-12-01 15:55:06 -0700
committerSubrata Banik <subratabanik@google.com>2023-01-12 02:54:09 +0000
commit47f154c8e593be37ee298e976a37012f44c2a247 (patch)
tree46831caa6f1ea5920d63d003ff7ca889a7b02d0a /src/drivers
parentca025203a84f11f365792919e320e1f57c0a5c50 (diff)
soc/intel/common/block: Add Intel VGA early graphics support
This patch introduces an early graphics driver which can be used in romstage in cache-as-ram mode. The implementation relies on `libgfxinit' and provide VGA text mode support. SoCs wanting to take advantage of this driver must implement the `early_graphics_soc_panel_init' function to set the panel power sequence timing parameters. BUG=b:252792591 BRANCH=firmware-brya-14505.B TEST=Graphics bring up observed on skolas with extra patches Change-Id: Ie4ad1215e5fadd0adc1271b6bd6ddb0ea258cb5b Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/70299 Reviewed-by: Tarun Tuli <taruntuli@google.com> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Maulik Vaghela <maulikvaghela@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/gma/gma-gfx_init.ads3
-rw-r--r--src/drivers/intel/gma/hires_fb/gma-gfx_init.adb13
-rw-r--r--src/drivers/intel/gma/libgfxinit.h1
-rw-r--r--src/drivers/intel/gma/text_fb/gma-gfx_init.adb13
4 files changed, 30 insertions, 0 deletions
diff --git a/src/drivers/intel/gma/gma-gfx_init.ads b/src/drivers/intel/gma/gma-gfx_init.ads
index 4998d3312e..fc45672ee0 100644
--- a/src/drivers/intel/gma/gma-gfx_init.ads
+++ b/src/drivers/intel/gma/gma-gfx_init.ads
@@ -11,6 +11,9 @@ is
procedure gfxinit (lightup_ok : out Interfaces.C.int);
pragma Export (C, gfxinit, "gma_gfxinit");
+ procedure gfxstop (stop_ok : out Interfaces.C.int);
+ pragma Export (C, gfxstop, "gma_gfxstop");
+
----------------------------------------------------------------------------
function c_fb_add_framebuffer_info
diff --git a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb
index b213030b2b..83516af171 100644
--- a/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb
+++ b/src/drivers/intel/gma/hires_fb/gma-gfx_init.adb
@@ -97,4 +97,17 @@ is
end if;
end gfxinit;
+ procedure gfxstop (stop_ok : out Interfaces.C.int)
+ is
+ success : boolean;
+ begin
+ HW.GFX.GMA.Initialize (Clean_State => True,
+ Success => success);
+ if success then
+ stop_ok := 1;
+ else
+ stop_ok := 0;
+ end if;
+ end gfxstop;
+
end GMA.GFX_Init;
diff --git a/src/drivers/intel/gma/libgfxinit.h b/src/drivers/intel/gma/libgfxinit.h
index 9a7e1c6f90..3270b91752 100644
--- a/src/drivers/intel/gma/libgfxinit.h
+++ b/src/drivers/intel/gma/libgfxinit.h
@@ -17,6 +17,7 @@ enum {
};
void gma_gfxinit(int *lightup_ok);
+void gma_gfxstop(int *stop_ok);
int gma_read_edid(unsigned char edid[], int port);
#endif
diff --git a/src/drivers/intel/gma/text_fb/gma-gfx_init.adb b/src/drivers/intel/gma/text_fb/gma-gfx_init.adb
index d27385247e..da1e609b79 100644
--- a/src/drivers/intel/gma/text_fb/gma-gfx_init.adb
+++ b/src/drivers/intel/gma/text_fb/gma-gfx_init.adb
@@ -56,4 +56,17 @@ is
end if;
end gfxinit;
+ procedure gfxstop (stop_ok : out Interfaces.C.int)
+ is
+ success : boolean;
+ begin
+ HW.GFX.GMA.Initialize (Clean_State => True,
+ Success => success);
+ if success then
+ stop_ok := 1;
+ else
+ stop_ok := 0;
+ end if;
+ end gfxstop;
+
end GMA.GFX_Init;