diff options
author | rnoland <rnoland@FreeBSD.org> | 2009-06-20 16:45:14 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2009-06-20 16:45:14 +0000 |
commit | 4f053b746068039dffb792ad21ebb9873a095484 (patch) | |
tree | 8cc110213abb93223d0459a173133d65c5cfa8cf /sys/dev/drm/i915_dma.c | |
parent | 36023fcd0281ea8e5b75983968d2738a6e73204f (diff) | |
download | FreeBSD-src-4f053b746068039dffb792ad21ebb9873a095484.zip FreeBSD-src-4f053b746068039dffb792ad21ebb9873a095484.tar.gz |
The G45 docs indicate that all G4X chips use the new framecount register.
Intel agrees with my reading of the docs, make it so for all G4X chips.
The new register also has a 32 bit width as opposed to 24 bits. Fix
things up so that the counters roll over properly.
MFC after: 3 days
Diffstat (limited to 'sys/dev/drm/i915_dma.c')
-rw-r--r-- | sys/dev/drm/i915_dma.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/drm/i915_dma.c b/sys/dev/drm/i915_dma.c index a701a5e..d2f27b6 100644 --- a/sys/dev/drm/i915_dma.c +++ b/sys/dev/drm/i915_dma.c @@ -871,10 +871,13 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) ret = drm_addmap(dev, base, size, _DRM_REGISTERS, _DRM_KERNEL | _DRM_DRIVER, &dev_priv->mmio_map); - if (IS_GM45(dev)) - dev->driver->get_vblank_counter = gm45_get_vblank_counter; - else + if (IS_G4X(dev)) { + dev->driver->get_vblank_counter = g45_get_vblank_counter; + dev->max_vblank_count = 0xffffffff; /* 32 bits of frame count */ + } else { dev->driver->get_vblank_counter = i915_get_vblank_counter; + dev->max_vblank_count = 0x00ffffff; /* 24 bits of frame count */ + } #ifdef I915_HAVE_GEM i915_gem_load(dev); |