diff options
| author | Dave Airlie <airlied@redhat.com> | 2011-11-11 11:17:43 +0000 | 
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2011-11-11 11:17:43 +0000 | 
| commit | 0007fa2416f350621709880357d2fc50c5233984 (patch) | |
| tree | a83f90df4b1a8dda7dc1c666071fea8f78b23df7 /drivers/gpu/drm/drm_irq.c | |
| parent | a6778e9e7fb57603f15344ceb30098a3f6b7caf4 (diff) | |
| parent | 5c79507b2c50ddab8f51bc692e3c0a39e3da2ad6 (diff) | |
| download | olio-linux-3.10-0007fa2416f350621709880357d2fc50c5233984.tar.xz olio-linux-3.10-0007fa2416f350621709880357d2fc50c5233984.zip  | |
Merge branch 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6 into drm-fixes
* 'drm-nouveau-fixes' of git://git.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: Fix bandwidth calculation for DisplayPort
  drm/nouveau: by default use low bpp framebuffer on low memory cards
  drm/nv10: Change the BO size threshold determining the memory placement range.
  drm/nvc0: enable acceleration for nvc1 by default
  drm/nvc0/gr: fixup the mmio list register writes for 0xc1
  drm/nvc1: hacky workaround to fix accel issues
  drm/nvc0/gr: fix some bugs in grctx generation
  drm/nvc0: enable acceleration on 0xc8 by default
  drm/nvc0/vram: skip disabled PBFB subunits
  drm/nv40/pm: fix issues on igp chipsets, which don't have memory
  drm/nouveau: testing the wrong variable
  drm/nvc0/vram: storage type 0xc3 is not compressed
  drm/nv50: fix stability issue on NV86.
  drm/nouveau: initialize chan->fence.lock before use
  drm/nv50/vram: fix incorrect detection of bank count on newer chipsets
  drm/nv50/gr: typo fix, how about we not reset fifo during graph init?
  drm/nv50/bios: fixup mpll programming from the init table parser
  drm/nouveau: fix oops if i2c bus not found in nouveau_i2c_identify()
  drm: make sure drm_vblank_init() has been called before touching vbl_lock
Diffstat (limited to 'drivers/gpu/drm/drm_irq.c')
| -rw-r--r-- | drivers/gpu/drm/drm_irq.c | 15 | 
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c index aa3ac0125d9..68b756253f9 100644 --- a/drivers/gpu/drm/drm_irq.c +++ b/drivers/gpu/drm/drm_irq.c @@ -407,13 +407,16 @@ int drm_irq_uninstall(struct drm_device *dev)  	/*  	 * Wake up any waiters so they don't hang.  	 */ -	spin_lock_irqsave(&dev->vbl_lock, irqflags); -	for (i = 0; i < dev->num_crtcs; i++) { -		DRM_WAKEUP(&dev->vbl_queue[i]); -		dev->vblank_enabled[i] = 0; -		dev->last_vblank[i] = dev->driver->get_vblank_counter(dev, i); +	if (dev->num_crtcs) { +		spin_lock_irqsave(&dev->vbl_lock, irqflags); +		for (i = 0; i < dev->num_crtcs; i++) { +			DRM_WAKEUP(&dev->vbl_queue[i]); +			dev->vblank_enabled[i] = 0; +			dev->last_vblank[i] = +				dev->driver->get_vblank_counter(dev, i); +		} +		spin_unlock_irqrestore(&dev->vbl_lock, irqflags);  	} -	spin_unlock_irqrestore(&dev->vbl_lock, irqflags);  	if (!irq_enabled)  		return -EINVAL;  |