diff options
author | Thomas Hellstrom | 2008-03-16 05:29:57 -0500 |
---|---|---|
committer | Thomas Hellstrom | 2008-03-16 05:45:57 -0500 |
commit | 563fe9dcd4d08de8864ade161258df891f3db471 (patch) | |
tree | 5975e7ac6b77d6c5e5b353ae27cc2edd32b966fe /shared-core | |
parent | afa803ee40c1d06066f58a34761be58ba03badb5 (diff) | |
download | external-libdrm-563fe9dcd4d08de8864ade161258df891f3db471.tar.gz external-libdrm-563fe9dcd4d08de8864ade161258df891f3db471.tar.xz external-libdrm-563fe9dcd4d08de8864ade161258df891f3db471.zip |
[via] Fix driver after vblank-rework merge.
Diffstat (limited to 'shared-core')
-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) | |||
190 | 190 | ||
191 | status = VIA_READ(VIA_REG_INTERRUPT); | 191 | status = VIA_READ(VIA_REG_INTERRUPT); |
192 | VIA_WRITE(VIA_REG_INTERRUPT, status & VIA_IRQ_VBLANK_ENABLE); | 192 | VIA_WRITE(VIA_REG_INTERRUPT, status & VIA_IRQ_VBLANK_ENABLE); |
193 | |||
194 | VIA_WRITE8(0x83d4, 0x11); | ||
195 | VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30); | ||
196 | |||
193 | return 0; | 197 | return 0; |
194 | } | 198 | } |
195 | 199 | ||
196 | void via_disable_vblank(struct drm_device *dev, int crtc) | 200 | void via_disable_vblank(struct drm_device *dev, int crtc) |
197 | { | 201 | { |
202 | drm_via_private_t *dev_priv = dev->dev_private; | ||
203 | |||
204 | VIA_WRITE8(0x83d4, 0x11); | ||
205 | VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) & ~0x30); | ||
206 | |||
198 | if (crtc != 0) | 207 | if (crtc != 0) |
199 | DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); | 208 | DRM_ERROR("%s: bad crtc %d\n", __FUNCTION__, crtc); |
200 | } | 209 | } |
@@ -311,6 +320,7 @@ int via_driver_irq_postinstall(struct drm_device * dev) | |||
311 | if (!dev_priv) | 320 | if (!dev_priv) |
312 | return -EINVAL; | 321 | return -EINVAL; |
313 | 322 | ||
323 | drm_vblank_init(dev, 1); | ||
314 | status = VIA_READ(VIA_REG_INTERRUPT); | 324 | status = VIA_READ(VIA_REG_INTERRUPT); |
315 | VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL | 325 | VIA_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_GLOBAL |
316 | | dev_priv->irq_enable_mask); | 326 | | dev_priv->irq_enable_mask); |