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)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 17 Sep 2009 21:46:48 +0000 (14:46 -0700)
commitd660467c3ff2a0b7413e1b7a51452b34ffb49e5f
tree39c562957364ba7c23c7d91b99b5e3041dcefc32
parentdecbbcda2965fadb9fbaaf4f9e057ae554aa3cfe
drm/i915: prevent FIFO calculation overflows on 32 bits with high dotclocks

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.

Cc: stable@kernel.org
Reported-by: Anton Khirnov <wyskas@gmail.com>
Tested-by: Anton Khirnov <wyskas@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/gpu/drm/i915/intel_display.c