diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2008-03-16 11:29:57 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2008-03-16 11:45:57 +0100 |
commit | 563fe9dcd4d08de8864ade161258df891f3db471 (patch) | |
tree | 5975e7ac6b77d6c5e5b353ae27cc2edd32b966fe | |
parent | afa803ee40c1d06066f58a34761be58ba03badb5 (diff) |
[via] Fix driver after vblank-rework merge.
-rw-r--r-- | shared-core/via_irq.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/shared-core/via_irq.c b/shared-core/via_irq.c index b8e652e6..c3279f8b 100644 --- a/shared-core/via_irq.c +++ b/shared-core/via_irq.c @@ -190,11 +190,20 @@ int via_enable_vblank(struct drm_device *dev, int crtc) status = VIA_READ(VIA_REG_INTERRUPT); VIA_WRITE(VIA_REG_INTERRUPT, status & VIA_IRQ_VBLANK_ENABLE); + + VIA_WRITE8(0x83d4, 0x11); + VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30); + return 0; } void via_disable_vblank(struct drm_device *dev, int crtc) { + drm_via_private_t *dev_priv = dev->dev_private; + + VIA_WRITE8(0x83d4, 0x11); + VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) & ~0x30); + if (crtc != 0) DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); } @@ -311,6 +320,7 @@ int via_driver_irq_postinstall(struct drm_device * dev) if (!dev_priv) return -EINVAL; + drm_vblank_init(dev, 1); status = VIA_READ(VIA_REG_INTERRUPT); VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL | dev_priv->irq_enable_mask); |