diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-03 11:34:50 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2009-04-03 11:34:50 +0000 |
commit | d1c647af2ed78ba07cac9e32438c6f437239a56b (patch) | |
tree | 2ee78adec3ff554ebea59b9db68996196ff041f5 /sys | |
parent | c869e9dab9822b474b8d72c4bb9fe9ec3547f8d3 (diff) |
use i915_pipe_enabled() to test to see if the pipe is lit up, instead of
expanding the function in line here.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/i915_irq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/i915_irq.c b/sys/dev/pci/drm/i915_irq.c index 6aa8541d9f0..b141c2a90fe 100644 --- a/sys/dev/pci/drm/i915_irq.c +++ b/sys/dev/pci/drm/i915_irq.c @@ -171,7 +171,7 @@ i915_get_vblank_counter(struct drm_device *dev, int plane) high_frame = pipe ? PIPEBFRAMEHIGH : PIPEAFRAMEHIGH; low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL; - if (!i915_pipe_enabled(dev, pipe)) { + if (i915_pipe_enabled(dev, pipe) == 0) { DRM_DEBUG("trying to get vblank count for disabled pipe %d\n", pipe); return (0); @@ -360,9 +360,8 @@ int i915_enable_vblank(struct drm_device *dev, int plane) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; int pipe = i915_get_pipe(dev, plane); - int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF; - - if ((I915_READ(pipeconf_reg) & PIPEACONF_ENABLE) == 0) + + if (i915_pipe_enabled(dev, pipe) == 0) return (EINVAL); mtx_enter(&dev_priv->user_irq_lock); |