Author: arekm                        Date: Fri Sep 11 19:34:41 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- fix entries overflow that can cause flickering

---- Files affected:
packages/kernel:
   kernel.spec (1.703 -> 1.704) , kernel-intel-gpu-fifo.patch (NONE -> 1.1)  
(NEW)

---- Diffs:

================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.703 packages/kernel/kernel.spec:1.704
--- packages/kernel/kernel.spec:1.703   Fri Sep 11 14:47:34 2009
+++ packages/kernel/kernel.spec Fri Sep 11 21:34:35 2009
@@ -313,6 +313,7 @@
 Patch2003:     kernel-regressions.patch
 
 Patch2100:     kernel-intel-pre-9xx.patch
+Patch2101:     kernel-intel-gpu-fifo.patch
 
 # kill some thousands of warnings
 # (only warnings, so just remove parts of this patch if conflics)
@@ -904,6 +905,7 @@
 #%patch2003 -p1
 
 %patch2100 -p1
+%patch2101 -p1
 
 # Fix EXTRAVERSION in main Makefile
 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = 
%{postver}%{?alt_kernel:_%{alt_kernel}}#g' Makefile
@@ -1583,6 +1585,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.704  2009/09/11 19:34:35  arekm
+- fix entries overflow that can cause flickering
+
 Revision 1.703  2009/09/11 12:47:34  arekm
 - intel 8xx stability fixes
 

================================================================
Index: packages/kernel/kernel-intel-gpu-fifo.patch
diff -u /dev/null packages/kernel/kernel-intel-gpu-fifo.patch:1.1
--- /dev/null   Fri Sep 11 21:34:41 2009
+++ packages/kernel/kernel-intel-gpu-fifo.patch Fri Sep 11 21:34:35 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: [email protected]
+Reported-by: Anton Khirnov <[email protected]>
+Tested-by: Anton Khirnov <[email protected]>
+Signed-off-by: Jesse Barnes <[email protected]>
+
+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
[email protected]
+http://lists.freedesktop.org/mailman/listinfo/intel-gfx
+
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.703&r2=1.704&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to