summaryrefslogtreecommitdiff
path: root/shared-core/radeon_ms_exec.c
diff options
context:
space:
mode:
authorThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-04-28 12:10:44 +0200
committerThomas Hellstrom <thomas-at-tungstengraphics-dot-com>2008-04-28 12:10:44 +0200
commit7f269bec7ed49385de394fdbd970f463ef2060f0 (patch)
tree8c45f8c2e11cf101350272f81892cf4cf7678c3a /shared-core/radeon_ms_exec.c
parent55a9941977953d16b36bbf3e1dcad392ac70e1ef (diff)
parent7f8e4060859651993921281445ec00940c577222 (diff)
Merge branch 'master' into modesetting-101
Conflicts: linux-core/Makefile.kernel linux-core/drm_compat.c linux-core/drm_fops.c linux-core/drm_lock.c shared-core/drm.h shared-core/i915_dma.c shared-core/i915_drv.h shared-core/i915_irq.c
Diffstat (limited to 'shared-core/radeon_ms_exec.c')
-rw-r--r--shared-core/radeon_ms_exec.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/shared-core/radeon_ms_exec.c b/shared-core/radeon_ms_exec.c
index fc359d45..bda9a846 100644
--- a/shared-core/radeon_ms_exec.c
+++ b/shared-core/radeon_ms_exec.c
@@ -74,7 +74,6 @@ static inline int amd_cmd_bo_validate(struct drm_device *dev,
bo->op_req.bo_req.mask,
bo->op_req.bo_req.hint,
bo->op_req.bo_req.fence_class,
- 0,
&bo->op_rep.bo_info,
&cmd_bo->bo);
if (ret) {
@@ -318,9 +317,19 @@ int amd_ioctl_cmd(struct drm_device *dev, void *data, struct drm_file *file)
DRM_ERROR("command dword count is 0.\n");
return -EINVAL;
}
- /* FIXME: Lock buffer manager, is this really needed ? */
- ret = drm_bo_read_lock(&dev->bm.bm_lock);
+
+ /* FIXME: Lock buffer manager. This is needed so the X server can
+ * block DRI clients while VT switched. The X server will then
+ * take the lock in write mode
+ */
+
+ ret = drm_bo_read_lock(&dev->bm.bm_lock, 1);
if (ret) {
+
+ /* FIXME: ret can be -EAGAIN here,
+ * which really isn't an error.
+ */
+
DRM_ERROR("bo read locking failed.\n");
return ret;
}