diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3953-drm-amdgpu-once-more-fix-amdgpu_bo_create_kernel_at.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3953-drm-amdgpu-once-more-fix-amdgpu_bo_create_kernel_at.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3953-drm-amdgpu-once-more-fix-amdgpu_bo_create_kernel_at.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3953-drm-amdgpu-once-more-fix-amdgpu_bo_create_kernel_at.patch new file mode 100644 index 00000000..4333c416 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3953-drm-amdgpu-once-more-fix-amdgpu_bo_create_kernel_at.patch @@ -0,0 +1,52 @@ +From f4e6fbe7b1d5582ca707b4f675f055e75c1185bf Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Christian=20K=C3=B6nig?= <christian.koenig@amd.com> +Date: Tue, 24 Sep 2019 13:29:27 +0200 +Subject: [PATCH 3953/4256] drm/amdgpu: once more fix + amdgpu_bo_create_kernel_at +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +When CPU access is needed we should tell that to +amdgpu_bo_create_reserved() or otherwise the access is denied later on. + +Signed-off-by: Christian König <christian.koenig@amd.com> +Reviewed-by: Emily Deng <Emily.Deng@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +index b08bbecb63f2..acb0755fe724 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +@@ -390,7 +390,7 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev, + size = ALIGN(size, PAGE_SIZE); + + r = amdgpu_bo_create_reserved(adev, size, PAGE_SIZE, domain, bo_ptr, +- NULL, NULL); ++ NULL, cpu_addr); + if (r) + return r; + +@@ -398,12 +398,15 @@ int amdgpu_bo_create_kernel_at(struct amdgpu_device *adev, + * Remove the original mem node and create a new one at the request + * position. + */ ++ if (cpu_addr) ++ amdgpu_bo_kunmap(*bo_ptr); ++ ++ ttm_bo_mem_put(&(*bo_ptr)->tbo, &(*bo_ptr)->tbo.mem); ++ + for (i = 0; i < (*bo_ptr)->placement.num_placement; ++i) { + (*bo_ptr)->placements[i].fpfn = offset >> PAGE_SHIFT; + (*bo_ptr)->placements[i].lpfn = (offset + size) >> PAGE_SHIFT; + } +- +- ttm_bo_mem_put(&(*bo_ptr)->tbo, &(*bo_ptr)->tbo.mem); + r = ttm_bo_mem_space(&(*bo_ptr)->tbo, &(*bo_ptr)->placement, + &(*bo_ptr)->tbo.mem, &ctx); + if (r) +-- +2.17.1 + |