@@ -691,8 +691,18 @@ int radeon_gem_va_ioctl(struct drm_device *dev, void *data,
default:
break;
}
- if (!r)
+ args->id = 0;
+ if (!r) {
+ struct radeon_fence *fence;
+
radeon_gem_va_update_vm(rdev, bo_va);
+ fence = bo_va->last_pt_update;
+ if (fence) {
+ mutex_lock(&fpriv->seq_lock);
+ args->id = radeon_seq_push(&fpriv->seq, fence);
+ mutex_unlock(&fpriv->seq_lock);
+ }
+ }
args->operation = RADEON_VA_RESULT_OK;
if (r) {
args->operation = RADEON_VA_RESULT_ERROR;
@@ -940,6 +940,7 @@ struct drm_radeon_gem_va {
uint32_t vm_id;
uint32_t flags;
uint64_t offset;
+ uint64_t id;
};
#define RADEON_CHUNK_ID_RELOCS 0x01