greg@unrelenting.technology has posted comments on this change. ( https://review.coreboot.org/c/libgfxinit/+/35869 )
Change subject: dp_info: read eDP 1.4+ DPCD link rates ......................................................................
Patch Set 1:
(4 comments)
o Install GNATprove (or download the prebuilt package from libre.adacore.com, e.g. spark-discovery-gpl-2017-x86_64-linux-bin.tar.gz)
Yeah, I should eventually try to package gnatprove in FreeBSD, but really don't have the energy for this right now. Thanks for pointing to the Linux binaries, I'll try that, that seems easy.
https://review.coreboot.org/c/libgfxinit/+/35869/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/libgfxinit/+/35869/1//COMMIT_MSG@12 PS1, Line 12: (And higher rate is required because the panel is high res.)
The high resolution is actually unrelated. libgfxinit could as well […]
But it didn't, it read this as the minimum speed..
https://review.coreboot.org/c/libgfxinit/+/35869/1/common/hw-gfx-dp_info.adb File common/hw-gfx-dp_info.adb:
https://review.coreboot.org/c/libgfxinit/+/35869/1/common/hw-gfx-dp_info.adb... PS1, Line 109: Rates_Size : constant := 8;
Linux's i915 reads up to 8 rates, thus 16 bytes.
oh.. I misread the Linux code, sorry.
So you did find where it's handled there :)
https://review.coreboot.org/c/libgfxinit/+/35869/1/common/hw-gfx-dp_info.adb... PS1, Line 120: Success := Success and Length = Caps_Size;
I guess I understand now how you interpret `Success`. You think it's kind the […]
Yeah, I thought it's `in out`, I was looking at the wrong parameter (and didn't know how out parameters really work in Ada)
https://review.coreboot.org/c/libgfxinit/+/35869/1/common/hw-gfx-dp_info.adb... PS1, Line 142: end if;
I would prefer a loop, especially considering the 8 rates.
I couldn't find a good way to step by 2 in loops.. Would looping over an array of constant indexes (0, 2, 4, …) be okay?
(+ from experience with ACSL, assumed that loops might need more effort for verification — though a 'foreach' type thing should be fine)
I don't really know anything about Ada, so feel free to suggest better code or rewrite anything.