artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
daa6cf7
)
drm/amdgpu: remove invalid resource->start check v2
author
jsg
<jsg@openbsd.org>
Mon, 29 Apr 2024 06:40:11 +0000
(06:40 +0000)
committer
jsg
<jsg@openbsd.org>
Mon, 29 Apr 2024 06:40:11 +0000
(06:40 +0000)
From Christian Koenig
db74904a93a370807001e5fd64b5850a61f2bf65
in linux-6.6.y/6.6.29
ca7c4507ba87e9fc22e0ecfa819c3664b3e8287b
in mainline linux
sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
patch
|
blob
|
history
diff --git
a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
index
9927850
..
7e2d2a8
100644
(file)
--- 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)