diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1849-drm-amdgpu-sriov-fix-page-fault-issue-of-driver-unlo.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1849-drm-amdgpu-sriov-fix-page-fault-issue-of-driver-unlo.patch | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1849-drm-amdgpu-sriov-fix-page-fault-issue-of-driver-unlo.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1849-drm-amdgpu-sriov-fix-page-fault-issue-of-driver-unlo.patch new file mode 100644 index 00000000..6e5de036 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.14.71/1849-drm-amdgpu-sriov-fix-page-fault-issue-of-driver-unlo.patch @@ -0,0 +1,66 @@ +From 65a831bbed1fe3ba99f5eba5931179415a87d792 Mon Sep 17 00:00:00 2001 +From: Monk Liu <Monk.Liu@amd.com> +Date: Fri, 15 Sep 2017 15:34:52 +0800 +Subject: [PATCH 1849/4131] drm/amdgpu/sriov:fix page fault issue of driver + unload +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +bo_free on csa is too late to put in amdgpu_fini because that +time ttm is already finished, +Move it earlier to avoid the page fault. + +Change-Id: Id9c3f6aa8720cabbc9936ce21d8cf98af6e23bee +Signed-off-by: Monk Liu <Monk.Liu@amd.com> +Signed-off-by: Horace Chen <horace.chen@amd.com> +Reviewed-by: Christian König <christian.koenig@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 +--- + drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 1 + + drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 1 + + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +index a7e84fe..51d5fe4d 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +@@ -1808,10 +1808,8 @@ static int amdgpu_fini(struct amdgpu_device *adev) + adev->ip_blocks[i].status.late_initialized = false; + } + +- if (amdgpu_sriov_vf(adev)) { +- amdgpu_bo_free_kernel(&adev->virt.csa_obj, &adev->virt.csa_vmid0_addr, NULL); ++ if (amdgpu_sriov_vf(adev)) + amdgpu_virt_release_full_gpu(adev, false); +- } + + return 0; + } +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +index 2469a4e..9476a22 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +@@ -2116,6 +2116,7 @@ static int gfx_v8_0_sw_fini(void *handle) + amdgpu_gfx_compute_mqd_sw_fini(adev); + amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring, &adev->gfx.kiq.irq); + amdgpu_gfx_kiq_fini(adev); ++ amdgpu_bo_free_kernel(&adev->virt.csa_obj, &adev->virt.csa_vmid0_addr, NULL); + + gfx_v8_0_mec_fini(adev); + gfx_v8_0_rlc_fini(adev); +diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +index 786948b..0f116b1a 100644 +--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c ++++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c +@@ -1425,6 +1425,7 @@ static int gfx_v9_0_sw_fini(void *handle) + amdgpu_gfx_compute_mqd_sw_fini(adev); + amdgpu_gfx_kiq_free_ring(&adev->gfx.kiq.ring, &adev->gfx.kiq.irq); + amdgpu_gfx_kiq_fini(adev); ++ amdgpu_bo_free_kernel(&adev->virt.csa_obj, &adev->virt.csa_vmid0_addr, NULL); + + gfx_v9_0_mec_fini(adev); + gfx_v9_0_ngg_fini(adev); +-- +2.7.4 + |