Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/44795 )
Change subject: gma baytrail: Add PLL initialisation code ......................................................................
Patch Set 8:
(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;
Sharing is possible, but tricky to do (IIRC there's special bits in the DPLL registers to do it). […]
Actually, I need to have some sort of refined state because of contracts, so I had to keep a boolean array.
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... PS3, Line 129: if P = 0 then
It can never be zero given the ranges. I'll drop this.
Done
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... PS3, Line 336: end Unlock_DPLL_Regs;
I had this here because there are two sets of panel control registers (and a while ago only one pane […]
Done
https://review.coreboot.org/c/libgfxinit/+/44795/3/common/valleyview/hw-gfx-... PS3, Line 584: return (if PLL = DPLL_B then 1 else 0);
Probably not
It's used by hw-gfx-gma.adb for PLL_Hint. I've replaced it with a function expression instead, for the sake of brevity.