summaryrefslogtreecommitdiff
path: root/src/lib/hexstrtobin.c
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2016-09-02 22:35:32 +0200
committerMartin Roth <martinroth@google.com>2016-09-30 17:11:40 +0200
commit7dfc8a5ebdf6b272de4373da945d756eadcf2786 (patch)
treecca88cc129a48409da59ccf33d454b162c89ae63 /src/lib/hexstrtobin.c
parent494d398ae43126aec611238a9d30c7b0020cb251 (diff)
i945/gma.c: use linux code to calculate divisors
The code to compute n, m1, m2, p1 divisors is not correct in coreboot and on some targets hits a working mode at lower refresh rate, which is why display is working on some targets. The divisors must be such "refclk * (5 * (m1 + 2) + (m2 + 2))/ (n + 2) / (p1 * p2)" is as close as possible to the target frequency (which is defined by the resolution and refresh rate). This patch also fixes the reference frequency. This patch reuses linux (4.1) code from drivers/gpu/drm/i915/intel_display.c to correctly compute divisors. The result is that some previously not working displays, like many displays found on the Lenovo T60 might work now. Some examples of T60 displays that were known to not work (in payload): Samsung LTN141XA-L01 (14.1" 1024x768) LG-Philips LP150X09 (15.1" 1024x768) IDtech N150U3-L01 (15.1" 1600x1200) IDtech IAQX10N (15.1" 2048x1536) Samsung LTN154X3-L0A (15.4" 1280x800) LG-Philips LP150E06-A5K4 (15.1" 1400x1050) Tested on T60 with 1024x786. Change-Id: I2c7f3bb0024ac005029eaebe3ecdc70c38ac777e Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/16504 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/lib/hexstrtobin.c')
0 files changed, 0 insertions, 0 deletions