From baf5af1ca0de13edabcefdb9b88da97eec7a2f14 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Thu, 28 Jul 2022 09:51:32 +0000 Subject: [PATCH] WIP: amdgpu: Debug vram lossage. --- sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h index 332e0cd1f130..060e0b63d8f6 100644 --- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h +++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu.h @@ -1144,7 +1144,14 @@ int emu_soc_asic_init(struct amdgpu_device *adev); #define amdgpu_asic_get_pcie_replay_count(adev) ((adev)->asic_funcs->get_pcie_replay_count((adev))) #define amdgpu_asic_supports_baco(adev) (adev)->asic_funcs->supports_baco((adev)) -#define amdgpu_inc_vram_lost(adev) atomic_inc(&((adev)->vram_lost_counter)); +#include +static void +amdgpu_inc_vram_lost(struct amdgpu_device *adev) +{ + printf("%s\n", __func__); + db_stacktrace(); + atomic_inc(&((adev)->vram_lost_counter)); +} /* Common functions */ bool amdgpu_device_should_recover_gpu(struct amdgpu_device *adev);