Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/44795 )
Change subject: gma baytrail: Add PLL initialisation code ......................................................................
Patch Set 9:
(4 comments)
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... File common/valleyview/hw-gfx-gma-plls.adb:
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... PS3, Line 31: type Count_Range is new Natural range 0 .. 2; : : type PLL_State is record : Use_Count : Count_Range; : Used_For_DP : Boolean; : Link_Rate : DP_Bandwidth; : Mode : Mode_Type; : end record; : : type PLL_State_Array is array (DPLLs) of PLL_State; : : PLLs : PLL_State_Array;
Actually, I need to have some sort of refined state because of contracts, so I had to keep a boolean […]
Ah, that's tricky. I had to look at Broxton, how it's done :)
with Refined_State => (State => null)
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... PS3, Line 584: return (if PLL = DPLL_B then 1 else 0);
It's used by hw-gfx-gma.adb for PLL_Hint. […]
Yes that's how it's passed around (through `GMA.Connectors`). But IIRC, it never hits any register in the VLV code?
https://review.coreboot.org/c/libgfxinit/+/44795/9/common/valleyview/hw-gfx-... File common/valleyview/hw-gfx-gma-plls.adb:
https://review.coreboot.org/c/libgfxinit/+/44795/9/common/valleyview/hw-gfx-... PS9, Line 452: for P in DPLLs loop AIUI, this is not going to work because you can't cross streams. Unless I missed something, we don't configure which PLL is used for which pipe, so Pipe A should always use PLL A etc. The big comment on the top of `intel_dpio_phy.c` also suggests so.
Tests might not cover this if Pipe A is always enabled first.
We might have to add a `Pipe` parameter to all `Alloc_Configurable` for this. Annoyingly will need lots of annotations for unused parameters too :-/
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... File common/valleyview/hw-gfx-gma-plls.ads:
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... PS3, Line 41: Actually, I keep it more airy at the package level.