diff options
author | Kenneth Graunke <[email protected]> | 2019-09-10 23:56:10 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2019-09-11 08:10:47 -0700 |
commit | 06370c3167613e29865e95938075a41d28b5dbcb (patch) | |
tree | 28070ad216bef2f2d4c31612d46c9622cc2d93db /src | |
parent | 9a59ad87df9ae2e804dd878ebb011f5835702ea7 (diff) |
iris: Finish initializing the BO before stuffing it in the hash table
Other threads may pick it up once it's in the hash table. Not known
to fix anything currently.
Reviewed-by: Chris Wilson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_bufmgr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 2dc7e3eec4c..dfaba84b499 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -1305,15 +1305,13 @@ iris_bo_import_dmabuf(struct iris_bufmgr *bufmgr, int prime_fd) bo->size = ret; bo->bufmgr = bufmgr; - - bo->gem_handle = handle; - _mesa_hash_table_insert(bufmgr->handle_table, &bo->gem_handle, bo); - bo->name = "prime"; bo->reusable = false; bo->external = true; bo->kflags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_PINNED; bo->gtt_offset = vma_alloc(bufmgr, IRIS_MEMZONE_OTHER, bo->size, 1); + bo->gem_handle = handle; + _mesa_hash_table_insert(bufmgr->handle_table, &bo->gem_handle, bo); struct drm_i915_gem_get_tiling get_tiling = { .handle = bo->gem_handle }; if (gen_ioctl(bufmgr->fd, DRM_IOCTL_I915_GEM_GET_TILING, &get_tiling)) |