]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks
authorJesse Barnes <jbarnes@virtuousgeek.org>
Fri, 11 Sep 2009 19:25:56 +0000 (12:25 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:32:06 +0000 (09:32 -0700)
commita0cea65ea326b6a87487349e04d1b6dd513b9c3b
tree388e10010943e1056d61b1f4a423821ec7ef7d65
parent29732ca5d6284c507cefd0b2b76b05b96b3a4f7d
drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks

commit d660467c3ff2a0b7413e1b7a51452b34ffb49e5f upstream.

A very high dotclock (e.g. 229500kHz as reported by Anton) can cause
the entries_required variable to overflow, potentially leading to a
FIFO watermark value that's too low to support the given mode.  Split
the division across the calculation to avoid this.

Reported-by: Anton Khirnov <wyskas@gmail.com>
Tested-by: Anton Khirnov <wyskas@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/intel_display.c