drm/amdkfd: SMI report dropped event count
authorPhilip Yang <Philip.Yang@amd.com>
Tue, 30 Jul 2024 19:33:23 +0000 (15:33 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Oct 2024 18:32:23 +0000 (14:32 -0400)
commita3ab2d45b9887ee609cd3bea39f668236935774c
tree006db690b926d9bd51fe643685d3671064076e2c
parent012be6f22c01e25c995c30f1f178ac11820dfb65
drm/amdkfd: SMI report dropped event count

Add new SMI event to report the dropped event count.

When the event kfifo is full, drop count is not zero, or no enough space
left to store the event message, increase drop count.

After reading event out from kfifo, if event was dropped, drop_count is
not zero, generate a dropped event record and reset drop count to zero.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_smi_events.c
include/uapi/linux/kfd_ioctl.h