amdkfd: Memory availability can never be negative
authorDaniel Phillips <daniel.phillips@amd.com>
Wed, 1 Mar 2023 22:28:26 +0000 (14:28 -0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 7 Mar 2023 19:21:56 +0000 (14:21 -0500)
commit7cb3cfc030640bf860bf8299aa00cdffff92a40c
tree7ce5f03960647b0e41fa70c2dfc569e8e7efc7ce
parent2c5e0790a1f9a77892599242bb8bf90027e8ccae
amdkfd: Memory availability can never be negative

Our assumptions about how much KFD memory is currently available for
allocation may be violated by various complexities so we define the
reported value as advisory, however we should never report negative
availability.

Signed-off-by: Daniel Phillips <daniel.phillips@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c