Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79a0c465 authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher
Browse files

drm/amdgpu:fix gmc_v9 vm fault process for SRIOV



for SRIOV we cannot use access register when in IRQ routine
with regular KIQ method

Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 6e9dc861
Loading
Loading
Loading
Loading
+16 −8
Original line number Diff line number Diff line
@@ -137,6 +137,7 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
	addr = (u64)entry->src_data[0] << 12;
	addr |= ((u64)entry->src_data[1] & 0xf) << 44;

	if (!amdgpu_sriov_vf(adev)) {
		if (entry->vm_id_src) {
			status = RREG32(mmhub->vm_l2_pro_fault_status);
			WREG32_P(mmhub->vm_l2_pro_fault_cntl, 1, ~1);
@@ -151,6 +152,13 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
		  entry->vm_id_src ? "mmhub" : "gfxhub",
		  entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
		  addr, entry->client_id, status);
	} else {
		DRM_ERROR("[%s]VMC page fault (src_id:%u ring:%u vm_id:%u pas_id:%u) "
		  "at page 0x%016llx from %d\n",
		  entry->vm_id_src ? "mmhub" : "gfxhub",
		  entry->src_id, entry->ring_id, entry->vm_id, entry->pas_id,
		  addr, entry->client_id);
	}

	return 0;
}