Skip to content

Commit 72cfb83

Browse files
committed
Merge tag 'amd-drm-next-5.18-2022-03-25' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-next-5.18-2022-03-25: amdgpu: - GFX 10.3.7 fixes - noretry updates - VCN fixes - TMDS fix - zstate fix for freesync video - DCN 3.1.5 fix - Display stack size fix - Audio fix - DCN 3.1 pstate fix - TMZ VCN fix - APU passthrough fix - Misc other fixes amdkfd: - Error handling fix - xgmi p2p fix - HWS VMIDs fix Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220325183602.5718-1-alexander.deucher@amd.com
2 parents 3123109 + 15f9cd4 commit 72cfb83

34 files changed

Lines changed: 229 additions & 39 deletions

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@
119119
#define CONNECTOR_OBJECT_ID_eDP 0x14
120120
#define CONNECTOR_OBJECT_ID_MXM 0x15
121121
#define CONNECTOR_OBJECT_ID_LVDS_eDP 0x16
122+
#define CONNECTOR_OBJECT_ID_USBC 0x17
122123

123124
/* deleted */
124125

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5733,7 +5733,7 @@ void amdgpu_device_flush_hdp(struct amdgpu_device *adev,
57335733
struct amdgpu_ring *ring)
57345734
{
57355735
#ifdef CONFIG_X86_64
5736-
if (adev->flags & AMD_IS_APU)
5736+
if ((adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev))
57375737
return;
57385738
#endif
57395739
if (adev->gmc.xgmi.connected_to_cpu)
@@ -5749,7 +5749,7 @@ void amdgpu_device_invalidate_hdp(struct amdgpu_device *adev,
57495749
struct amdgpu_ring *ring)
57505750
{
57515751
#ifdef CONFIG_X86_64
5752-
if (adev->flags & AMD_IS_APU)
5752+
if ((adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev))
57535753
return;
57545754
#endif
57555755
if (adev->gmc.xgmi.connected_to_cpu)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ MODULE_PARM_DESC(sched_policy,
680680
* Maximum number of processes that HWS can schedule concurrently. The maximum is the
681681
* number of VMIDs assigned to the HWS, which is also the default.
682682
*/
683-
int hws_max_conc_proc = 8;
683+
int hws_max_conc_proc = -1;
684684
module_param(hws_max_conc_proc, int, 0444);
685685
MODULE_PARM_DESC(hws_max_conc_proc,
686686
"Max # processes HWS can execute concurrently when sched_policy=0 (0 = no concurrency, #VMIDs for KFD = Maximum(default))");

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ static int amdgpu_gfx_kiq_acquire(struct amdgpu_device *adev,
266266
* adev->gfx.mec.num_pipe_per_mec
267267
* adev->gfx.mec.num_queue_per_pipe;
268268

269-
while (queue_bit-- >= 0) {
269+
while (--queue_bit >= 0) {
270270
if (test_bit(queue_bit, adev->gfx.mec.queue_bitmap))
271271
continue;
272272

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,15 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
561561

562562
switch (adev->ip_versions[GC_HWIP][0]) {
563563
case IP_VERSION(9, 0, 1):
564+
case IP_VERSION(9, 3, 0):
564565
case IP_VERSION(9, 4, 0):
565566
case IP_VERSION(9, 4, 1):
566567
case IP_VERSION(9, 4, 2):
568+
case IP_VERSION(10, 3, 3):
569+
case IP_VERSION(10, 3, 4):
570+
case IP_VERSION(10, 3, 5):
571+
case IP_VERSION(10, 3, 6):
572+
case IP_VERSION(10, 3, 7):
567573
/*
568574
* noretry = 0 will cause kfd page fault tests fail
569575
* for some ASICs, so set default to 1 for these ASICs.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,6 +1284,7 @@ void amdgpu_bo_get_memory(struct amdgpu_bo *bo, uint64_t *vram_mem,
12841284
*/
12851285
void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
12861286
{
1287+
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->bdev);
12871288
struct dma_fence *fence = NULL;
12881289
struct amdgpu_bo *abo;
12891290
int r;
@@ -1303,7 +1304,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
13031304
amdgpu_amdkfd_remove_fence_on_pt_pd_bos(abo);
13041305

13051306
if (bo->resource->mem_type != TTM_PL_VRAM ||
1306-
!(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE))
1307+
!(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE) ||
1308+
adev->in_suspend || adev->shutdown)
13071309
return;
13081310

13091311
if (WARN_ON_ONCE(!dma_resv_trylock(bo->base.resv)))

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7689,6 +7689,7 @@ static uint64_t gfx_v10_0_get_gpu_clock_counter(struct amdgpu_device *adev)
76897689
switch (adev->ip_versions[GC_HWIP][0]) {
76907690
case IP_VERSION(10, 3, 1):
76917691
case IP_VERSION(10, 3, 3):
7692+
case IP_VERSION(10, 3, 7):
76927693
preempt_disable();
76937694
clock_hi = RREG32_SOC15_NO_KIQ(SMUIO, 0, mmGOLDEN_TSC_COUNT_UPPER_Vangogh);
76947695
clock_lo = RREG32_SOC15_NO_KIQ(SMUIO, 0, mmGOLDEN_TSC_COUNT_LOWER_Vangogh);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -814,7 +814,7 @@ static int gmc_v10_0_mc_init(struct amdgpu_device *adev)
814814
adev->gmc.aper_size = pci_resource_len(adev->pdev, 0);
815815

816816
#ifdef CONFIG_X86_64
817-
if (adev->flags & AMD_IS_APU) {
817+
if ((adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev)) {
818818
adev->gmc.aper_base = adev->gfxhub.funcs->get_mc_fb_offset(adev);
819819
adev->gmc.aper_size = adev->gmc.real_vram_size;
820820
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,9 @@ static int gmc_v7_0_mc_init(struct amdgpu_device *adev)
381381
adev->gmc.aper_size = pci_resource_len(adev->pdev, 0);
382382

383383
#ifdef CONFIG_X86_64
384-
if (adev->flags & AMD_IS_APU &&
385-
adev->gmc.real_vram_size > adev->gmc.aper_size) {
384+
if ((adev->flags & AMD_IS_APU) &&
385+
adev->gmc.real_vram_size > adev->gmc.aper_size &&
386+
!amdgpu_passthrough(adev)) {
386387
adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
387388
adev->gmc.aper_size = adev->gmc.real_vram_size;
388389
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ static int gmc_v8_0_mc_init(struct amdgpu_device *adev)
581581
adev->gmc.aper_size = pci_resource_len(adev->pdev, 0);
582582

583583
#ifdef CONFIG_X86_64
584-
if (adev->flags & AMD_IS_APU) {
584+
if ((adev->flags & AMD_IS_APU) && !amdgpu_passthrough(adev)) {
585585
adev->gmc.aper_base = ((u64)RREG32(mmMC_VM_FB_OFFSET)) << 22;
586586
adev->gmc.aper_size = adev->gmc.real_vram_size;
587587
}

0 commit comments

Comments
 (0)