Skip to content

Commit 4fdbe3a

Browse files
committed
drm/amdgpu/userq: rename eviction helpers
suspend/resume -> evict/restore Rename to avoid confusion with the system suspend and resume helpers. v2: update error messages Reviewed-by: Prike Liang <Prike.Liang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent d13e959 commit 4fdbe3a

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_eviction_fence.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ amdgpu_eviction_fence_suspend_worker(struct work_struct *work)
112112
if (!ev_fence)
113113
goto unlock;
114114

115-
amdgpu_userqueue_suspend(uq_mgr, ev_fence);
115+
amdgpu_userqueue_evict(uq_mgr, ev_fence);
116116

117117
unlock:
118118
mutex_unlock(&uq_mgr->userq_mutex);

drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
528528
#endif
529529

530530
static int
531-
amdgpu_userqueue_resume_all(struct amdgpu_userq_mgr *uq_mgr)
531+
amdgpu_userqueue_restore_all(struct amdgpu_userq_mgr *uq_mgr)
532532
{
533533
struct amdgpu_device *adev = uq_mgr->adev;
534534
struct amdgpu_usermode_queue *queue;
@@ -659,7 +659,7 @@ amdgpu_userqueue_validate_bos(struct amdgpu_userq_mgr *uq_mgr)
659659
return ret;
660660
}
661661

662-
static void amdgpu_userqueue_resume_worker(struct work_struct *work)
662+
static void amdgpu_userqueue_restore_worker(struct work_struct *work)
663663
{
664664
struct amdgpu_userq_mgr *uq_mgr = work_to_uq_mgr(work, resume_work.work);
665665
struct amdgpu_fpriv *fpriv = uq_mgr_to_fpriv(uq_mgr);
@@ -675,9 +675,9 @@ static void amdgpu_userqueue_resume_worker(struct work_struct *work)
675675
goto unlock;
676676
}
677677

678-
ret = amdgpu_userqueue_resume_all(uq_mgr);
678+
ret = amdgpu_userqueue_restore_all(uq_mgr);
679679
if (ret) {
680-
DRM_ERROR("Failed to resume all queues\n");
680+
DRM_ERROR("Failed to restore all queues\n");
681681
goto unlock;
682682
}
683683

@@ -686,7 +686,7 @@ static void amdgpu_userqueue_resume_worker(struct work_struct *work)
686686
}
687687

688688
static int
689-
amdgpu_userqueue_suspend_all(struct amdgpu_userq_mgr *uq_mgr)
689+
amdgpu_userqueue_evict_all(struct amdgpu_userq_mgr *uq_mgr)
690690
{
691691
struct amdgpu_device *adev = uq_mgr->adev;
692692
struct amdgpu_usermode_queue *queue;
@@ -728,8 +728,8 @@ amdgpu_userqueue_wait_for_signal(struct amdgpu_userq_mgr *uq_mgr)
728728
}
729729

730730
void
731-
amdgpu_userqueue_suspend(struct amdgpu_userq_mgr *uq_mgr,
732-
struct amdgpu_eviction_fence *ev_fence)
731+
amdgpu_userqueue_evict(struct amdgpu_userq_mgr *uq_mgr,
732+
struct amdgpu_eviction_fence *ev_fence)
733733
{
734734
int ret;
735735
struct amdgpu_fpriv *fpriv = uq_mgr_to_fpriv(uq_mgr);
@@ -738,11 +738,11 @@ amdgpu_userqueue_suspend(struct amdgpu_userq_mgr *uq_mgr,
738738
/* Wait for any pending userqueue fence work to finish */
739739
ret = amdgpu_userqueue_wait_for_signal(uq_mgr);
740740
if (ret) {
741-
DRM_ERROR("Not suspending userqueue, timeout waiting for work\n");
741+
DRM_ERROR("Not evicting userqueue, timeout waiting for work\n");
742742
return;
743743
}
744744

745-
ret = amdgpu_userqueue_suspend_all(uq_mgr);
745+
ret = amdgpu_userqueue_evict_all(uq_mgr);
746746
if (ret) {
747747
DRM_ERROR("Failed to evict userqueue\n");
748748
return;
@@ -770,7 +770,7 @@ int amdgpu_userq_mgr_init(struct amdgpu_userq_mgr *userq_mgr, struct amdgpu_devi
770770
list_add(&userq_mgr->list, &adev->userq_mgr_list);
771771
mutex_unlock(&adev->userq_mutex);
772772

773-
INIT_DELAYED_WORK(&userq_mgr->resume_work, amdgpu_userqueue_resume_worker);
773+
INIT_DELAYED_WORK(&userq_mgr->resume_work, amdgpu_userqueue_restore_worker);
774774
return 0;
775775
}
776776

drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ int amdgpu_userqueue_create_object(struct amdgpu_userq_mgr *uq_mgr,
108108
void amdgpu_userqueue_destroy_object(struct amdgpu_userq_mgr *uq_mgr,
109109
struct amdgpu_userq_obj *userq_obj);
110110

111-
void amdgpu_userqueue_suspend(struct amdgpu_userq_mgr *uq_mgr,
112-
struct amdgpu_eviction_fence *ev_fence);
111+
void amdgpu_userqueue_evict(struct amdgpu_userq_mgr *uq_mgr,
112+
struct amdgpu_eviction_fence *ev_fence);
113113

114114
int amdgpu_userqueue_active(struct amdgpu_userq_mgr *uq_mgr);
115115

0 commit comments

Comments
 (0)