summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-07-30 17:06:11 +1000
committerDave Airlie <airlied@redhat.com>2008-07-30 17:06:11 +1000
commitfb5542aaa87aca9b6b312968abe0a6044812cf0e (patch)
tree0dabe470abf37c3445a0d7dfdf566959ac290b85
parentd659302e0955598ae08316ab911a0fb74d5e2f2f (diff)
radeon: hack gem to get an offset back for Mesa.
-rw-r--r--linux-core/radeon_gem.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux-core/radeon_gem.c b/linux-core/radeon_gem.c
index 9d122ac5..e06cba5b 100644
--- a/linux-core/radeon_gem.c
+++ b/linux-core/radeon_gem.c
@@ -243,9 +243,12 @@ int radeon_gem_pin_ioctl(struct drm_device *dev, void *data,
DRM_DEBUG("got here %p %p %d\n", obj, obj_priv->bo, atomic_read(&obj_priv->bo->usage));
/* validate into a pin with no fence */
- ret = drm_bo_do_validate(obj_priv->bo, 0, DRM_BO_FLAG_NO_EVICT,
- DRM_BO_HINT_DONT_FENCE,
- 0, NULL);
+ if (!(obj_priv->bo->type != drm_bo_type_kernel && !DRM_SUSER(DRM_CURPROC))) {
+ ret = drm_bo_do_validate(obj_priv->bo, 0, DRM_BO_FLAG_NO_EVICT,
+ DRM_BO_HINT_DONT_FENCE,
+ 0, NULL);
+ } else
+ ret = 0;
args->offset = obj_priv->bo->offset;
DRM_DEBUG("got here %p %p\n", obj, obj_priv->bo);