[PATCH 1/3] drm/amdgpu: rename explicit to need_pipe_sync for better understanding

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



and differentiate it with explicit_bo flag

Signed-off-by: Monk Liu <Monk.Liu@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c  | 6 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 +++++--
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index e0af44f..1d71f8c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -179,11 +179,11 @@ static struct dma_fence *amdgpu_job_dependency(struct drm_sched_job *sched_job,
 	struct amdgpu_job *job = to_amdgpu_job(sched_job);
 	struct amdgpu_vm *vm = job->vm;
 	struct dma_fence *fence;
-	bool explicit = false;
+	bool need_pipe_sync = false;
 	int r;
 
-	fence = amdgpu_sync_get_fence(&job->sync, &explicit);
-	if (fence && explicit) {
+	fence = amdgpu_sync_get_fence(&job->sync, &need_pipe_sync);
+	if (fence && need_pipe_sync) {
 		if (drm_sched_dependency_optimized(fence, s_entity)) {
 			r = amdgpu_sync_fence(ring->adev, &job->sched_sync,
 					      fence, false);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
index 2d6f5ec..a7e1ea8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
@@ -36,7 +36,7 @@
 struct amdgpu_sync_entry {
 	struct hlist_node	node;
 	struct dma_fence	*fence;
-	bool	explicit;
+	bool   explicit;
 };
 
 static struct kmem_cache *amdgpu_sync_slab;
@@ -126,6 +126,7 @@ static void amdgpu_sync_keep_later(struct dma_fence **keep,
  *
  * @sync: sync object to add the fence to
  * @f: fence to add
+ * @explicit: this fence is an explicit dependency
  *
  * Tries to add the fence to an existing hash entry. Returns true when an entry
  * was found, false otherwise.
@@ -153,6 +154,8 @@ static bool amdgpu_sync_add_later(struct amdgpu_sync *sync, struct dma_fence *f,
  *
  * @sync: sync object to add fence to
  * @fence: fence to sync to
+ * @explicit: True to indicate the given @f need a pipeline sync upon the case
+ *            that the job of @sync runs on the same ring with it
  *
  */
 int amdgpu_sync_fence(struct amdgpu_device *adev, struct amdgpu_sync *sync,
@@ -295,7 +298,7 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
  * amdgpu_sync_get_fence - get the next fence from the sync object
  *
  * @sync: sync object to use
- * @explicit: true if the next fence is explicit
+ * @explicit: true if the next fence is explicitly defined., e.g. dependency, syncobj, etc...
  *
  * Get and removes the next fence from the sync object not signaled yet.
  */
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux