diff options
| author | Tao Zhou <tao.zhou1@amd.com> | 2024-02-19 15:55:24 +0800 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2024-03-20 13:37:36 -0400 | 
| commit | 71a8d61ebc38f0f1b96011518fefd0a1e07efa74 (patch) | |
| tree | 285af2a27579fe8af0773e1bb857fd3bbdb055fd /drivers/gpu/drm/amd/amdgpu | |
| parent | 3eb899c40a6190f6eee0bea7c340a4cb32112548 (diff) | |
drm/amdgpu: retire gfx ras query_utcl2_poison_status
Replace it with related interface in gfxhub functions.
v2: replace node id with xcc id.
    get node id for query_utcl2_poison_status
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 7 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 3 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 1 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c | 12 | 
4 files changed, 6 insertions, 17 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c index 35dd6effa9a3..d5fde8adf19b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c @@ -769,10 +769,11 @@ 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) +bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev, +			int xcc_id)  { -	if (adev->gfx.ras && adev->gfx.ras->query_utcl2_poison_status) -		return adev->gfx.ras->query_utcl2_poison_status(adev); +	if (adev->gfxhub.funcs->query_utcl2_poison_status) +		return adev->gfxhub.funcs->query_utcl2_poison_status(adev, xcc_id);  	else  		return false;  } diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h index 0ef223c2affb..caee36e52a09 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h @@ -341,7 +341,8 @@ bool amdgpu_amdkfd_is_fed(struct amdgpu_device *adev);  bool amdgpu_amdkfd_bo_mapped_to_dev(struct amdgpu_device *adev, 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); +bool amdgpu_amdkfd_ras_query_utcl2_poison_status(struct amdgpu_device *adev, +			int xcc_id);  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, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h index 8fcf889ddce9..04a86dff71e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h @@ -259,7 +259,6 @@ struct amdgpu_cu_info {  struct amdgpu_gfx_ras {  	struct amdgpu_ras_block_object  ras_block;  	void (*enable_watchdog_timer)(struct amdgpu_device *adev); -	bool (*query_utcl2_poison_status)(struct amdgpu_device *adev);  	int (*rlc_gc_fed_irq)(struct amdgpu_device *adev,  				struct amdgpu_irq_src *source,  				struct amdgpu_iv_entry *entry); diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c index 065b2bd5f5a6..3f4fd2f08163 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_2.c @@ -1909,18 +1909,7 @@ static void gfx_v9_4_2_reset_sq_timeout_status(struct amdgpu_device *adev)  	mutex_unlock(&adev->grbm_idx_mutex);  } -static bool gfx_v9_4_2_query_uctl2_poison_status(struct amdgpu_device *adev) -{ -	u32 status = 0; -	struct amdgpu_vmhub *hub; - -	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); -}  struct amdgpu_ras_block_hw_ops  gfx_v9_4_2_ras_ops = {  		.query_ras_error_count = &gfx_v9_4_2_query_ras_error_count, @@ -1934,5 +1923,4 @@ struct amdgpu_gfx_ras gfx_v9_4_2_ras = {  		.hw_ops = &gfx_v9_4_2_ras_ops,  	},  	.enable_watchdog_timer = &gfx_v9_4_2_enable_watchdog_timer, -	.query_utcl2_poison_status = gfx_v9_4_2_query_uctl2_poison_status,  }; | 
