diff options
author | Dave Airlie <airlied@redhat.com> | 2018-09-27 19:48:35 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2018-09-27 19:48:40 -0400 |
commit | 87c2ee740c07f1edae9eec8bc45cb9b32a68f323 (patch) | |
tree | 1515f53eacb86689f2f96279e51cf0053ae8a308 /drivers/gpu/drm/amd/amdgpu/si_dma.c | |
parent | 2de0b0a158bf423208c3898522c8fa1c1078df48 (diff) | |
parent | 6a96243056217662843694a4cbc83158d0e84403 (diff) |
Merge branch 'drm-next-4.20' of git://people.freedesktop.org/~agd5f/linux into drm-next
More new features and fixes for 4.20:
- Add dynamic powergating support for VCN on picasso
- Scheduler cleanup
- Vega20 support for KFD
- DC cleanups and bug fixes
Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180927184348.2696-1-alexander.deucher@amd.com
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/si_dma.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si_dma.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c index fafaf259b17b..d4ceaf440f26 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c | |||
@@ -502,12 +502,12 @@ static int si_dma_sw_init(void *handle) | |||
502 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 502 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
503 | 503 | ||
504 | /* DMA0 trap event */ | 504 | /* DMA0 trap event */ |
505 | r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_LEGACY, 224, &adev->sdma.trap_irq); | 505 | r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 224, &adev->sdma.trap_irq); |
506 | if (r) | 506 | if (r) |
507 | return r; | 507 | return r; |
508 | 508 | ||
509 | /* DMA1 trap event */ | 509 | /* DMA1 trap event */ |
510 | r = amdgpu_irq_add_id(adev, AMDGPU_IH_CLIENTID_LEGACY, 244, &adev->sdma.trap_irq_1); | 510 | r = amdgpu_irq_add_id(adev, AMDGPU_IRQ_CLIENTID_LEGACY, 244, &adev->sdma.trap_irq_1); |
511 | if (r) | 511 | if (r) |
512 | return r; | 512 | return r; |
513 | 513 | ||
@@ -863,10 +863,8 @@ static const struct amdgpu_buffer_funcs si_dma_buffer_funcs = { | |||
863 | 863 | ||
864 | static void si_dma_set_buffer_funcs(struct amdgpu_device *adev) | 864 | static void si_dma_set_buffer_funcs(struct amdgpu_device *adev) |
865 | { | 865 | { |
866 | if (adev->mman.buffer_funcs == NULL) { | 866 | adev->mman.buffer_funcs = &si_dma_buffer_funcs; |
867 | adev->mman.buffer_funcs = &si_dma_buffer_funcs; | 867 | adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; |
868 | adev->mman.buffer_funcs_ring = &adev->sdma.instance[0].ring; | ||
869 | } | ||
870 | } | 868 | } |
871 | 869 | ||
872 | static const struct amdgpu_vm_pte_funcs si_dma_vm_pte_funcs = { | 870 | static const struct amdgpu_vm_pte_funcs si_dma_vm_pte_funcs = { |
@@ -882,15 +880,13 @@ static void si_dma_set_vm_pte_funcs(struct amdgpu_device *adev) | |||
882 | struct drm_gpu_scheduler *sched; | 880 | struct drm_gpu_scheduler *sched; |
883 | unsigned i; | 881 | unsigned i; |
884 | 882 | ||
885 | if (adev->vm_manager.vm_pte_funcs == NULL) { | 883 | adev->vm_manager.vm_pte_funcs = &si_dma_vm_pte_funcs; |
886 | adev->vm_manager.vm_pte_funcs = &si_dma_vm_pte_funcs; | 884 | for (i = 0; i < adev->sdma.num_instances; i++) { |
887 | for (i = 0; i < adev->sdma.num_instances; i++) { | 885 | sched = &adev->sdma.instance[i].ring.sched; |
888 | sched = &adev->sdma.instance[i].ring.sched; | 886 | adev->vm_manager.vm_pte_rqs[i] = |
889 | adev->vm_manager.vm_pte_rqs[i] = | 887 | &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL]; |
890 | &sched->sched_rq[DRM_SCHED_PRIORITY_KERNEL]; | ||
891 | } | ||
892 | adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances; | ||
893 | } | 888 | } |
889 | adev->vm_manager.vm_pte_num_rqs = adev->sdma.num_instances; | ||
894 | } | 890 | } |
895 | 891 | ||
896 | const struct amdgpu_ip_block_version si_dma_ip_block = | 892 | const struct amdgpu_ip_block_version si_dma_ip_block = |