Commit 100d0ae8 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amd-drm-fixes-6.0-2022-08-25' of...

Merge tag 'amd-drm-fixes-6.0-2022-08-25' of https://gitlab.freedesktop.org/agd5f/linux

 into drm-fixes

amd-drm-fixes-6.0-2022-08-25:

amdgpu:
- GFX 11.0 fixes
- PSP XGMI handling fixes
- GFX9 fix for compute-only IPs
- Drop duplicated function call
- Fix warning due to missing header
- NBIO 7.7 fixes
- DCN 3.1.4 fixes
- SDMA 6.0 fixes
- SMU 13.0 fixes
- Arcturus GPUVM page table fix
- MMHUB 1.0 fix

amdkfd:
- GC 10.3.7 fix

radeon:
- Delayed work flush fix

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220825181243.5853-1-alexander.deucher@amd.com
parents 064d491f b8983d42
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2456,12 +2456,14 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)
			if (!hive->reset_domain ||
			    !amdgpu_reset_get_reset_domain(hive->reset_domain)) {
				r = -ENOENT;
				amdgpu_put_xgmi_hive(hive);
				goto init_failed;
			}

			/* Drop the early temporary reset domain we created for device */
			amdgpu_reset_put_reset_domain(adev->reset_domain);
			adev->reset_domain = hive->reset_domain;
			amdgpu_put_xgmi_hive(hive);
		}
	}

@@ -4413,8 +4415,6 @@ static int amdgpu_device_reset_sriov(struct amdgpu_device *adev,
retry:
	amdgpu_amdkfd_pre_reset(adev);

	amdgpu_amdkfd_pre_reset(adev);

	if (from_hypervisor)
		r = amdgpu_virt_request_full_gpu(adev, true);
	else
+3 −0
Original line number Diff line number Diff line
@@ -2641,6 +2641,9 @@ static int psp_hw_fini(void *handle)
		psp_rap_terminate(psp);
		psp_dtm_terminate(psp);
		psp_hdcp_terminate(psp);

		if (adev->gmc.xgmi.num_physical_nodes > 1)
			psp_xgmi_terminate(psp);
	}

	psp_asd_terminate(psp);
+1 −1
Original line number Diff line number Diff line
@@ -742,7 +742,7 @@ int amdgpu_xgmi_remove_device(struct amdgpu_device *adev)
		amdgpu_put_xgmi_hive(hive);
	}

	return psp_xgmi_terminate(&adev->psp);
	return 0;
}

static int amdgpu_xgmi_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *ras_block)
+16 −8
Original line number Diff line number Diff line
@@ -131,6 +131,8 @@ static void gfx_v11_0_ring_invalidate_tlbs(struct amdgpu_ring *ring,
					   bool all_hub, uint8_t dst_sel);
static void gfx_v11_0_set_safe_mode(struct amdgpu_device *adev);
static void gfx_v11_0_unset_safe_mode(struct amdgpu_device *adev);
static void gfx_v11_0_update_perf_clk(struct amdgpu_device *adev,
				      bool enable);

static void gfx11_kiq_set_resources(struct amdgpu_ring *kiq_ring, uint64_t queue_mask)
{
@@ -1139,6 +1141,7 @@ static const struct amdgpu_gfx_funcs gfx_v11_0_gfx_funcs = {
	.read_wave_vgprs = &gfx_v11_0_read_wave_vgprs,
	.select_me_pipe_q = &gfx_v11_0_select_me_pipe_q,
	.init_spm_golden = &gfx_v11_0_init_spm_golden_registers,
	.update_perfmon_mgcg = &gfx_v11_0_update_perf_clk,
};

static int gfx_v11_0_gpu_early_init(struct amdgpu_device *adev)
@@ -5182,9 +5185,12 @@ static void gfx_v11_0_update_coarse_grain_clock_gating(struct amdgpu_device *ade
		data = REG_SET_FIELD(data, SDMA0_RLC_CGCG_CTRL, CGCG_INT_ENABLE, 1);
		WREG32_SOC15(GC, 0, regSDMA0_RLC_CGCG_CTRL, data);

		/* Some ASICs only have one SDMA instance, not need to configure SDMA1 */
		if (adev->sdma.num_instances > 1) {
			data = RREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL);
			data = REG_SET_FIELD(data, SDMA1_RLC_CGCG_CTRL, CGCG_INT_ENABLE, 1);
			WREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL, data);
		}
	} else {
		/* Program RLC_CGCG_CGLS_CTRL */
		def = data = RREG32_SOC15(GC, 0, regRLC_CGCG_CGLS_CTRL);
@@ -5213,11 +5219,14 @@ static void gfx_v11_0_update_coarse_grain_clock_gating(struct amdgpu_device *ade
		data &= ~SDMA0_RLC_CGCG_CTRL__CGCG_INT_ENABLE_MASK;
		WREG32_SOC15(GC, 0, regSDMA0_RLC_CGCG_CTRL, data);

		/* Some ASICs only have one SDMA instance, not need to configure SDMA1 */
		if (adev->sdma.num_instances > 1) {
			data = RREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL);
			data &= ~SDMA1_RLC_CGCG_CTRL__CGCG_INT_ENABLE_MASK;
			WREG32_SOC15(GC, 0, regSDMA1_RLC_CGCG_CTRL, data);
		}
	}
}

static int gfx_v11_0_update_gfx_clock_gating(struct amdgpu_device *adev,
					    bool enable)
@@ -5328,8 +5337,7 @@ static int gfx_v11_0_set_powergating_state(void *handle,
		break;
	case IP_VERSION(11, 0, 1):
		gfx_v11_cntl_pg(adev, enable);
		/* TODO: Enable this when GFXOFF is ready */
		// amdgpu_gfx_off_ctrl(adev, enable);
		amdgpu_gfx_off_ctrl(adev, enable);
		break;
	default:
		break;
+2 −1
Original line number Diff line number Diff line
@@ -2587,6 +2587,7 @@ static void gfx_v9_0_constants_init(struct amdgpu_device *adev)

	gfx_v9_0_tiling_mode_table_init(adev);

	if (adev->gfx.num_gfx_rings)
		gfx_v9_0_setup_rb(adev);
	gfx_v9_0_get_cu_info(adev, &adev->gfx.cu_info);
	adev->gfx.config.db_debug2 = RREG32_SOC15(GC, 0, mmDB_DEBUG2);
Loading