diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu.h | 181 |
1 files changed, 104 insertions, 77 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 700c56baf2de..72c68dbb9821 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h | |||
@@ -51,11 +51,13 @@ | |||
51 | #include "amdgpu_ih.h" | 51 | #include "amdgpu_ih.h" |
52 | #include "amdgpu_irq.h" | 52 | #include "amdgpu_irq.h" |
53 | #include "amdgpu_ucode.h" | 53 | #include "amdgpu_ucode.h" |
54 | #include "amdgpu_ttm.h" | ||
54 | #include "amdgpu_gds.h" | 55 | #include "amdgpu_gds.h" |
55 | #include "amd_powerplay.h" | 56 | #include "amd_powerplay.h" |
56 | #include "amdgpu_acp.h" | 57 | #include "amdgpu_acp.h" |
57 | 58 | ||
58 | #include "gpu_scheduler.h" | 59 | #include "gpu_scheduler.h" |
60 | #include "amdgpu_virt.h" | ||
59 | 61 | ||
60 | /* | 62 | /* |
61 | * Modules parameters. | 63 | * Modules parameters. |
@@ -63,6 +65,7 @@ | |||
63 | extern int amdgpu_modeset; | 65 | extern int amdgpu_modeset; |
64 | extern int amdgpu_vram_limit; | 66 | extern int amdgpu_vram_limit; |
65 | extern int amdgpu_gart_size; | 67 | extern int amdgpu_gart_size; |
68 | extern int amdgpu_moverate; | ||
66 | extern int amdgpu_benchmarking; | 69 | extern int amdgpu_benchmarking; |
67 | extern int amdgpu_testing; | 70 | extern int amdgpu_testing; |
68 | extern int amdgpu_audio; | 71 | extern int amdgpu_audio; |
@@ -91,6 +94,9 @@ extern unsigned amdgpu_pcie_lane_cap; | |||
91 | extern unsigned amdgpu_cg_mask; | 94 | extern unsigned amdgpu_cg_mask; |
92 | extern unsigned amdgpu_pg_mask; | 95 | extern unsigned amdgpu_pg_mask; |
93 | extern char *amdgpu_disable_cu; | 96 | extern char *amdgpu_disable_cu; |
97 | extern int amdgpu_sclk_deep_sleep_en; | ||
98 | extern char *amdgpu_virtual_display; | ||
99 | extern unsigned amdgpu_pp_feature_mask; | ||
94 | 100 | ||
95 | #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 | 101 | #define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000 |
96 | #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ | 102 | #define AMDGPU_MAX_USEC_TIMEOUT 100000 /* 100 ms */ |
@@ -105,7 +111,7 @@ extern char *amdgpu_disable_cu; | |||
105 | #define AMDGPU_MAX_RINGS 16 | 111 | #define AMDGPU_MAX_RINGS 16 |
106 | #define AMDGPU_MAX_GFX_RINGS 1 | 112 | #define AMDGPU_MAX_GFX_RINGS 1 |
107 | #define AMDGPU_MAX_COMPUTE_RINGS 8 | 113 | #define AMDGPU_MAX_COMPUTE_RINGS 8 |
108 | #define AMDGPU_MAX_VCE_RINGS 2 | 114 | #define AMDGPU_MAX_VCE_RINGS 3 |
109 | 115 | ||
110 | /* max number of IP instances */ | 116 | /* max number of IP instances */ |
111 | #define AMDGPU_MAX_SDMA_INSTANCES 2 | 117 | #define AMDGPU_MAX_SDMA_INSTANCES 2 |
@@ -248,10 +254,9 @@ struct amdgpu_vm_pte_funcs { | |||
248 | uint64_t pe, uint64_t src, | 254 | uint64_t pe, uint64_t src, |
249 | unsigned count); | 255 | unsigned count); |
250 | /* write pte one entry at a time with addr mapping */ | 256 | /* write pte one entry at a time with addr mapping */ |
251 | void (*write_pte)(struct amdgpu_ib *ib, | 257 | void (*write_pte)(struct amdgpu_ib *ib, uint64_t pe, |
252 | const dma_addr_t *pages_addr, uint64_t pe, | 258 | uint64_t value, unsigned count, |
253 | uint64_t addr, unsigned count, | 259 | uint32_t incr); |
254 | uint32_t incr, uint32_t flags); | ||
255 | /* for linear pte/pde updates without addr mapping */ | 260 | /* for linear pte/pde updates without addr mapping */ |
256 | void (*set_pte_pde)(struct amdgpu_ib *ib, | 261 | void (*set_pte_pde)(struct amdgpu_ib *ib, |
257 | uint64_t pe, | 262 | uint64_t pe, |
@@ -316,6 +321,10 @@ struct amdgpu_ring_funcs { | |||
316 | /* note usage for clock and power gating */ | 321 | /* note usage for clock and power gating */ |
317 | void (*begin_use)(struct amdgpu_ring *ring); | 322 | void (*begin_use)(struct amdgpu_ring *ring); |
318 | void (*end_use)(struct amdgpu_ring *ring); | 323 | void (*end_use)(struct amdgpu_ring *ring); |
324 | void (*emit_switch_buffer) (struct amdgpu_ring *ring); | ||
325 | void (*emit_cntxcntl) (struct amdgpu_ring *ring, uint32_t flags); | ||
326 | unsigned (*get_emit_ib_size) (struct amdgpu_ring *ring); | ||
327 | unsigned (*get_dma_frame_size) (struct amdgpu_ring *ring); | ||
319 | }; | 328 | }; |
320 | 329 | ||
321 | /* | 330 | /* |
@@ -396,48 +405,8 @@ int amdgpu_fence_wait_empty(struct amdgpu_ring *ring); | |||
396 | unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring); | 405 | unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring); |
397 | 406 | ||
398 | /* | 407 | /* |
399 | * TTM. | 408 | * BO. |
400 | */ | 409 | */ |
401 | |||
402 | #define AMDGPU_TTM_LRU_SIZE 20 | ||
403 | |||
404 | struct amdgpu_mman_lru { | ||
405 | struct list_head *lru[TTM_NUM_MEM_TYPES]; | ||
406 | struct list_head *swap_lru; | ||
407 | }; | ||
408 | |||
409 | struct amdgpu_mman { | ||
410 | struct ttm_bo_global_ref bo_global_ref; | ||
411 | struct drm_global_reference mem_global_ref; | ||
412 | struct ttm_bo_device bdev; | ||
413 | bool mem_global_referenced; | ||
414 | bool initialized; | ||
415 | |||
416 | #if defined(CONFIG_DEBUG_FS) | ||
417 | struct dentry *vram; | ||
418 | struct dentry *gtt; | ||
419 | #endif | ||
420 | |||
421 | /* buffer handling */ | ||
422 | const struct amdgpu_buffer_funcs *buffer_funcs; | ||
423 | struct amdgpu_ring *buffer_funcs_ring; | ||
424 | /* Scheduler entity for buffer moves */ | ||
425 | struct amd_sched_entity entity; | ||
426 | |||
427 | /* custom LRU management */ | ||
428 | struct amdgpu_mman_lru log2_size[AMDGPU_TTM_LRU_SIZE]; | ||
429 | /* guard for log2_size array, don't add anything in between */ | ||
430 | struct amdgpu_mman_lru guard; | ||
431 | }; | ||
432 | |||
433 | int amdgpu_copy_buffer(struct amdgpu_ring *ring, | ||
434 | uint64_t src_offset, | ||
435 | uint64_t dst_offset, | ||
436 | uint32_t byte_count, | ||
437 | struct reservation_object *resv, | ||
438 | struct fence **fence); | ||
439 | int amdgpu_mmap(struct file *filp, struct vm_area_struct *vma); | ||
440 | |||
441 | struct amdgpu_bo_list_entry { | 410 | struct amdgpu_bo_list_entry { |
442 | struct amdgpu_bo *robj; | 411 | struct amdgpu_bo *robj; |
443 | struct ttm_validate_buffer tv; | 412 | struct ttm_validate_buffer tv; |
@@ -500,10 +469,12 @@ struct amdgpu_bo { | |||
500 | struct amdgpu_device *adev; | 469 | struct amdgpu_device *adev; |
501 | struct drm_gem_object gem_base; | 470 | struct drm_gem_object gem_base; |
502 | struct amdgpu_bo *parent; | 471 | struct amdgpu_bo *parent; |
472 | struct amdgpu_bo *shadow; | ||
503 | 473 | ||
504 | struct ttm_bo_kmap_obj dma_buf_vmap; | 474 | struct ttm_bo_kmap_obj dma_buf_vmap; |
505 | struct amdgpu_mn *mn; | 475 | struct amdgpu_mn *mn; |
506 | struct list_head mn_list; | 476 | struct list_head mn_list; |
477 | struct list_head shadow_list; | ||
507 | }; | 478 | }; |
508 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, gem_base) | 479 | #define gem_to_amdgpu_bo(gobj) container_of((gobj), struct amdgpu_bo, gem_base) |
509 | 480 | ||
@@ -653,6 +624,7 @@ void amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset, | |||
653 | int amdgpu_gart_bind(struct amdgpu_device *adev, uint64_t offset, | 624 | int amdgpu_gart_bind(struct amdgpu_device *adev, uint64_t offset, |
654 | int pages, struct page **pagelist, | 625 | int pages, struct page **pagelist, |
655 | dma_addr_t *dma_addr, uint32_t flags); | 626 | dma_addr_t *dma_addr, uint32_t flags); |
627 | int amdgpu_ttm_recover_gart(struct amdgpu_device *adev); | ||
656 | 628 | ||
657 | /* | 629 | /* |
658 | * GPU MC structures, functions & helpers | 630 | * GPU MC structures, functions & helpers |
@@ -679,6 +651,8 @@ struct amdgpu_mc { | |||
679 | uint32_t fw_version; | 651 | uint32_t fw_version; |
680 | struct amdgpu_irq_src vm_fault; | 652 | struct amdgpu_irq_src vm_fault; |
681 | uint32_t vram_type; | 653 | uint32_t vram_type; |
654 | uint32_t srbm_soft_reset; | ||
655 | struct amdgpu_mode_mc_save save; | ||
682 | }; | 656 | }; |
683 | 657 | ||
684 | /* | 658 | /* |
@@ -723,10 +697,11 @@ void amdgpu_doorbell_get_kfd_info(struct amdgpu_device *adev, | |||
723 | */ | 697 | */ |
724 | 698 | ||
725 | struct amdgpu_flip_work { | 699 | struct amdgpu_flip_work { |
726 | struct work_struct flip_work; | 700 | struct delayed_work flip_work; |
727 | struct work_struct unpin_work; | 701 | struct work_struct unpin_work; |
728 | struct amdgpu_device *adev; | 702 | struct amdgpu_device *adev; |
729 | int crtc_id; | 703 | int crtc_id; |
704 | u32 target_vblank; | ||
730 | uint64_t base; | 705 | uint64_t base; |
731 | struct drm_pending_vblank_event *event; | 706 | struct drm_pending_vblank_event *event; |
732 | struct amdgpu_bo *old_rbo; | 707 | struct amdgpu_bo *old_rbo; |
@@ -817,13 +792,17 @@ struct amdgpu_ring { | |||
817 | /* maximum number of VMIDs */ | 792 | /* maximum number of VMIDs */ |
818 | #define AMDGPU_NUM_VM 16 | 793 | #define AMDGPU_NUM_VM 16 |
819 | 794 | ||
795 | /* Maximum number of PTEs the hardware can write with one command */ | ||
796 | #define AMDGPU_VM_MAX_UPDATE_SIZE 0x3FFFF | ||
797 | |||
820 | /* number of entries in page table */ | 798 | /* number of entries in page table */ |
821 | #define AMDGPU_VM_PTE_COUNT (1 << amdgpu_vm_block_size) | 799 | #define AMDGPU_VM_PTE_COUNT (1 << amdgpu_vm_block_size) |
822 | 800 | ||
823 | /* PTBs (Page Table Blocks) need to be aligned to 32K */ | 801 | /* PTBs (Page Table Blocks) need to be aligned to 32K */ |
824 | #define AMDGPU_VM_PTB_ALIGN_SIZE 32768 | 802 | #define AMDGPU_VM_PTB_ALIGN_SIZE 32768 |
825 | #define AMDGPU_VM_PTB_ALIGN_MASK (AMDGPU_VM_PTB_ALIGN_SIZE - 1) | 803 | |
826 | #define AMDGPU_VM_PTB_ALIGN(a) (((a) + AMDGPU_VM_PTB_ALIGN_MASK) & ~AMDGPU_VM_PTB_ALIGN_MASK) | 804 | /* LOG2 number of continuous pages for the fragment field */ |
805 | #define AMDGPU_LOG2_PAGES_PER_FRAG 4 | ||
827 | 806 | ||
828 | #define AMDGPU_PTE_VALID (1 << 0) | 807 | #define AMDGPU_PTE_VALID (1 << 0) |
829 | #define AMDGPU_PTE_SYSTEM (1 << 1) | 808 | #define AMDGPU_PTE_SYSTEM (1 << 1) |
@@ -835,10 +814,7 @@ struct amdgpu_ring { | |||
835 | #define AMDGPU_PTE_READABLE (1 << 5) | 814 | #define AMDGPU_PTE_READABLE (1 << 5) |
836 | #define AMDGPU_PTE_WRITEABLE (1 << 6) | 815 | #define AMDGPU_PTE_WRITEABLE (1 << 6) |
837 | 816 | ||
838 | /* PTE (Page Table Entry) fragment field for different page sizes */ | 817 | #define AMDGPU_PTE_FRAG(x) ((x & 0x1f) << 7) |
839 | #define AMDGPU_PTE_FRAG_4KB (0 << 7) | ||
840 | #define AMDGPU_PTE_FRAG_64KB (4 << 7) | ||
841 | #define AMDGPU_LOG2_PAGES_PER_FRAG 4 | ||
842 | 818 | ||
843 | /* How to programm VM fault handling */ | 819 | /* How to programm VM fault handling */ |
844 | #define AMDGPU_VM_FAULT_STOP_NEVER 0 | 820 | #define AMDGPU_VM_FAULT_STOP_NEVER 0 |
@@ -848,6 +824,7 @@ struct amdgpu_ring { | |||
848 | struct amdgpu_vm_pt { | 824 | struct amdgpu_vm_pt { |
849 | struct amdgpu_bo_list_entry entry; | 825 | struct amdgpu_bo_list_entry entry; |
850 | uint64_t addr; | 826 | uint64_t addr; |
827 | uint64_t shadow_addr; | ||
851 | }; | 828 | }; |
852 | 829 | ||
853 | struct amdgpu_vm { | 830 | struct amdgpu_vm { |
@@ -950,7 +927,6 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring, | |||
950 | struct amdgpu_job *job); | 927 | struct amdgpu_job *job); |
951 | int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job); | 928 | int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job); |
952 | void amdgpu_vm_reset_id(struct amdgpu_device *adev, unsigned vm_id); | 929 | void amdgpu_vm_reset_id(struct amdgpu_device *adev, unsigned vm_id); |
953 | uint64_t amdgpu_vm_map_gart(const dma_addr_t *pages_addr, uint64_t addr); | ||
954 | int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, | 930 | int amdgpu_vm_update_page_directory(struct amdgpu_device *adev, |
955 | struct amdgpu_vm *vm); | 931 | struct amdgpu_vm *vm); |
956 | int amdgpu_vm_clear_freed(struct amdgpu_device *adev, | 932 | int amdgpu_vm_clear_freed(struct amdgpu_device *adev, |
@@ -959,7 +935,7 @@ int amdgpu_vm_clear_invalids(struct amdgpu_device *adev, struct amdgpu_vm *vm, | |||
959 | struct amdgpu_sync *sync); | 935 | struct amdgpu_sync *sync); |
960 | int amdgpu_vm_bo_update(struct amdgpu_device *adev, | 936 | int amdgpu_vm_bo_update(struct amdgpu_device *adev, |
961 | struct amdgpu_bo_va *bo_va, | 937 | struct amdgpu_bo_va *bo_va, |
962 | struct ttm_mem_reg *mem); | 938 | bool clear); |
963 | void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, | 939 | void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, |
964 | struct amdgpu_bo *bo); | 940 | struct amdgpu_bo *bo); |
965 | struct amdgpu_bo_va *amdgpu_vm_bo_find(struct amdgpu_vm *vm, | 941 | struct amdgpu_bo_va *amdgpu_vm_bo_find(struct amdgpu_vm *vm, |
@@ -994,6 +970,7 @@ struct amdgpu_ctx { | |||
994 | spinlock_t ring_lock; | 970 | spinlock_t ring_lock; |
995 | struct fence **fences; | 971 | struct fence **fences; |
996 | struct amdgpu_ctx_ring rings[AMDGPU_MAX_RINGS]; | 972 | struct amdgpu_ctx_ring rings[AMDGPU_MAX_RINGS]; |
973 | bool preamble_presented; | ||
997 | }; | 974 | }; |
998 | 975 | ||
999 | struct amdgpu_ctx_mgr { | 976 | struct amdgpu_ctx_mgr { |
@@ -1197,6 +1174,10 @@ struct amdgpu_gfx { | |||
1197 | unsigned ce_ram_size; | 1174 | unsigned ce_ram_size; |
1198 | struct amdgpu_cu_info cu_info; | 1175 | struct amdgpu_cu_info cu_info; |
1199 | const struct amdgpu_gfx_funcs *funcs; | 1176 | const struct amdgpu_gfx_funcs *funcs; |
1177 | |||
1178 | /* reset mask */ | ||
1179 | uint32_t grbm_soft_reset; | ||
1180 | uint32_t srbm_soft_reset; | ||
1200 | }; | 1181 | }; |
1201 | 1182 | ||
1202 | int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm, | 1183 | int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm, |
@@ -1249,11 +1230,16 @@ struct amdgpu_cs_parser { | |||
1249 | struct fence *fence; | 1230 | struct fence *fence; |
1250 | uint64_t bytes_moved_threshold; | 1231 | uint64_t bytes_moved_threshold; |
1251 | uint64_t bytes_moved; | 1232 | uint64_t bytes_moved; |
1233 | struct amdgpu_bo_list_entry *evictable; | ||
1252 | 1234 | ||
1253 | /* user fence */ | 1235 | /* user fence */ |
1254 | struct amdgpu_bo_list_entry uf_entry; | 1236 | struct amdgpu_bo_list_entry uf_entry; |
1255 | }; | 1237 | }; |
1256 | 1238 | ||
1239 | #define AMDGPU_PREAMBLE_IB_PRESENT (1 << 0) /* bit set means command submit involves a preamble IB */ | ||
1240 | #define AMDGPU_PREAMBLE_IB_PRESENT_FIRST (1 << 1) /* bit set means preamble IB is first presented in belonging context */ | ||
1241 | #define AMDGPU_HAVE_CTX_SWITCH (1 << 2) /* bit set means context switch occured */ | ||
1242 | |||
1257 | struct amdgpu_job { | 1243 | struct amdgpu_job { |
1258 | struct amd_sched_job base; | 1244 | struct amd_sched_job base; |
1259 | struct amdgpu_device *adev; | 1245 | struct amdgpu_device *adev; |
@@ -1262,9 +1248,10 @@ struct amdgpu_job { | |||
1262 | struct amdgpu_sync sync; | 1248 | struct amdgpu_sync sync; |
1263 | struct amdgpu_ib *ibs; | 1249 | struct amdgpu_ib *ibs; |
1264 | struct fence *fence; /* the hw fence */ | 1250 | struct fence *fence; /* the hw fence */ |
1251 | uint32_t preamble_status; | ||
1265 | uint32_t num_ibs; | 1252 | uint32_t num_ibs; |
1266 | void *owner; | 1253 | void *owner; |
1267 | uint64_t ctx; | 1254 | uint64_t fence_ctx; /* the fence_context this job uses */ |
1268 | bool vm_needs_flush; | 1255 | bool vm_needs_flush; |
1269 | unsigned vm_id; | 1256 | unsigned vm_id; |
1270 | uint64_t vm_pd_addr; | 1257 | uint64_t vm_pd_addr; |
@@ -1685,6 +1672,7 @@ struct amdgpu_uvd { | |||
1685 | bool address_64_bit; | 1672 | bool address_64_bit; |
1686 | bool use_ctx_buf; | 1673 | bool use_ctx_buf; |
1687 | struct amd_sched_entity entity; | 1674 | struct amd_sched_entity entity; |
1675 | uint32_t srbm_soft_reset; | ||
1688 | }; | 1676 | }; |
1689 | 1677 | ||
1690 | /* | 1678 | /* |
@@ -1711,6 +1699,8 @@ struct amdgpu_vce { | |||
1711 | struct amdgpu_irq_src irq; | 1699 | struct amdgpu_irq_src irq; |
1712 | unsigned harvest_config; | 1700 | unsigned harvest_config; |
1713 | struct amd_sched_entity entity; | 1701 | struct amd_sched_entity entity; |
1702 | uint32_t srbm_soft_reset; | ||
1703 | unsigned num_rings; | ||
1714 | }; | 1704 | }; |
1715 | 1705 | ||
1716 | /* | 1706 | /* |
@@ -1728,9 +1718,14 @@ struct amdgpu_sdma_instance { | |||
1728 | 1718 | ||
1729 | struct amdgpu_sdma { | 1719 | struct amdgpu_sdma { |
1730 | struct amdgpu_sdma_instance instance[AMDGPU_MAX_SDMA_INSTANCES]; | 1720 | struct amdgpu_sdma_instance instance[AMDGPU_MAX_SDMA_INSTANCES]; |
1721 | #ifdef CONFIG_DRM_AMDGPU_SI | ||
1722 | //SI DMA has a difference trap irq number for the second engine | ||
1723 | struct amdgpu_irq_src trap_irq_1; | ||
1724 | #endif | ||
1731 | struct amdgpu_irq_src trap_irq; | 1725 | struct amdgpu_irq_src trap_irq; |
1732 | struct amdgpu_irq_src illegal_inst_irq; | 1726 | struct amdgpu_irq_src illegal_inst_irq; |
1733 | int num_instances; | 1727 | int num_instances; |
1728 | uint32_t srbm_soft_reset; | ||
1734 | }; | 1729 | }; |
1735 | 1730 | ||
1736 | /* | 1731 | /* |
@@ -1832,6 +1827,7 @@ struct amdgpu_asic_funcs { | |||
1832 | bool (*read_disabled_bios)(struct amdgpu_device *adev); | 1827 | bool (*read_disabled_bios)(struct amdgpu_device *adev); |
1833 | bool (*read_bios_from_rom)(struct amdgpu_device *adev, | 1828 | bool (*read_bios_from_rom)(struct amdgpu_device *adev, |
1834 | u8 *bios, u32 length_bytes); | 1829 | u8 *bios, u32 length_bytes); |
1830 | void (*detect_hw_virtualization) (struct amdgpu_device *adev); | ||
1835 | int (*read_register)(struct amdgpu_device *adev, u32 se_num, | 1831 | int (*read_register)(struct amdgpu_device *adev, u32 se_num, |
1836 | u32 sh_num, u32 reg_offset, u32 *value); | 1832 | u32 sh_num, u32 reg_offset, u32 *value); |
1837 | void (*set_vga_state)(struct amdgpu_device *adev, bool state); | 1833 | void (*set_vga_state)(struct amdgpu_device *adev, bool state); |
@@ -1841,8 +1837,9 @@ struct amdgpu_asic_funcs { | |||
1841 | /* MM block clocks */ | 1837 | /* MM block clocks */ |
1842 | int (*set_uvd_clocks)(struct amdgpu_device *adev, u32 vclk, u32 dclk); | 1838 | int (*set_uvd_clocks)(struct amdgpu_device *adev, u32 vclk, u32 dclk); |
1843 | int (*set_vce_clocks)(struct amdgpu_device *adev, u32 evclk, u32 ecclk); | 1839 | int (*set_vce_clocks)(struct amdgpu_device *adev, u32 evclk, u32 ecclk); |
1844 | /* query virtual capabilities */ | 1840 | /* static power management */ |
1845 | u32 (*get_virtual_caps)(struct amdgpu_device *adev); | 1841 | int (*get_pcie_lanes)(struct amdgpu_device *adev); |
1842 | void (*set_pcie_lanes)(struct amdgpu_device *adev, int lanes); | ||
1846 | }; | 1843 | }; |
1847 | 1844 | ||
1848 | /* | 1845 | /* |
@@ -1935,16 +1932,6 @@ struct amdgpu_atcs { | |||
1935 | struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev); | 1932 | struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev); |
1936 | void amdgpu_cgs_destroy_device(struct cgs_device *cgs_device); | 1933 | void amdgpu_cgs_destroy_device(struct cgs_device *cgs_device); |
1937 | 1934 | ||
1938 | |||
1939 | /* GPU virtualization */ | ||
1940 | #define AMDGPU_VIRT_CAPS_SRIOV_EN (1 << 0) | ||
1941 | #define AMDGPU_VIRT_CAPS_IS_VF (1 << 1) | ||
1942 | struct amdgpu_virtualization { | ||
1943 | bool supports_sr_iov; | ||
1944 | bool is_virtual; | ||
1945 | u32 caps; | ||
1946 | }; | ||
1947 | |||
1948 | /* | 1935 | /* |
1949 | * Core structure, functions and helpers. | 1936 | * Core structure, functions and helpers. |
1950 | */ | 1937 | */ |
@@ -1958,6 +1945,7 @@ struct amdgpu_ip_block_status { | |||
1958 | bool valid; | 1945 | bool valid; |
1959 | bool sw; | 1946 | bool sw; |
1960 | bool hw; | 1947 | bool hw; |
1948 | bool hang; | ||
1961 | }; | 1949 | }; |
1962 | 1950 | ||
1963 | struct amdgpu_device { | 1951 | struct amdgpu_device { |
@@ -2016,6 +2004,8 @@ struct amdgpu_device { | |||
2016 | spinlock_t pcie_idx_lock; | 2004 | spinlock_t pcie_idx_lock; |
2017 | amdgpu_rreg_t pcie_rreg; | 2005 | amdgpu_rreg_t pcie_rreg; |
2018 | amdgpu_wreg_t pcie_wreg; | 2006 | amdgpu_wreg_t pcie_wreg; |
2007 | amdgpu_rreg_t pciep_rreg; | ||
2008 | amdgpu_wreg_t pciep_wreg; | ||
2019 | /* protects concurrent UVD register access */ | 2009 | /* protects concurrent UVD register access */ |
2020 | spinlock_t uvd_ctx_idx_lock; | 2010 | spinlock_t uvd_ctx_idx_lock; |
2021 | amdgpu_rreg_t uvd_ctx_rreg; | 2011 | amdgpu_rreg_t uvd_ctx_rreg; |
@@ -2056,7 +2046,16 @@ struct amdgpu_device { | |||
2056 | atomic64_t num_evictions; | 2046 | atomic64_t num_evictions; |
2057 | atomic_t gpu_reset_counter; | 2047 | atomic_t gpu_reset_counter; |
2058 | 2048 | ||
2049 | /* data for buffer migration throttling */ | ||
2050 | struct { | ||
2051 | spinlock_t lock; | ||
2052 | s64 last_update_us; | ||
2053 | s64 accum_us; /* accumulated microseconds */ | ||
2054 | u32 log2_max_MBps; | ||
2055 | } mm_stats; | ||
2056 | |||
2059 | /* display */ | 2057 | /* display */ |
2058 | bool enable_virtual_display; | ||
2060 | struct amdgpu_mode_info mode_info; | 2059 | struct amdgpu_mode_info mode_info; |
2061 | struct work_struct hotplug_work; | 2060 | struct work_struct hotplug_work; |
2062 | struct amdgpu_irq_src crtc_irq; | 2061 | struct amdgpu_irq_src crtc_irq; |
@@ -2119,6 +2118,14 @@ struct amdgpu_device { | |||
2119 | struct kfd_dev *kfd; | 2118 | struct kfd_dev *kfd; |
2120 | 2119 | ||
2121 | struct amdgpu_virtualization virtualization; | 2120 | struct amdgpu_virtualization virtualization; |
2121 | |||
2122 | /* link all shadow bo */ | ||
2123 | struct list_head shadow_list; | ||
2124 | struct mutex shadow_list_lock; | ||
2125 | /* link all gtt */ | ||
2126 | spinlock_t gtt_list_lock; | ||
2127 | struct list_head gtt_list; | ||
2128 | |||
2122 | }; | 2129 | }; |
2123 | 2130 | ||
2124 | bool amdgpu_device_is_px(struct drm_device *dev); | 2131 | bool amdgpu_device_is_px(struct drm_device *dev); |
@@ -2151,6 +2158,8 @@ void amdgpu_mm_wdoorbell(struct amdgpu_device *adev, u32 index, u32 v); | |||
2151 | #define REG_GET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK) | 2158 | #define REG_GET(FIELD, v) (((v) << FIELD##_SHIFT) & FIELD##_MASK) |
2152 | #define RREG32_PCIE(reg) adev->pcie_rreg(adev, (reg)) | 2159 | #define RREG32_PCIE(reg) adev->pcie_rreg(adev, (reg)) |
2153 | #define WREG32_PCIE(reg, v) adev->pcie_wreg(adev, (reg), (v)) | 2160 | #define WREG32_PCIE(reg, v) adev->pcie_wreg(adev, (reg), (v)) |
2161 | #define RREG32_PCIE_PORT(reg) adev->pciep_rreg(adev, (reg)) | ||
2162 | #define WREG32_PCIE_PORT(reg, v) adev->pciep_wreg(adev, (reg), (v)) | ||
2154 | #define RREG32_SMC(reg) adev->smc_rreg(adev, (reg)) | 2163 | #define RREG32_SMC(reg) adev->smc_rreg(adev, (reg)) |
2155 | #define WREG32_SMC(reg, v) adev->smc_wreg(adev, (reg), (v)) | 2164 | #define WREG32_SMC(reg, v) adev->smc_wreg(adev, (reg), (v)) |
2156 | #define RREG32_UVD_CTX(reg) adev->uvd_ctx_rreg(adev, (reg)) | 2165 | #define RREG32_UVD_CTX(reg) adev->uvd_ctx_rreg(adev, (reg)) |
@@ -2194,6 +2203,9 @@ void amdgpu_mm_wdoorbell(struct amdgpu_device *adev, u32 index, u32 v); | |||
2194 | #define REG_GET_FIELD(value, reg, field) \ | 2203 | #define REG_GET_FIELD(value, reg, field) \ |
2195 | (((value) & REG_FIELD_MASK(reg, field)) >> REG_FIELD_SHIFT(reg, field)) | 2204 | (((value) & REG_FIELD_MASK(reg, field)) >> REG_FIELD_SHIFT(reg, field)) |
2196 | 2205 | ||
2206 | #define WREG32_FIELD(reg, field, val) \ | ||
2207 | WREG32(mm##reg, (RREG32(mm##reg) & ~REG_FIELD_MASK(reg, field)) | (val) << REG_FIELD_SHIFT(reg, field)) | ||
2208 | |||
2197 | /* | 2209 | /* |
2198 | * BIOS helpers. | 2210 | * BIOS helpers. |
2199 | */ | 2211 | */ |
@@ -2237,14 +2249,17 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2237 | #define amdgpu_asic_get_xclk(adev) (adev)->asic_funcs->get_xclk((adev)) | 2249 | #define amdgpu_asic_get_xclk(adev) (adev)->asic_funcs->get_xclk((adev)) |
2238 | #define amdgpu_asic_set_uvd_clocks(adev, v, d) (adev)->asic_funcs->set_uvd_clocks((adev), (v), (d)) | 2250 | #define amdgpu_asic_set_uvd_clocks(adev, v, d) (adev)->asic_funcs->set_uvd_clocks((adev), (v), (d)) |
2239 | #define amdgpu_asic_set_vce_clocks(adev, ev, ec) (adev)->asic_funcs->set_vce_clocks((adev), (ev), (ec)) | 2251 | #define amdgpu_asic_set_vce_clocks(adev, ev, ec) (adev)->asic_funcs->set_vce_clocks((adev), (ev), (ec)) |
2240 | #define amdgpu_asic_get_virtual_caps(adev) ((adev)->asic_funcs->get_virtual_caps((adev))) | 2252 | #define amdgpu_get_pcie_lanes(adev) (adev)->asic_funcs->get_pcie_lanes((adev)) |
2253 | #define amdgpu_set_pcie_lanes(adev, l) (adev)->asic_funcs->set_pcie_lanes((adev), (l)) | ||
2254 | #define amdgpu_asic_get_gpu_clock_counter(adev) (adev)->asic_funcs->get_gpu_clock_counter((adev)) | ||
2241 | #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev)) | 2255 | #define amdgpu_asic_read_disabled_bios(adev) (adev)->asic_funcs->read_disabled_bios((adev)) |
2242 | #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l)) | 2256 | #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l)) |
2257 | #define amdgpu_asic_detect_hw_virtualization(adev) (adev)->asic_funcs->detect_hw_virtualization((adev)) | ||
2243 | #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v))) | 2258 | #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v))) |
2244 | #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid)) | 2259 | #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid)) |
2245 | #define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags)) | 2260 | #define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags)) |
2246 | #define amdgpu_vm_copy_pte(adev, ib, pe, src, count) ((adev)->vm_manager.vm_pte_funcs->copy_pte((ib), (pe), (src), (count))) | 2261 | #define amdgpu_vm_copy_pte(adev, ib, pe, src, count) ((adev)->vm_manager.vm_pte_funcs->copy_pte((ib), (pe), (src), (count))) |
2247 | #define amdgpu_vm_write_pte(adev, ib, pa, pe, addr, count, incr, flags) ((adev)->vm_manager.vm_pte_funcs->write_pte((ib), (pa), (pe), (addr), (count), (incr), (flags))) | 2262 | #define amdgpu_vm_write_pte(adev, ib, pe, value, count, incr) ((adev)->vm_manager.vm_pte_funcs->write_pte((ib), (pe), (value), (count), (incr))) |
2248 | #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))) | 2263 | #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))) |
2249 | #define amdgpu_ring_parse_cs(r, p, ib) ((r)->funcs->parse_cs((p), (ib))) | 2264 | #define amdgpu_ring_parse_cs(r, p, ib) ((r)->funcs->parse_cs((p), (ib))) |
2250 | #define amdgpu_ring_test_ring(r) (r)->funcs->test_ring((r)) | 2265 | #define amdgpu_ring_test_ring(r) (r)->funcs->test_ring((r)) |
@@ -2259,9 +2274,13 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2259 | #define amdgpu_ring_emit_gds_switch(r, v, db, ds, wb, ws, ab, as) (r)->funcs->emit_gds_switch((r), (v), (db), (ds), (wb), (ws), (ab), (as)) | 2274 | #define amdgpu_ring_emit_gds_switch(r, v, db, ds, wb, ws, ab, as) (r)->funcs->emit_gds_switch((r), (v), (db), (ds), (wb), (ws), (ab), (as)) |
2260 | #define amdgpu_ring_emit_hdp_flush(r) (r)->funcs->emit_hdp_flush((r)) | 2275 | #define amdgpu_ring_emit_hdp_flush(r) (r)->funcs->emit_hdp_flush((r)) |
2261 | #define amdgpu_ring_emit_hdp_invalidate(r) (r)->funcs->emit_hdp_invalidate((r)) | 2276 | #define amdgpu_ring_emit_hdp_invalidate(r) (r)->funcs->emit_hdp_invalidate((r)) |
2277 | #define amdgpu_ring_emit_switch_buffer(r) (r)->funcs->emit_switch_buffer((r)) | ||
2278 | #define amdgpu_ring_emit_cntxcntl(r, d) (r)->funcs->emit_cntxcntl((r), (d)) | ||
2262 | #define amdgpu_ring_pad_ib(r, ib) ((r)->funcs->pad_ib((r), (ib))) | 2279 | #define amdgpu_ring_pad_ib(r, ib) ((r)->funcs->pad_ib((r), (ib))) |
2263 | #define amdgpu_ring_init_cond_exec(r) (r)->funcs->init_cond_exec((r)) | 2280 | #define amdgpu_ring_init_cond_exec(r) (r)->funcs->init_cond_exec((r)) |
2264 | #define amdgpu_ring_patch_cond_exec(r,o) (r)->funcs->patch_cond_exec((r),(o)) | 2281 | #define amdgpu_ring_patch_cond_exec(r,o) (r)->funcs->patch_cond_exec((r),(o)) |
2282 | #define amdgpu_ring_get_emit_ib_size(r) (r)->funcs->get_emit_ib_size((r)) | ||
2283 | #define amdgpu_ring_get_dma_frame_size(r) (r)->funcs->get_dma_frame_size((r)) | ||
2265 | #define amdgpu_ih_get_wptr(adev) (adev)->irq.ih_funcs->get_wptr((adev)) | 2284 | #define amdgpu_ih_get_wptr(adev) (adev)->irq.ih_funcs->get_wptr((adev)) |
2266 | #define amdgpu_ih_decode_iv(adev, iv) (adev)->irq.ih_funcs->decode_iv((adev), (iv)) | 2285 | #define amdgpu_ih_decode_iv(adev, iv) (adev)->irq.ih_funcs->decode_iv((adev), (iv)) |
2267 | #define amdgpu_ih_set_rptr(adev) (adev)->irq.ih_funcs->set_rptr((adev)) | 2286 | #define amdgpu_ih_set_rptr(adev) (adev)->irq.ih_funcs->set_rptr((adev)) |
@@ -2293,6 +2312,11 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2293 | #define amdgpu_gfx_get_gpu_clock_counter(adev) (adev)->gfx.funcs->get_gpu_clock_counter((adev)) | 2312 | #define amdgpu_gfx_get_gpu_clock_counter(adev) (adev)->gfx.funcs->get_gpu_clock_counter((adev)) |
2294 | #define amdgpu_gfx_select_se_sh(adev, se, sh, instance) (adev)->gfx.funcs->select_se_sh((adev), (se), (sh), (instance)) | 2313 | #define amdgpu_gfx_select_se_sh(adev, se, sh, instance) (adev)->gfx.funcs->select_se_sh((adev), (se), (sh), (instance)) |
2295 | 2314 | ||
2315 | #define amdgpu_dpm_read_sensor(adev, idx, value) \ | ||
2316 | ((adev)->pp_enabled ? \ | ||
2317 | (adev)->powerplay.pp_funcs->read_sensor(adev->powerplay.pp_handle, (idx), (value)) : \ | ||
2318 | -EINVAL) | ||
2319 | |||
2296 | #define amdgpu_dpm_get_temperature(adev) \ | 2320 | #define amdgpu_dpm_get_temperature(adev) \ |
2297 | ((adev)->pp_enabled ? \ | 2321 | ((adev)->pp_enabled ? \ |
2298 | (adev)->powerplay.pp_funcs->get_temperature((adev)->powerplay.pp_handle) : \ | 2322 | (adev)->powerplay.pp_funcs->get_temperature((adev)->powerplay.pp_handle) : \ |
@@ -2344,11 +2368,6 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2344 | (adev)->powerplay.pp_funcs->powergate_vce((adev)->powerplay.pp_handle, (g)) : \ | 2368 | (adev)->powerplay.pp_funcs->powergate_vce((adev)->powerplay.pp_handle, (g)) : \ |
2345 | (adev)->pm.funcs->powergate_vce((adev), (g))) | 2369 | (adev)->pm.funcs->powergate_vce((adev), (g))) |
2346 | 2370 | ||
2347 | #define amdgpu_dpm_debugfs_print_current_performance_level(adev, m) \ | ||
2348 | ((adev)->pp_enabled ? \ | ||
2349 | (adev)->powerplay.pp_funcs->print_current_performance_level((adev)->powerplay.pp_handle, (m)) : \ | ||
2350 | (adev)->pm.funcs->debugfs_print_current_performance_level((adev), (m))) | ||
2351 | |||
2352 | #define amdgpu_dpm_get_current_power_state(adev) \ | 2371 | #define amdgpu_dpm_get_current_power_state(adev) \ |
2353 | (adev)->powerplay.pp_funcs->get_current_power_state((adev)->powerplay.pp_handle) | 2372 | (adev)->powerplay.pp_funcs->get_current_power_state((adev)->powerplay.pp_handle) |
2354 | 2373 | ||
@@ -2389,6 +2408,7 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring) | |||
2389 | 2408 | ||
2390 | /* Common functions */ | 2409 | /* Common functions */ |
2391 | int amdgpu_gpu_reset(struct amdgpu_device *adev); | 2410 | int amdgpu_gpu_reset(struct amdgpu_device *adev); |
2411 | bool amdgpu_need_backup(struct amdgpu_device *adev); | ||
2392 | void amdgpu_pci_config_reset(struct amdgpu_device *adev); | 2412 | void amdgpu_pci_config_reset(struct amdgpu_device *adev); |
2393 | bool amdgpu_card_posted(struct amdgpu_device *adev); | 2413 | bool amdgpu_card_posted(struct amdgpu_device *adev); |
2394 | void amdgpu_update_display_priority(struct amdgpu_device *adev); | 2414 | void amdgpu_update_display_priority(struct amdgpu_device *adev); |
@@ -2414,6 +2434,10 @@ uint32_t amdgpu_ttm_tt_pte_flags(struct amdgpu_device *adev, struct ttm_tt *ttm, | |||
2414 | void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 base); | 2434 | void amdgpu_vram_location(struct amdgpu_device *adev, struct amdgpu_mc *mc, u64 base); |
2415 | void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc); | 2435 | void amdgpu_gtt_location(struct amdgpu_device *adev, struct amdgpu_mc *mc); |
2416 | void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 size); | 2436 | void amdgpu_ttm_set_active_vram_size(struct amdgpu_device *adev, u64 size); |
2437 | u64 amdgpu_ttm_get_gtt_mem_size(struct amdgpu_device *adev); | ||
2438 | int amdgpu_ttm_global_init(struct amdgpu_device *adev); | ||
2439 | int amdgpu_ttm_init(struct amdgpu_device *adev); | ||
2440 | void amdgpu_ttm_fini(struct amdgpu_device *adev); | ||
2417 | void amdgpu_program_register_sequence(struct amdgpu_device *adev, | 2441 | void amdgpu_program_register_sequence(struct amdgpu_device *adev, |
2418 | const u32 *registers, | 2442 | const u32 *registers, |
2419 | const u32 array_size); | 2443 | const u32 array_size); |
@@ -2425,11 +2449,13 @@ void amdgpu_register_atpx_handler(void); | |||
2425 | void amdgpu_unregister_atpx_handler(void); | 2449 | void amdgpu_unregister_atpx_handler(void); |
2426 | bool amdgpu_has_atpx_dgpu_power_cntl(void); | 2450 | bool amdgpu_has_atpx_dgpu_power_cntl(void); |
2427 | bool amdgpu_is_atpx_hybrid(void); | 2451 | bool amdgpu_is_atpx_hybrid(void); |
2452 | bool amdgpu_atpx_dgpu_req_power_for_displays(void); | ||
2428 | #else | 2453 | #else |
2429 | static inline void amdgpu_register_atpx_handler(void) {} | 2454 | static inline void amdgpu_register_atpx_handler(void) {} |
2430 | static inline void amdgpu_unregister_atpx_handler(void) {} | 2455 | static inline void amdgpu_unregister_atpx_handler(void) {} |
2431 | static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; } | 2456 | static inline bool amdgpu_has_atpx_dgpu_power_cntl(void) { return false; } |
2432 | static inline bool amdgpu_is_atpx_hybrid(void) { return false; } | 2457 | static inline bool amdgpu_is_atpx_hybrid(void) { return false; } |
2458 | static inline bool amdgpu_atpx_dgpu_req_power_for_displays(void) { return false; } | ||
2433 | #endif | 2459 | #endif |
2434 | 2460 | ||
2435 | /* | 2461 | /* |
@@ -2446,8 +2472,8 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev, | |||
2446 | struct drm_file *file_priv); | 2472 | struct drm_file *file_priv); |
2447 | void amdgpu_driver_preclose_kms(struct drm_device *dev, | 2473 | void amdgpu_driver_preclose_kms(struct drm_device *dev, |
2448 | struct drm_file *file_priv); | 2474 | struct drm_file *file_priv); |
2449 | int amdgpu_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon); | 2475 | int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon); |
2450 | int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon); | 2476 | int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon); |
2451 | u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe); | 2477 | u32 amdgpu_get_vblank_counter_kms(struct drm_device *dev, unsigned int pipe); |
2452 | int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe); | 2478 | int amdgpu_enable_vblank_kms(struct drm_device *dev, unsigned int pipe); |
2453 | void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe); | 2479 | void amdgpu_disable_vblank_kms(struct drm_device *dev, unsigned int pipe); |
@@ -2493,6 +2519,7 @@ static inline void amdgpu_acpi_fini(struct amdgpu_device *adev) { } | |||
2493 | struct amdgpu_bo_va_mapping * | 2519 | struct amdgpu_bo_va_mapping * |
2494 | amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser, | 2520 | amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser, |
2495 | uint64_t addr, struct amdgpu_bo **bo); | 2521 | uint64_t addr, struct amdgpu_bo **bo); |
2522 | int amdgpu_cs_sysvm_access_required(struct amdgpu_cs_parser *parser); | ||
2496 | 2523 | ||
2497 | #include "amdgpu_object.h" | 2524 | #include "amdgpu_object.h" |
2498 | #endif | 2525 | #endif |