Skip to content

Commit ca7c450

Browse files
ChristianKoenigAMDalexdeucher
authored andcommitted
drm/amdgpu: remove invalid resource->start check v2
The majority of those where removed in the commit aed01a6 ("drm/amdgpu: Remove TTM resource->start visible VRAM condition v2") But this one was missed because it's working on the resource and not the BO. Since we also no longer use a fake start address for visible BOs this will now trigger invalid mapping errors. v2: also remove the unused variable Signed-off-by: Christian König <[email protected]> Fixes: aed01a6 ("drm/amdgpu: Remove TTM resource->start visible VRAM condition v2") CC: [email protected] Acked-by: Pierre-Eric Pelloux-Prayer <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0bbac3f commit ca7c450

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_device *bdev,
557557
struct ttm_resource *mem)
558558
{
559559
struct amdgpu_device *adev = amdgpu_ttm_adev(bdev);
560-
size_t bus_size = (size_t)mem->size;
561560

562561
switch (mem->mem_type) {
563562
case TTM_PL_SYSTEM:
@@ -568,9 +567,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_device *bdev,
568567
break;
569568
case TTM_PL_VRAM:
570569
mem->bus.offset = mem->start << PAGE_SHIFT;
571-
/* check if it's visible */
572-
if ((mem->bus.offset + bus_size) > adev->gmc.visible_vram_size)
573-
return -EINVAL;
574570

575571
if (adev->mman.aper_base_kaddr &&
576572
mem->placement & TTM_PL_FLAG_CONTIGUOUS)

0 commit comments

Comments
 (0)