From 2614b97090a5c773f1bf908b7acc0714805f64c0 Mon Sep 17 00:00:00 2001 From: riastradh Date: Fri, 29 Jul 2022 12:43:15 +0000 Subject: [PATCH] amdgpu: Make amdgpu_ttm_io_mem_pfn return pfn, not paddr. --- sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c index 4bda82d68f75..f8ffd9187975 100644 --- a/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c +++ b/sys/external/bsd/drm2/dist/drm/amd/amdgpu/amdgpu_ttm.c @@ -1,4 +1,4 @@ -/* $NetBSD: amdgpu_ttm.c,v 1.11 2022/07/20 01:11:54 riastradh Exp $ */ +/* $NetBSD: amdgpu_ttm.c,v 1.12 2022/07/29 12:43:15 riastradh Exp $ */ /* * Copyright 2009 Jerome Glisse. @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amdgpu_ttm.c,v 1.11 2022/07/20 01:11:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amdgpu_ttm.c,v 1.12 2022/07/29 12:43:15 riastradh Exp $"); #include #include @@ -777,7 +777,7 @@ static unsigned long amdgpu_ttm_io_mem_pfn(struct ttm_buffer_object *bo, */ const paddr_t cookie = bus_space_mmap(bo->bdev->memt, bo->mem.bus.base, (mm->start + page_offset) << PAGE_SHIFT, /*vm_prot*/0, /*flags*/0); - return pmap_phys_address(cookie); + return pmap_phys_address(cookie) >> PAGE_SHIFT; #else return (bo->mem.bus.base >> PAGE_SHIFT) + mm->start + (offset >> PAGE_SHIFT);