diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-06-09 02:56:46 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-06-09 02:56:46 +0000 |
commit | 7ea20d25a2aefb3fa01654c5d881555fb3d9316c (patch) | |
tree | a359c36cd3ad91fedb4cd69e7c12db9c54b7f96a /sys | |
parent | 70f9e07aa053762c2759548d660a621578d5ff2b (diff) |
don't fatally error on failing to map visible VRAM
Mapping VRAM here is an optimisation only attempted on 64 bit archs,
there is a fallback path if it fails.
Reported and fix tested by Jerome Kasper on RX 5500 XT (Navi 14) who
mentioned the mapping error did not occur with 6.9-stable.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c index de0afe174d1..eee741c0e18 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c @@ -1870,11 +1870,11 @@ int amdgpu_ttm_init(struct amdgpu_device *adev) adev->gmc.visible_vram_size, BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, &adev->mman.aper_bsh)) { - DRM_ERROR("Failed to remap VRAM\n"); - return -ENOMEM; + adev->mman.aper_base_kaddr = NULL; + } else { + adev->mman.aper_base_kaddr = bus_space_vaddr(adev->memt, + adev->mman.aper_bsh); } - adev->mman.aper_base_kaddr = bus_space_vaddr(adev->memt, - adev->mman.aper_bsh); #endif #endif |