diff options
author | Dave Airlie <airlied@redhat.com> | 2018-12-12 18:49:04 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-12-12 19:06:34 -0500 |
commit | e7df065a697783ecb5c6eaa5692d78dcfceb71dd (patch) | |
tree | 2e42f7ec8ac73c13ffd6575e016dad1beb4de83b /drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |
parent | e69aa5f9b97f7f871643336deb281db5cb14878b (diff) | |
parent | 674e78acae0dfb4beb56132e41cbae5b60f7d662 (diff) |
Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next
[airlied: make etnaviv build again]
amdgpu:
- DC trace support
- More DC documentation
- XGMI hive reset support
- Rework IH interaction with KFD
- Misc fixes and cleanups
- Powerplay updates for newer polaris variants
- Add cursor plane update fast path
- Enable gpu reset by default on CI parts
- Fix config with KFD/HSA not enabled
amdkfd:
- Limit vram overcommit
- dmabuf support
- Support for doorbell BOs
ttm:
- Support for simultaneous submissions to multiple engines
scheduler:
- Add helpers for hw with preemption support
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181207233119.16861-1-alexander.deucher@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index dc54e9efd910..5dc3ee372e2f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -50,7 +50,8 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p, | |||
50 | bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj)); | 50 | bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj)); |
51 | p->uf_entry.priority = 0; | 51 | p->uf_entry.priority = 0; |
52 | p->uf_entry.tv.bo = &bo->tbo; | 52 | p->uf_entry.tv.bo = &bo->tbo; |
53 | p->uf_entry.tv.shared = true; | 53 | /* One for TTM and one for the CS job */ |
54 | p->uf_entry.tv.num_shared = 2; | ||
54 | p->uf_entry.user_pages = NULL; | 55 | p->uf_entry.user_pages = NULL; |
55 | 56 | ||
56 | drm_gem_object_put_unlocked(gobj); | 57 | drm_gem_object_put_unlocked(gobj); |
@@ -598,6 +599,10 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
598 | return r; | 599 | return r; |
599 | } | 600 | } |
600 | 601 | ||
602 | /* One for TTM and one for the CS job */ | ||
603 | amdgpu_bo_list_for_each_entry(e, p->bo_list) | ||
604 | e->tv.num_shared = 2; | ||
605 | |||
601 | amdgpu_bo_list_get_list(p->bo_list, &p->validated); | 606 | amdgpu_bo_list_get_list(p->bo_list, &p->validated); |
602 | if (p->bo_list->first_userptr != p->bo_list->num_entries) | 607 | if (p->bo_list->first_userptr != p->bo_list->num_entries) |
603 | p->mn = amdgpu_mn_get(p->adev, AMDGPU_MN_TYPE_GFX); | 608 | p->mn = amdgpu_mn_get(p->adev, AMDGPU_MN_TYPE_GFX); |
@@ -717,8 +722,14 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p, | |||
717 | gws = p->bo_list->gws_obj; | 722 | gws = p->bo_list->gws_obj; |
718 | oa = p->bo_list->oa_obj; | 723 | oa = p->bo_list->oa_obj; |
719 | 724 | ||
720 | amdgpu_bo_list_for_each_entry(e, p->bo_list) | 725 | amdgpu_bo_list_for_each_entry(e, p->bo_list) { |
721 | e->bo_va = amdgpu_vm_bo_find(vm, ttm_to_amdgpu_bo(e->tv.bo)); | 726 | struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo); |
727 | |||
728 | /* Make sure we use the exclusive slot for shared BOs */ | ||
729 | if (bo->prime_shared_count) | ||
730 | e->tv.num_shared = 0; | ||
731 | e->bo_va = amdgpu_vm_bo_find(vm, bo); | ||
732 | } | ||
722 | 733 | ||
723 | if (gds) { | 734 | if (gds) { |
724 | p->job->gds_base = amdgpu_bo_gpu_offset(gds) >> PAGE_SHIFT; | 735 | p->job->gds_base = amdgpu_bo_gpu_offset(gds) >> PAGE_SHIFT; |
@@ -955,10 +966,6 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p) | |||
955 | if (r) | 966 | if (r) |
956 | return r; | 967 | return r; |
957 | 968 | ||
958 | r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv, 1); | ||
959 | if (r) | ||
960 | return r; | ||
961 | |||
962 | p->job->vm_pd_addr = amdgpu_gmc_pd_addr(vm->root.base.bo); | 969 | p->job->vm_pd_addr = amdgpu_gmc_pd_addr(vm->root.base.bo); |
963 | 970 | ||
964 | if (amdgpu_vm_debug) { | 971 | if (amdgpu_vm_debug) { |