summaryrefslogtreecommitdiffstats
path: root/sys/dev/drm/i915_irq.c
diff options
context:
space:
mode:
authorrnoland <rnoland@FreeBSD.org>2009-02-25 20:24:13 +0000
committerrnoland <rnoland@FreeBSD.org>2009-02-25 20:24:13 +0000
commit35f0e5ba8fbb4c47932378b8941120b11386e5ae (patch)
tree65bf3123733437cb4e8c62cdb4ab7e774c5a898e /sys/dev/drm/i915_irq.c
parent4abf3eb20011187bff9c7381d361fc9f7fef90bf (diff)
downloadFreeBSD-src-35f0e5ba8fbb4c47932378b8941120b11386e5ae.zip
FreeBSD-src-35f0e5ba8fbb4c47932378b8941120b11386e5ae.tar.gz
The GM45 handles vblank differently. Pull the changes from Intel in.
MFC after: 2 Weeks
Diffstat (limited to 'sys/dev/drm/i915_irq.c')
-rw-r--r--sys/dev/drm/i915_irq.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/dev/drm/i915_irq.c b/sys/dev/drm/i915_irq.c
index 3407e82..f30dcde 100644
--- a/sys/dev/drm/i915_irq.c
+++ b/sys/dev/drm/i915_irq.c
@@ -170,6 +170,19 @@ u32 i915_get_vblank_counter(struct drm_device *dev, int pipe)
return count;
}
+u32 gm45_get_vblank_counter(struct drm_device *dev, int pipe)
+{
+ drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
+ int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45;
+
+ if (!i915_pipe_enabled(dev, pipe)) {
+ DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe);
+ return 0;
+ }
+
+ return I915_READ(reg);
+}
+
irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
{
struct drm_device *dev = (struct drm_device *) arg;
OpenPOWER on IntegriCloud