drm/amdgpu: Add check to prevent IH overflow