summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/via/via_irq.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-07-18 06:19:50 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-07-18 06:19:50 +0200
commit78af08d90b8f745044b1274430bc4bc6b2b27aca (patch)
tree9e233eb5acf9974bf02de57a9d88c35f86629114 /drivers/gpu/drm/via/via_irq.c
parentMerge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/fyu/l... (diff)
parentdrm: Move a dereference below a NULL test (diff)
downloadlinux-78af08d90b8f745044b1274430bc4bc6b2b27aca.tar.xz
linux-78af08d90b8f745044b1274430bc4bc6b2b27aca.zip
Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: drm: Move a dereference below a NULL test fb/intelfb: conflict with DRM_I915 and hide by default drm/ttm: fix misplaced parentheses drm/via: Fix vblank IRQ on VIA hardware. drm: drm_gem, check kzalloc retval drm: drm_debugfs, check kmalloc retval drm/radeon: add some missing pci ids
Diffstat (limited to 'drivers/gpu/drm/via/via_irq.c')
-rw-r--r--drivers/gpu/drm/via/via_irq.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/via/via_irq.c b/drivers/gpu/drm/via/via_irq.c
index c248c1d37268..5935b8842e86 100644
--- a/drivers/gpu/drm/via/via_irq.c
+++ b/drivers/gpu/drm/via/via_irq.c
@@ -183,7 +183,7 @@ 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_WRITE(VIA_REG_INTERRUPT, status | VIA_IRQ_VBLANK_ENABLE);
VIA_WRITE8(0x83d4, 0x11);
VIA_WRITE8(0x83d5, VIA_READ8(0x83d5) | 0x30);
@@ -194,6 +194,10 @@ int via_enable_vblank(struct drm_device *dev, int crtc)
void via_disable_vblank(struct drm_device *dev, int crtc)
{
drm_via_private_t *dev_priv = dev->dev_private;
+ u32 status;
+
+ 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);