Commit b05d6476 authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher
Browse files

drm/amdgpu: Retire query_utcl2_poison_status callback



Driver switches to interrupt source id to identify
utcl2 poison event. polling interface is not needed.

Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 75f0efbc
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -783,22 +783,6 @@ int amdgpu_amdkfd_send_close_event_drain_irq(struct amdgpu_device *adev,
	return 0;
}

bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev,
			int hub_inst, int hub_type)
{
	if (!hub_type) {
		if (adev->gfxhub.funcs->query_utcl2_poison_status)
			return adev->gfxhub.funcs->query_utcl2_poison_status(adev, hub_inst);
		else
			return false;
	} else {
		if (adev->mmhub.funcs->query_utcl2_poison_status)
			return adev->mmhub.funcs->query_utcl2_poison_status(adev, hub_inst);
		else
			return false;
	}
}

int amdgpu_amdkfd_check_and_lock_kfd(struct amdgpu_device *adev)
{
	return kgd2kfd_check_and_lock_kfd();
+0 −2
Original line number Diff line number Diff line
@@ -350,8 +350,6 @@ bool amdgpu_amdkfd_is_fed(struct amdgpu_device *adev);
bool amdgpu_amdkfd_bo_mapped_to_dev(void *drm_priv, struct kgd_mem *mem);
void amdgpu_amdkfd_block_mmu_notifications(void *p);
int amdgpu_amdkfd_criu_resume(void *p);
bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev,
			int hub_inst, int hub_type);
int amdgpu_amdkfd_reserve_mem_limit(struct amdgpu_device *adev,
		uint64_t size, u32 alloc_flag, int8_t xcp_id);
void amdgpu_amdkfd_unreserve_mem_limit(struct amdgpu_device *adev,
+0 −2
Original line number Diff line number Diff line
@@ -38,8 +38,6 @@ struct amdgpu_gfxhub_funcs {
	void (*mode2_save_regs)(struct amdgpu_device *adev);
	void (*mode2_restore_regs)(struct amdgpu_device *adev);
	void (*halt)(struct amdgpu_device *adev);
	bool (*query_utcl2_poison_status)(struct amdgpu_device *adev,
			int xcc_id);
};

struct amdgpu_gfxhub {
+0 −2
Original line number Diff line number Diff line
@@ -63,8 +63,6 @@ struct amdgpu_mmhub_funcs {
				uint64_t page_table_base);
	void (*update_power_gating)(struct amdgpu_device *adev,
                                bool enable);
	bool (*query_utcl2_poison_status)(struct amdgpu_device *adev,
				int hub_inst);
};

struct amdgpu_mmhub {
+0 −18
Original line number Diff line number Diff line
@@ -443,23 +443,6 @@ static void gfxhub_v1_0_init(struct amdgpu_device *adev)
		mmVM_INVALIDATE_ENG0_ADDR_RANGE_LO32;
}

static bool gfxhub_v1_0_query_utcl2_poison_status(struct amdgpu_device *adev,
				int xcc_id)
{
	u32 status = 0;
	struct amdgpu_vmhub *hub;

	if (amdgpu_ip_version(adev, GC_HWIP, 0) != IP_VERSION(9, 4, 2))
		return false;

	hub = &adev->vmhub[AMDGPU_GFXHUB(0)];
	status = RREG32(hub->vm_l2_pro_fault_status);
	/* reset page fault status */
	WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);

	return REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, FED);
}

const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs = {
	.get_mc_fb_offset = gfxhub_v1_0_get_mc_fb_offset,
	.setup_vm_pt_regs = gfxhub_v1_0_setup_vm_pt_regs,
@@ -468,5 +451,4 @@ const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs = {
	.set_fault_enable_default = gfxhub_v1_0_set_fault_enable_default,
	.init = gfxhub_v1_0_init,
	.get_xgmi_info = gfxhub_v1_1_get_xgmi_info,
	.query_utcl2_poison_status = gfxhub_v1_0_query_utcl2_poison_status,
};
Loading