]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: FIFO watermark calculation fixes
authorJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 14 Jul 2009 17:15:56 +0000 (10:15 -0700)
committerEric Anholt <eric@anholt.net>
Tue, 14 Jul 2009 22:33:25 +0000 (15:33 -0700)
commitcac755c6b41635256b581bbdc8044cb1e6a8dfac
treeb3ea4aedd765071b0dbaf382974bc4683244cb83
parente22d523f7a7524521e8180613207ec875563985b
drm/i915: FIFO watermark calculation fixes

I discovered several bugs in the FIFO code that was recently applied.
Some of them fell into the "how did this ever work" category, since in
some cases we were using the wrong FIFO size values, and the
calculations ended up being way off.

This patch fixes all the bugs I found, and works well on my GM45, 915GM
and 855GM test machines; but as usual with these sorts of patches
broader testing is definitely requested (in particular this patch
affects 830, 845 and 865 for which I don't have test hardware).

Overall, the patch clarifies the watermark calculation function by
adding some comments and debug info, and making the variable names a
bit clearer.  The "get FIFO size" portion of the code has also been
corrected, so we should be able to properly detect the FIFO allocations
for each pipe, for use in the watermark calculation.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_display.c