diff options
| author | Christian König <[email protected]> | 2021-06-09 11:51:36 +0000 |
|---|---|---|
| committer | Christian König <[email protected]> | 2021-06-22 09:05:05 +0000 |
| commit | 8c505bdc9c8b955223b054e34a0be9c3d841cd20 (patch) | |
| tree | 8c250885aa9872de706787183d97fdac3bd059a1 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
| parent | drm/amdgpu: unwrap fence chains in the explicit sync fence (diff) | |
| download | kernel-8c505bdc9c8b955223b054e34a0be9c3d841cd20.tar.gz kernel-8c505bdc9c8b955223b054e34a0be9c3d841cd20.zip | |
drm/amdgpu: rework dma_resv handling v3
Drop the workaround and instead implement a better solution.
Basically we are now chaining all submissions using a dma_fence_chain
container and adding them as exclusive fence to the dma_resv object.
This way other drivers can still sync to the single exclusive fence
while amdgpu only sync to fences from different processes.
v3: add the shared fence first before the exclusive one
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 9cf4beaf646c..0780e8d18992 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -829,7 +829,8 @@ int amdgpu_gem_op_ioctl(struct drm_device *dev, void *data, break; } case AMDGPU_GEM_OP_SET_PLACEMENT: - if (robj->prime_shared_count && (args->value & AMDGPU_GEM_DOMAIN_VRAM)) { + if (robj->tbo.base.import_attach && + args->value & AMDGPU_GEM_DOMAIN_VRAM) { r = -EINVAL; amdgpu_bo_unreserve(robj); break; |
