From 0e8b2a980e1fcc6cd660197b92f63adb5b2c5b3e Mon Sep 17 00:00:00 2001 From: Yong Zhao Date: Wed, 26 Apr 2017 15:39:38 -0400 Subject: [PATCH 1667/4131] drm/amdkfd: Rename a variable to avoid confusion Eviction_fence is both used in struct amdkfd_process_info and struct kfd_eviction_work, which causes unnecessary confusion. Rename the one in struct kfd_eviction_work to quiesce_fence. Change-Id: I3900cd04778ad2e1628007e7adede272a5d7eee9 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 +++++----- drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c index acb9c2e..b84dddb 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c @@ -920,16 +920,16 @@ int kgd2kfd_schedule_evict_and_restore_process(struct mm_struct *mm, * process to be evicted. Check if the fence is same which * indicates that previous work item scheduled is not completed */ - if (p->eviction_work.eviction_fence == fence) + if (p->eviction_work.quiesce_fence == fence) goto out; else { WARN(1, "Starting new evict with previous evict is not completed\n"); if (cancel_delayed_work_sync(&p->eviction_work.dwork)) - fence_put(p->eviction_work.eviction_fence); + fence_put(p->eviction_work.quiesce_fence); } } - p->eviction_work.eviction_fence = fence_get(fence); + p->eviction_work.quiesce_fence = fence_get(fence); /* Avoid KFD process starvation. Wait for at least * PROCESS_ACTIVE_TIME_MS before evicting the process again @@ -976,13 +976,13 @@ void kfd_evict_bo_worker(struct work_struct *work) pr_info("Started evicting process of pasid %d\n", p->pasid); ret = quiesce_process_mm(p); if (!ret) { - fence_signal(eviction_work->eviction_fence); + fence_signal(eviction_work->quiesce_fence); schedule_delayed_work(&p->restore_work, PROCESS_RESTORE_TIME_MS); } else pr_err("Failed to quiesce user queues. Cannot evict BOs\n"); - fence_put(eviction_work->eviction_fence); + fence_put(eviction_work->quiesce_fence); pr_info("Finished evicting process of pasid %d\n", p->pasid); diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h index 626ffbd..66d1c1b 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h @@ -577,7 +577,7 @@ struct qcm_process_device { /* KFD Memory Eviction */ struct kfd_eviction_work { struct delayed_work dwork; - struct fence *eviction_fence; + struct fence *quiesce_fence; }; /* Approx. wait time before attempting to restore evicted BOs */ -- 2.7.4