gma skl: Disable DDI clocks on reset path
After reset DPLL_CTRL2 is initialized to 0. Which means some clock disable bits are not set and might cause some hassle later. Set them and close the related TODO. Change-Id: I1a470dff55e317e8119906b3e397f6f2314abcbd Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/20648 Tested-by: Nico Huber <nico.h@gmx.de> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
8540805c29
commit
3a0e2a08f5
2
TODO
2
TODO
|
@ -4,6 +4,4 @@ unknown DP honor SINK_STATUS after training
|
||||||
|
|
||||||
low LVDS 8bit colors, data format???
|
low LVDS 8bit colors, data format???
|
||||||
|
|
||||||
medium SKL check if DPLL_CTRL2 really defaults to `Clock Off` => 0
|
|
||||||
|
|
||||||
medium gfxtest take care of our own framebuffer mapping
|
medium gfxtest take care of our own framebuffer mapping
|
||||||
|
|
|
@ -747,4 +747,18 @@ package body HW.GFX.GMA.Connectors.DDI is
|
||||||
end if;
|
end if;
|
||||||
end Off;
|
end Off;
|
||||||
|
|
||||||
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
procedure Post_Reset_Off
|
||||||
|
is
|
||||||
|
Clocks_Off : Word32 := 0;
|
||||||
|
begin
|
||||||
|
if not Config.Has_Per_DDI_Clock_Sel and not Config.Has_DDI_PHYs then
|
||||||
|
for Port in Digital_Port loop
|
||||||
|
Clocks_Off := Clocks_Off or DPLL_CTRL2_DDIx_CLOCK_OFF (Port);
|
||||||
|
end loop;
|
||||||
|
Registers.Set_Mask (Registers.DPLL_CTRL2, Clocks_Off);
|
||||||
|
end if;
|
||||||
|
end Post_Reset_Off;
|
||||||
|
|
||||||
end HW.GFX.GMA.Connectors.DDI;
|
end HW.GFX.GMA.Connectors.DDI;
|
||||||
|
|
|
@ -28,6 +28,8 @@ is
|
||||||
|
|
||||||
procedure Off (Port : Digital_Port);
|
procedure Off (Port : Digital_Port);
|
||||||
|
|
||||||
|
procedure Post_Reset_Off;
|
||||||
|
|
||||||
private
|
private
|
||||||
type Buf_Trans_Range is range 0 .. 19;
|
type Buf_Trans_Range is range 0 .. 19;
|
||||||
type Buf_Trans_Array is array (Buf_Trans_Range) of Word32;
|
type Buf_Trans_Array is array (Buf_Trans_Range) of Word32;
|
||||||
|
|
|
@ -21,6 +21,12 @@ with GNAT.Source_Info;
|
||||||
|
|
||||||
package body HW.GFX.GMA.Connectors is
|
package body HW.GFX.GMA.Connectors is
|
||||||
|
|
||||||
|
procedure Post_Reset_Off
|
||||||
|
is
|
||||||
|
begin
|
||||||
|
DDI.Post_Reset_Off;
|
||||||
|
end Post_Reset_Off;
|
||||||
|
|
||||||
procedure Initialize
|
procedure Initialize
|
||||||
is
|
is
|
||||||
begin
|
begin
|
||||||
|
|
|
@ -14,10 +14,11 @@
|
||||||
|
|
||||||
private package HW.GFX.GMA.Connectors is
|
private package HW.GFX.GMA.Connectors is
|
||||||
|
|
||||||
pragma Warnings (GNATprove, Off, "subprogram ""Initialize"" has no effect",
|
pragma Warnings (GNATprove, Off, "subprogram ""*"" has no effect",
|
||||||
Reason => "Only effects some platforms");
|
Reason => "Only effects some platforms");
|
||||||
|
procedure Post_Reset_Off;
|
||||||
procedure Initialize;
|
procedure Initialize;
|
||||||
pragma Warnings (GNATprove, On, "subprogram ""Initialize"" has no effect");
|
pragma Warnings (GNATprove, On, "subprogram ""*"" has no effect");
|
||||||
|
|
||||||
pragma Warnings (GNATprove, Off, "unused variable ""P*""",
|
pragma Warnings (GNATprove, Off, "unused variable ""P*""",
|
||||||
Reason => "Needed for a common interface");
|
Reason => "Needed for a common interface");
|
||||||
|
|
|
@ -408,8 +408,10 @@ is
|
||||||
Registers.Clear_Fences;
|
Registers.Clear_Fences;
|
||||||
else
|
else
|
||||||
-- According to PRMs, VGA plane is the only thing
|
-- According to PRMs, VGA plane is the only thing
|
||||||
-- that's enabled by default after reset.
|
-- that's enabled by default after reset...
|
||||||
Display_Controller.Legacy_VGA_Off;
|
Display_Controller.Legacy_VGA_Off;
|
||||||
|
-- ... along with some DDI port bits since Skylake.
|
||||||
|
Connectors.Post_Reset_Off;
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
-------------------- Now restart from a clean state ---------------------
|
-------------------- Now restart from a clean state ---------------------
|
||||||
|
|
|
@ -29,11 +29,8 @@ with GNAT.Source_Info;
|
||||||
package body HW.GFX.GMA.Connectors
|
package body HW.GFX.GMA.Connectors
|
||||||
is
|
is
|
||||||
|
|
||||||
procedure Initialize
|
procedure Post_Reset_Off is null;
|
||||||
is
|
procedure Initialize is null;
|
||||||
begin
|
|
||||||
null;
|
|
||||||
end Initialize;
|
|
||||||
|
|
||||||
function Is_Internal (Port_Cfg : Port_Config) return Boolean
|
function Is_Internal (Port_Cfg : Port_Config) return Boolean
|
||||||
is
|
is
|
||||||
|
|
Loading…
Reference in New Issue