Skip to content

Commit b05d647

Browse files
Hawking Zhangalexdeucher
authored andcommitted
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: Hawking Zhang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 75f0efb commit b05d647

File tree

7 files changed

+0
-74
lines changed

7 files changed

+0
-74
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -783,22 +783,6 @@ int amdgpu_amdkfd_send_close_event_drain_irq(struct amdgpu_device *adev,
783783
return 0;
784784
}
785785

786-
bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev,
787-
int hub_inst, int hub_type)
788-
{
789-
if (!hub_type) {
790-
if (adev->gfxhub.funcs->query_utcl2_poison_status)
791-
return adev->gfxhub.funcs->query_utcl2_poison_status(adev, hub_inst);
792-
else
793-
return false;
794-
} else {
795-
if (adev->mmhub.funcs->query_utcl2_poison_status)
796-
return adev->mmhub.funcs->query_utcl2_poison_status(adev, hub_inst);
797-
else
798-
return false;
799-
}
800-
}
801-
802786
int amdgpu_amdkfd_check_and_lock_kfd(struct amdgpu_device *adev)
803787
{
804788
return kgd2kfd_check_and_lock_kfd();

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ bool amdgpu_amdkfd_is_fed(struct amdgpu_device *adev);
350350
bool amdgpu_amdkfd_bo_mapped_to_dev(void *drm_priv, struct kgd_mem *mem);
351351
void amdgpu_amdkfd_block_mmu_notifications(void *p);
352352
int amdgpu_amdkfd_criu_resume(void *p);
353-
bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev,
354-
int hub_inst, int hub_type);
355353
int amdgpu_amdkfd_reserve_mem_limit(struct amdgpu_device *adev,
356354
uint64_t size, u32 alloc_flag, int8_t xcp_id);
357355
void amdgpu_amdkfd_unreserve_mem_limit(struct amdgpu_device *adev,

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ struct amdgpu_gfxhub_funcs {
3838
void (*mode2_save_regs)(struct amdgpu_device *adev);
3939
void (*mode2_restore_regs)(struct amdgpu_device *adev);
4040
void (*halt)(struct amdgpu_device *adev);
41-
bool (*query_utcl2_poison_status)(struct amdgpu_device *adev,
42-
int xcc_id);
4341
};
4442

4543
struct amdgpu_gfxhub {

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ struct amdgpu_mmhub_funcs {
6363
uint64_t page_table_base);
6464
void (*update_power_gating)(struct amdgpu_device *adev,
6565
bool enable);
66-
bool (*query_utcl2_poison_status)(struct amdgpu_device *adev,
67-
int hub_inst);
6866
};
6967

7068
struct amdgpu_mmhub {

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -443,23 +443,6 @@ static void gfxhub_v1_0_init(struct amdgpu_device *adev)
443443
mmVM_INVALIDATE_ENG0_ADDR_RANGE_LO32;
444444
}
445445

446-
static bool gfxhub_v1_0_query_utcl2_poison_status(struct amdgpu_device *adev,
447-
int xcc_id)
448-
{
449-
u32 status = 0;
450-
struct amdgpu_vmhub *hub;
451-
452-
if (amdgpu_ip_version(adev, GC_HWIP, 0) != IP_VERSION(9, 4, 2))
453-
return false;
454-
455-
hub = &adev->vmhub[AMDGPU_GFXHUB(0)];
456-
status = RREG32(hub->vm_l2_pro_fault_status);
457-
/* reset page fault status */
458-
WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);
459-
460-
return REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, FED);
461-
}
462-
463446
const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs = {
464447
.get_mc_fb_offset = gfxhub_v1_0_get_mc_fb_offset,
465448
.setup_vm_pt_regs = gfxhub_v1_0_setup_vm_pt_regs,
@@ -468,5 +451,4 @@ const struct amdgpu_gfxhub_funcs gfxhub_v1_0_funcs = {
468451
.set_fault_enable_default = gfxhub_v1_0_set_fault_enable_default,
469452
.init = gfxhub_v1_0_init,
470453
.get_xgmi_info = gfxhub_v1_1_get_xgmi_info,
471-
.query_utcl2_poison_status = gfxhub_v1_0_query_utcl2_poison_status,
472454
};

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -622,22 +622,6 @@ static int gfxhub_v1_2_get_xgmi_info(struct amdgpu_device *adev)
622622
return 0;
623623
}
624624

625-
static bool gfxhub_v1_2_query_utcl2_poison_status(struct amdgpu_device *adev,
626-
int xcc_id)
627-
{
628-
u32 fed, status;
629-
630-
status = RREG32_SOC15(GC, GET_INST(GC, xcc_id), regVM_L2_PROTECTION_FAULT_STATUS);
631-
fed = REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, FED);
632-
if (!amdgpu_sriov_vf(adev)) {
633-
/* clear page fault status and address */
634-
WREG32_P(SOC15_REG_OFFSET(GC, GET_INST(GC, xcc_id),
635-
regVM_L2_PROTECTION_FAULT_CNTL), 1, ~1);
636-
}
637-
638-
return fed;
639-
}
640-
641625
const struct amdgpu_gfxhub_funcs gfxhub_v1_2_funcs = {
642626
.get_mc_fb_offset = gfxhub_v1_2_get_mc_fb_offset,
643627
.setup_vm_pt_regs = gfxhub_v1_2_setup_vm_pt_regs,
@@ -646,7 +630,6 @@ const struct amdgpu_gfxhub_funcs gfxhub_v1_2_funcs = {
646630
.set_fault_enable_default = gfxhub_v1_2_set_fault_enable_default,
647631
.init = gfxhub_v1_2_init,
648632
.get_xgmi_info = gfxhub_v1_2_get_xgmi_info,
649-
.query_utcl2_poison_status = gfxhub_v1_2_query_utcl2_poison_status,
650633
};
651634

652635
static int gfxhub_v1_2_xcp_resume(void *handle, uint32_t inst_mask)

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -559,22 +559,6 @@ static void mmhub_v1_8_get_clockgating(struct amdgpu_device *adev, u64 *flags)
559559

560560
}
561561

562-
static bool mmhub_v1_8_query_utcl2_poison_status(struct amdgpu_device *adev,
563-
int hub_inst)
564-
{
565-
u32 fed, status;
566-
567-
status = RREG32_SOC15(MMHUB, hub_inst, regVM_L2_PROTECTION_FAULT_STATUS);
568-
fed = REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, FED);
569-
if (!amdgpu_sriov_vf(adev)) {
570-
/* clear page fault status and address */
571-
WREG32_P(SOC15_REG_OFFSET(MMHUB, hub_inst,
572-
regVM_L2_PROTECTION_FAULT_CNTL), 1, ~1);
573-
}
574-
575-
return fed;
576-
}
577-
578562
const struct amdgpu_mmhub_funcs mmhub_v1_8_funcs = {
579563
.get_fb_location = mmhub_v1_8_get_fb_location,
580564
.init = mmhub_v1_8_init,
@@ -584,7 +568,6 @@ const struct amdgpu_mmhub_funcs mmhub_v1_8_funcs = {
584568
.setup_vm_pt_regs = mmhub_v1_8_setup_vm_pt_regs,
585569
.set_clockgating = mmhub_v1_8_set_clockgating,
586570
.get_clockgating = mmhub_v1_8_get_clockgating,
587-
.query_utcl2_poison_status = mmhub_v1_8_query_utcl2_poison_status,
588571
};
589572

590573
static const struct amdgpu_ras_err_status_reg_entry mmhub_v1_8_ce_reg_list[] = {

0 commit comments

Comments
 (0)