diff options
Diffstat (limited to 'meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1518-drm-amdgpu-Signal-eviction-fence.patch')
-rw-r--r-- | meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1518-drm-amdgpu-Signal-eviction-fence.patch | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1518-drm-amdgpu-Signal-eviction-fence.patch b/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1518-drm-amdgpu-Signal-eviction-fence.patch new file mode 100644 index 00000000..6bce6ae5 --- /dev/null +++ b/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1518-drm-amdgpu-Signal-eviction-fence.patch @@ -0,0 +1,46 @@ +From 51bcb055e0c9c68b27383ecf95e8e282f23bc222 Mon Sep 17 00:00:00 2001 +From: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> +Date: Fri, 2 Sep 2016 16:03:44 -0400 +Subject: [PATCH 1518/4131] drm/amdgpu: Signal eviction fence + +When amdgpu_amdkfd_fence.enable_signaling() is called, it means that GPU +scheduler has a job ready to evict a KFD BO. Notify KFD driver to +prepare for eviction. + +Change-Id: I0a00a5df5e79f39e42d790842efacb67cc3e918b +Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> +--- + drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c +index 6fdd24c..7026781 100644 +--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c ++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c +@@ -117,13 +117,19 @@ static const char *amd_kfd_fence_get_timeline_name(struct fence *f) + */ + static bool amd_kfd_fence_enable_signaling(struct fence *f) + { ++ struct amdgpu_amdkfd_fence *fence = to_amdgpu_amdkfd_fence(f); ++ ++ if (!fence) ++ return false; ++ + if (fence_is_signaled(f)) + return true; + +- /* TODO: If the fence is not signaled, call into KFD to schedule +- * work item that will prepare for KFD BO evictions +- */ +- return true; ++ if (!kgd2kfd->schedule_evict_and_restore_process( ++ (struct mm_struct *)fence->mm, f)) ++ return true; ++ ++ return false; + } + + static int amd_kfd_fence_signal(struct fence *f) +-- +2.7.4 + |