Skip to content

Commit 9a91e5e

Browse files
committed
Merge tag 'amd-drm-next-5.14-2021-05-21' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-5.14-2021-05-21: amdgpu: - RAS fixes - SR-IOV fixes - More BO management cleanups - Aldebaran fixes - Display fixes - Support for new GPU, Beige Goby - Backlight fixes amdkfd: - RAS fixes - DMA mapping fixes - HMM SVM fixes Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents c99c4d0 + 81db370 commit 9a91e5e

File tree

135 files changed

+51823
-932
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+51823
-932
lines changed

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ amdgpu-y += \
7373
vi.o mxgpu_vi.o nbio_v6_1.o soc15.o emu_soc.o mxgpu_ai.o nbio_v7_0.o vega10_reg_init.o \
7474
vega20_reg_init.o nbio_v7_4.o nbio_v2_3.o nv.o navi10_reg_init.o navi14_reg_init.o \
7575
arct_reg_init.o navi12_reg_init.o mxgpu_nv.o sienna_cichlid_reg_init.o vangogh_reg_init.o \
76-
nbio_v7_2.o dimgrey_cavefish_reg_init.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o
76+
nbio_v7_2.o dimgrey_cavefish_reg_init.o hdp_v4_0.o hdp_v5_0.o aldebaran_reg_init.o aldebaran.o \
77+
beige_goby_reg_init.o
7778

7879
# add DF block
7980
amdgpu-y += \

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,10 +670,10 @@ int amdgpu_amdkfd_flush_gpu_tlb_vmid(struct kgd_dev *kgd, uint16_t vmid)
670670
return 0;
671671
}
672672

673-
int amdgpu_amdkfd_flush_gpu_tlb_pasid(struct kgd_dev *kgd, uint16_t pasid)
673+
int amdgpu_amdkfd_flush_gpu_tlb_pasid(struct kgd_dev *kgd, uint16_t pasid,
674+
enum TLB_FLUSH_TYPE flush_type)
674675
{
675676
struct amdgpu_device *adev = (struct amdgpu_device *)kgd;
676-
const uint32_t flush_type = 0;
677677
bool all_hub = false;
678678

679679
if (adev->family == AMDGPU_FAMILY_AI)

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,35 @@
3636

3737
extern uint64_t amdgpu_amdkfd_total_mem_size;
3838

39+
enum TLB_FLUSH_TYPE {
40+
TLB_FLUSH_LEGACY = 0,
41+
TLB_FLUSH_LIGHTWEIGHT,
42+
TLB_FLUSH_HEAVYWEIGHT
43+
};
44+
3945
struct amdgpu_device;
4046

41-
struct kfd_bo_va_list {
42-
struct list_head bo_list;
43-
struct amdgpu_bo_va *bo_va;
44-
void *kgd_dev;
47+
enum kfd_mem_attachment_type {
48+
KFD_MEM_ATT_SHARED, /* Share kgd_mem->bo or another attachment's */
49+
KFD_MEM_ATT_USERPTR, /* SG bo to DMA map pages from a userptr bo */
50+
KFD_MEM_ATT_DMABUF, /* DMAbuf to DMA map TTM BOs */
51+
};
52+
53+
struct kfd_mem_attachment {
54+
struct list_head list;
55+
enum kfd_mem_attachment_type type;
4556
bool is_mapped;
57+
struct amdgpu_bo_va *bo_va;
58+
struct amdgpu_device *adev;
4659
uint64_t va;
4760
uint64_t pte_flags;
4861
};
4962

5063
struct kgd_mem {
5164
struct mutex lock;
5265
struct amdgpu_bo *bo;
53-
struct list_head bo_va_list;
66+
struct dma_buf *dmabuf;
67+
struct list_head attachments;
5468
/* protected by amdkfd_process_info.lock */
5569
struct ttm_validate_buffer validate_list;
5670
struct ttm_validate_buffer resv_list;
@@ -135,7 +149,8 @@ int amdgpu_amdkfd_submit_ib(struct kgd_dev *kgd, enum kgd_engine_type engine,
135149
void amdgpu_amdkfd_set_compute_idle(struct kgd_dev *kgd, bool idle);
136150
bool amdgpu_amdkfd_have_atomics_support(struct kgd_dev *kgd);
137151
int amdgpu_amdkfd_flush_gpu_tlb_vmid(struct kgd_dev *kgd, uint16_t vmid);
138-
int amdgpu_amdkfd_flush_gpu_tlb_pasid(struct kgd_dev *kgd, uint16_t pasid);
152+
int amdgpu_amdkfd_flush_gpu_tlb_pasid(struct kgd_dev *kgd, uint16_t pasid,
153+
enum TLB_FLUSH_TYPE flush_type);
139154

140155
bool amdgpu_amdkfd_is_kfd_vmid(struct amdgpu_device *adev, u32 vmid);
141156

0 commit comments

Comments
 (0)