diff options
author | Jeremy Compostella <jeremy.compostella@intel.com> | 2023-01-19 18:58:30 -0700 |
---|---|---|
committer | Nick Vaccaro <nvaccaro@google.com> | 2023-01-26 16:53:35 +0000 |
commit | b628beca3428731b6ea43218caa27bdaf8eb651d (patch) | |
tree | 139228ca748e7e11a6301cd0639c8b12446d46be /src/drivers/intel/gma/text_fb | |
parent | e02e918eba3f0803d354faf3d28072ee2307f7e5 (diff) |
drivers/intel/gma: Use libgfxinit Update_Output to turn off graphics
We were using the libgfxinit `Initialize' function with the
`Clean_State' parameter because the more appropriate `Update_Output'
function was not performing all the necessary clean up operations for
the PEIM driver to be successful when libgfxinit was used in romstage.
Thanks to a lot of experiments and some log analysis efforts, we were
able to identify the missing operation and fix the `Update_Output'
function (cf. https://review.coreboot.org/c/libgfxinit/+/72123).
The `initialized' global variable is now unnecessary as we track the
initialization in the Ada code instead.
Since the `Update_Output' function does not return any value, this
patch modifies the `gma_gfxstop' prototype accordingly. This does not
have any impact as the return value was not used anyway.
BUG=b:264526798
BRANCH=firmware-brya-14505.B
TEST=Developer screen is visible
Change-Id: I53d6fadf65dc09bd984de96edb4c1f15b64aeed0
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72125
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Diffstat (limited to 'src/drivers/intel/gma/text_fb')
-rw-r--r-- | src/drivers/intel/gma/text_fb/gma-gfx_init.adb | 16 |
1 files changed, 7 insertions, 9 deletions
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 cec21b5310..912b1b605c 100644 --- a/src/drivers/intel/gma/text_fb/gma-gfx_init.adb +++ b/src/drivers/intel/gma/text_fb/gma-gfx_init.adb @@ -12,11 +12,11 @@ with GMA.Mainboard; package body GMA.GFX_Init is + configs : Pipe_Configs; procedure gfxinit (lightup_ok : out Interfaces.C.int) is ports : Port_List; - configs : Pipe_Configs; success : boolean; @@ -56,16 +56,14 @@ is end if; end gfxinit; - procedure gfxstop (stop_ok : out Interfaces.C.int) + procedure gfxstop is - success : boolean; begin - HW.GFX.GMA.Initialize (Clean_State => True, - Success => success); - if success then - stop_ok := 1; - else - stop_ok := 0; + if configs (Primary).Port /= Disabled then + for i in Pipe_Index loop + configs (i).Port := Disabled; + end loop; + HW.GFX.GMA.Update_Outputs (configs); end if; end gfxstop; |