plan9fox/sys
cinap_lenrek dab539cd14 vga/igfx: fix integer overflow in datam calculation (from qu7uux)
data[mn] and link[mn] are 24-bit values.
in the expression 'm = (n * ((freq * bpp)/8)) / (lsclk * lanes)',
uvlongs are used to prevent integer overflow, but since freq, bpp, lsclk and
lanes are all ints, the cast to uvlong does not happen until it's too late,
getting a wrong value.
instead, use u32int for m and n, and use casts where necessary.

example of bad calculation:
freq = 141400000
lsclk = 270000000
lanes = 2
bpp = 18
→ 0x7f3ee1ca6 (correct value: 0x4b69d0)
2016-06-30 11:58:40 +02:00
..
doc closed spew branch 2016-04-28 20:52:36 +02:00
games/lib fortunes: Emacs now supports webkit. 2016-06-19 18:40:46 -04:00
include aml: define amlintmask and set it according to DSDT revision (64bit / 32bit) 2016-06-05 14:57:38 +02:00
lib add polish keymap (thanks chomzee!) 2016-05-28 23:59:10 +02:00
man acme(1): remove references to awd 2016-06-30 01:07:03 +02:00
src vga/igfx: fix integer overflow in datam calculation (from qu7uux) 2016-06-30 11:58:40 +02:00