Skip to content

Commit

Permalink
Merge branch 'drm-linus' of master.kernel.org:/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/airlied/drm-2.6
  • Loading branch information
Linus Torvalds committed Nov 26, 2005
2 parents b3eb67a + cf65f16 commit 42aacfb
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions drivers/char/drm/drm_lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@ int drm_lock(struct inode *inode, struct file *filp,
__set_current_state(TASK_RUNNING);
remove_wait_queue(&dev->lock.lock_queue, &entry);

DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");
if (ret)
return ret;

sigemptyset(&dev->sigmask);
sigaddset(&dev->sigmask, SIGSTOP);
sigaddset(&dev->sigmask, SIGTSTP);
Expand All @@ -116,8 +120,12 @@ int drm_lock(struct inode *inode, struct file *filp,
if (dev->driver->dma_ready && (lock.flags & _DRM_LOCK_READY))
dev->driver->dma_ready(dev);

if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT))
return dev->driver->dma_quiescent(dev);
if (dev->driver->dma_quiescent && (lock.flags & _DRM_LOCK_QUIESCENT)) {
if (dev->driver->dma_quiescent(dev)) {
DRM_DEBUG("%d waiting for DMA quiescent\n", lock.context);
return DRM_ERR(EBUSY);
}
}

/* dev->driver->kernel_context_switch isn't used by any of the x86
* drivers but is used by the Sparc driver.
Expand All @@ -128,9 +136,7 @@ int drm_lock(struct inode *inode, struct file *filp,
dev->driver->kernel_context_switch(dev, dev->last_context,
lock.context);
}
DRM_DEBUG("%d %s\n", lock.context, ret ? "interrupted" : "has lock");

return ret;
return 0;
}

/**
Expand Down

0 comments on commit 42aacfb

Please sign in to comment.