On Wed, May 8, 2024 at 9:25 AM Michel Dänzer <michel@xxxxxxxxxxx> wrote: > > From: Michel Dänzer <mdaenzer@xxxxxxxxxx> > > It incorrectly claimed a resource isn't CPU visible if it's located at > the very end of CPU visible VRAM. > > Fixes: a6ff969fe9 ("drm/amdgpu: fix visible VRAM handling during faults") > Reported-and-Tested-by: Jeremy Day <jsday@xxxxxxxxxxx> > Signed-off-by: Michel Dänzer <mdaenzer@xxxxxxxxxx> Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> and applied. Thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > index 109fe557a02b..29c197c00018 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > @@ -427,7 +427,7 @@ bool amdgpu_res_cpu_visible(struct amdgpu_device *adev, > > amdgpu_res_first(res, 0, res->size, &cursor); > while (cursor.remaining) { > - if ((cursor.start + cursor.size) >= adev->gmc.visible_vram_size) > + if ((cursor.start + cursor.size) > adev->gmc.visible_vram_size) > return false; > amdgpu_res_next(&cursor, cursor.size); > } > -- > 2.43.0 >