From: jsg Date: Mon, 29 Apr 2024 06:40:11 +0000 (+0000) Subject: drm/amdgpu: remove invalid resource->start check v2 X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=a4189769c268b6b8e7e61c73c8d5a1558cd2eadb;p=openbsd drm/amdgpu: remove invalid resource->start check v2 From Christian Koenig db74904a93a370807001e5fd64b5850a61f2bf65 in linux-6.6.y/6.6.29 ca7c4507ba87e9fc22e0ecfa819c3664b3e8287b in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c index 9927850573e..7e2d2a888be 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c @@ -562,7 +562,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_device *bdev, struct ttm_resource *mem) { struct amdgpu_device *adev = amdgpu_ttm_adev(bdev); - size_t bus_size = (size_t)mem->size; switch (mem->mem_type) { case TTM_PL_SYSTEM: @@ -573,9 +572,6 @@ static int amdgpu_ttm_io_mem_reserve(struct ttm_device *bdev, break; case TTM_PL_VRAM: mem->bus.offset = mem->start << PAGE_SHIFT; - /* check if it's visible */ - if ((mem->bus.offset + bus_size) > adev->gmc.visible_vram_size) - return -EINVAL; if (adev->mman.aper_base_kaddr && mem->placement & TTM_PL_FLAG_CONTIGUOUS)