diff options
| author | Dave Airlie <airlied@redhat.com> | 2018-08-07 16:09:08 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2018-08-07 16:22:23 -0400 |
| commit | 940fbcb73fd25b517fa10c5a9cc96ca0ce1a2fc4 (patch) | |
| tree | c967fae5501fefe9258f9891371977833bd2a72c | |
| parent | 569f0a8694d0ff13c5d296a594c7d8cec8d6f35f (diff) | |
| parent | df36b2fb8390d98453fff1aae3927095fe9ff36c (diff) | |
Merge branch 'drm-next-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-next
Fixes for 4.19:
- Fix UVD 7.2 instance handling
- Fix UVD 7.2 harvesting
- GPU scheduler fix for when a process is killed
- TTM cleanups
- amdgpu CS bo_list fixes
- Powerplay fixes for polaris12 and CZ/ST
- DC fixes for link training certain HMDs
- DC fix for vega10 blank screen in certain cases
From: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180801222906.1016-1-alexander.deucher@amd.com
50 files changed, 911 insertions, 711 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 0283e2b3c851..447c4c7a36d6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
| @@ -74,6 +74,7 @@ | |||
| 74 | #include "amdgpu_gart.h" | 74 | #include "amdgpu_gart.h" |
| 75 | #include "amdgpu_debugfs.h" | 75 | #include "amdgpu_debugfs.h" |
| 76 | #include "amdgpu_job.h" | 76 | #include "amdgpu_job.h" |
| 77 | #include "amdgpu_bo_list.h" | ||
| 77 | 78 | ||
| 78 | /* | 79 | /* |
| 79 | * Modules parameters. | 80 | * Modules parameters. |
| @@ -690,45 +691,6 @@ struct amdgpu_fpriv { | |||
| 690 | }; | 691 | }; |
| 691 | 692 | ||
| 692 | /* | 693 | /* |
| 693 | * residency list | ||
| 694 | */ | ||
| 695 | struct amdgpu_bo_list_entry { | ||
| 696 | struct amdgpu_bo *robj; | ||
| 697 | struct ttm_validate_buffer tv; | ||
| 698 | struct amdgpu_bo_va *bo_va; | ||
| 699 | uint32_t priority; | ||
| 700 | struct page **user_pages; | ||
| 701 | int user_invalidated; | ||
| 702 | }; | ||
| 703 | |||
| 704 | struct amdgpu_bo_list { | ||
| 705 | struct mutex lock; | ||
| 706 | struct rcu_head rhead; | ||
| 707 | struct kref refcount; | ||
| 708 | struct amdgpu_bo *gds_obj; | ||
| 709 | struct amdgpu_bo *gws_obj; | ||
| 710 | struct amdgpu_bo *oa_obj; | ||
| 711 | unsigned first_userptr; | ||
| 712 | unsigned num_entries; | ||
| 713 | struct amdgpu_bo_list_entry *array; | ||
| 714 | }; | ||
| 715 | |||
| 716 | struct amdgpu_bo_list * | ||
| 717 | amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id); | ||
| 718 | void amdgpu_bo_list_get_list(struct amdgpu_bo_list *list, | ||
| 719 | struct list_head *validated); | ||
| 720 | void amdgpu_bo_list_put(struct amdgpu_bo_list *list); | ||
| 721 | void amdgpu_bo_list_free(struct amdgpu_bo_list *list); | ||
| 722 | int amdgpu_bo_create_list_entry_array(struct drm_amdgpu_bo_list_in *in, | ||
| 723 | struct drm_amdgpu_bo_list_entry **info_param); | ||
| 724 | |||
| 725 | int amdgpu_bo_list_create(struct amdgpu_device *adev, | ||
| 726 | struct drm_file *filp, | ||
| 727 | struct drm_amdgpu_bo_list_entry *info, | ||
| 728 | unsigned num_entries, | ||
| 729 | struct amdgpu_bo_list **list); | ||
| 730 | |||
| 731 | /* | ||
| 732 | * GFX stuff | 694 | * GFX stuff |
| 733 | */ | 695 | */ |
| 734 | #include "clearstate_defs.h" | 696 | #include "clearstate_defs.h" |
| @@ -1748,6 +1710,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
| 1748 | #define amdgpu_vm_write_pte(adev, ib, pe, value, count, incr) ((adev)->vm_manager.vm_pte_funcs->write_pte((ib), (pe), (value), (count), (incr))) | 1710 | #define amdgpu_vm_write_pte(adev, ib, pe, value, count, incr) ((adev)->vm_manager.vm_pte_funcs->write_pte((ib), (pe), (value), (count), (incr))) |
| 1749 | #define amdgpu_vm_set_pte_pde(adev, ib, pe, addr, count, incr, flags) ((adev)->vm_manager.vm_pte_funcs->set_pte_pde((ib), (pe), (addr), (count), (incr), (flags))) | 1711 | #define amdgpu_vm_set_pte_pde(adev, ib, pe, addr, count, incr, flags) ((adev)->vm_manager.vm_pte_funcs->set_pte_pde((ib), (pe), (addr), (count), (incr), (flags))) |
| 1750 | #define amdgpu_ring_parse_cs(r, p, ib) ((r)->funcs->parse_cs((p), (ib))) | 1712 | #define amdgpu_ring_parse_cs(r, p, ib) ((r)->funcs->parse_cs((p), (ib))) |
| 1713 | #define amdgpu_ring_patch_cs_in_place(r, p, ib) ((r)->funcs->patch_cs_in_place((p), (ib))) | ||
| 1751 | #define amdgpu_ring_test_ring(r) (r)->funcs->test_ring((r)) | 1714 | #define amdgpu_ring_test_ring(r) (r)->funcs->test_ring((r)) |
| 1752 | #define amdgpu_ring_test_ib(r, t) (r)->funcs->test_ib((r), (t)) | 1715 | #define amdgpu_ring_test_ib(r, t) (r)->funcs->test_ib((r), (t)) |
| 1753 | #define amdgpu_ring_get_rptr(r) (r)->funcs->get_rptr((r)) | 1716 | #define amdgpu_ring_get_rptr(r) (r)->funcs->get_rptr((r)) |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c index 7679c068c89a..d472a2c8399f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c | |||
| @@ -35,83 +35,53 @@ | |||
| 35 | #define AMDGPU_BO_LIST_MAX_PRIORITY 32u | 35 | #define AMDGPU_BO_LIST_MAX_PRIORITY 32u |
| 36 | #define AMDGPU_BO_LIST_NUM_BUCKETS (AMDGPU_BO_LIST_MAX_PRIORITY + 1) | 36 | #define AMDGPU_BO_LIST_NUM_BUCKETS (AMDGPU_BO_LIST_MAX_PRIORITY + 1) |
| 37 | 37 | ||
| 38 | static int amdgpu_bo_list_set(struct amdgpu_device *adev, | 38 | static void amdgpu_bo_list_free_rcu(struct rcu_head *rcu) |
| 39 | struct drm_file *filp, | 39 | { |
| 40 | struct amdgpu_bo_list *list, | 40 | struct amdgpu_bo_list *list = container_of(rcu, struct amdgpu_bo_list, |
| 41 | struct drm_amdgpu_bo_list_entry *info, | 41 | rhead); |
| 42 | unsigned num_entries); | 42 | |
| 43 | kvfree(list); | ||
| 44 | } | ||
| 43 | 45 | ||
| 44 | static void amdgpu_bo_list_release_rcu(struct kref *ref) | 46 | static void amdgpu_bo_list_free(struct kref *ref) |
| 45 | { | 47 | { |
| 46 | unsigned i; | ||
| 47 | struct amdgpu_bo_list *list = container_of(ref, struct amdgpu_bo_list, | 48 | struct amdgpu_bo_list *list = container_of(ref, struct amdgpu_bo_list, |
| 48 | refcount); | 49 | refcount); |
| 50 | struct amdgpu_bo_list_entry *e; | ||
| 49 | 51 | ||
| 50 | for (i = 0; i < list->num_entries; ++i) | 52 | amdgpu_bo_list_for_each_entry(e, list) |
| 51 | amdgpu_bo_unref(&list->array[i].robj); | 53 | amdgpu_bo_unref(&e->robj); |
| 52 | 54 | ||
| 53 | mutex_destroy(&list->lock); | 55 | call_rcu(&list->rhead, amdgpu_bo_list_free_rcu); |
| 54 | kvfree(list->array); | ||
| 55 | kfree_rcu(list, rhead); | ||
| 56 | } | 56 | } |
| 57 | 57 | ||
| 58 | int amdgpu_bo_list_create(struct amdgpu_device *adev, | 58 | int amdgpu_bo_list_create(struct amdgpu_device *adev, struct drm_file *filp, |
| 59 | struct drm_file *filp, | ||
