drm/amd/amdgpu: Return error if initiating read out of range on vram
authorTom St Denis <tom.stdenis@amd.com>
Tue, 23 May 2017 15:35:22 +0000 (11:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2017 22:08:02 +0000 (15:08 -0700)
commitb85007c9114a05c696c46c2aac6da68aeaed7bbc
treead31dffab26cd9460d5cf714a51c6b26e941119c
parent8302e9d2f50b4358e4419deae2b09e0ccca766c6
drm/amd/amdgpu: Return error if initiating read out of range on vram

commit 9156e723301c0a7a7def4cde820e018ce791b842 upstream.

If you initiate a read that is out of the VRAM address space return
ENXIO instead of 0.

Reads that begin below that point will read upto the VRAM limit as
before.

Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c