packages: kernel-desktop/kernel-desktop-intel-gpu-fifo.patch (NEW) - new

shadzik shadzik at pld-linux.org
Mon Sep 14 13:37:40 CEST 2009


Author: shadzik                      Date: Mon Sep 14 11:37:39 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/kernel-desktop:
   kernel-desktop-intel-gpu-fifo.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/kernel-desktop/kernel-desktop-intel-gpu-fifo.patch
diff -u /dev/null packages/kernel-desktop/kernel-desktop-intel-gpu-fifo.patch:1.1
--- /dev/null	Mon Sep 14 13:37:40 2009
+++ packages/kernel-desktop/kernel-desktop-intel-gpu-fifo.patch	Mon Sep 14 13:37:34 2009
@@ -0,0 +1,35 @@
+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 at kernel.org
+Reported-by: Anton Khirnov <wyskas at gmail.com>
+Tested-by: Anton Khirnov <wyskas at gmail.com>
+Signed-off-by: Jesse Barnes <jbarnes at virtuousgeek.org>
+
+diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+index cadb9ef..3f1727c 100644
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -2102,7 +2102,14 @@ static unsigned long intel_calculate_wm(unsigned long clock_in_khz,
+ {
+ 	long entries_required, wm_size;
+ 
+-	entries_required = (clock_in_khz * pixel_size * latency_ns) / 1000000;
++	/*
++	 * Note: we need to make sure we don't overflow for various clock &
++	 * latency values.
++	 * clocks go from a few thousand to several hundred thousand.
++	 * latency is usually a few thousand
++	 */
++	entries_required = ((clock_in_khz / 1000) * pixel_size * latency_ns) /
++		1000;
+ 	entries_required /= wm->cacheline_size;
+ 
+ 	DRM_DEBUG("FIFO entries required for mode: %d\n", entries_required);
+_______________________________________________
+Intel-gfx mailing list
+Intel-gfx at lists.freedesktop.org
+http://lists.freedesktop.org/mailman/listinfo/intel-gfx
+
================================================================


More information about the pld-cvs-commit mailing list