drm/nv20: Use the nv30 CRTC bandwidth calculation code.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 26 Aug 2010 21:07:02 +0000 (23:07 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 24 Sep 2010 06:17:59 +0000 (16:17 +1000)
commit4295f188e8297660b498e021caee430a40558d8b
tree9cec49772202a50ed168c0215a48f6b22f79fc16
parent316f60a120a8f1dacb574f705d5faf7eac3e6e2a
drm/nv20: Use the nv30 CRTC bandwidth calculation code.

nv2x CRTC FIFOs are as large as in nv3x (4kB it seems), and the FIFO
control registers have the same layout: we can make them share the
same implementation.

Previously we were using the nv1x code, but the calculated FIFO
watermarks are usually too low for nv2x and they cause horrible
scanout artifacts. They've gone unnoticed until now because we've been
leaving one of the bandwidth regs uninitialized (CRE 47, which
contains the most significant bits of FFLWM), so everything seemed to
work fine except in some cases after a cold boot, depending on the
memory bandwidth and pixel clocks used.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_calc.c
drivers/gpu/drm/nouveau/nouveau_hw.c
drivers/gpu/drm/nouveau/nv04_crtc.c