Skip to contentSkip to conversation

drm/amdgpu: fix amdgpu_job_free_cb

PATCH In review Christian König 2 participants 3 messages Oct 24, 2017 – Oct 25, 2017 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: fix amdgpu_job_free_cb

From: Christian König <[email protected]>

When the scheduler drops a job we need to free the IBs as well.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -5
index a58e3c5dd84b..2790f61842a1 100644
@@ -105,11 +105,7 @@ static void amdgpu_job_free_cb(struct amd_sched_job *s_job)
 	struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base);
 
 	amdgpu_ring_priority_put(job->ring, s_job->s_priority);
-	dma_fence_put(job->fence);
-	amdgpu_sync_free(&job->sync);
-	amdgpu_sync_free(&job->dep_sync);
-	amdgpu_sync_free(&job->sched_sync);
-	kfree(job);
+	amdgpu_job_free(job);
 }
 
 void amdgpu_job_free(struct amdgpu_job *job)
Signature · 6 lines
2.11.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171024124452.1421-1-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org

#2 lore raw

Please forget that one.

Double checking the code again I've found that this change is nonsense.

Christian.

Am 24.10.2017 um 14:44 schrieb Christian König:

Quoted 17 lines

From: Christian König <[email protected]>

When the scheduler drops a job we need to free the IBs as well.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -0
index a58e3c5dd84b..2790f61842a1 100644
@@ -105,11 +105,7 @@ static void amdgpu_job_free_cb(struct amd_sched_job *s_job)
  	struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base);
 

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static void amdgpu_job_free_cb(struct amd_sched_job *s_job) · line 111

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -5
  	amdgpu_ring_priority_put(job->ring, s_job->s_priority);
-	dma_fence_put(job->fence);
-	amdgpu_sync_free(&job->sync);
-	amdgpu_sync_free(&job->dep_sync);
-	amdgpu_sync_free(&job->sched_sync);
-	kfree(job);
+	amdgpu_job_free(job);
  }
 
  void amdgpu_job_free(struct amdgpu_job *job)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): da6f175a-533d-9052-0ec3-1165fb3c3f89-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org

#4 lore raw

Yeah, we already manually called job_free_resources() after job pushed

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Christian K?nig
Sent: 2017年10月24日 20:48
To: [email protected]
Subject: Re: [PATCH] drm/amdgpu: fix amdgpu_job_free_cb

Please forget that one.

Double checking the code again I've found that this change is nonsense.

Christian.

Am 24.10.2017 um 14:44 schrieb Christian König:

Quoted 17 lines

From: Christian König <[email protected]>

When the scheduler drops a job we need to free the IBs as well.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +0 -0
index a58e3c5dd84b..2790f61842a1 100644
@@ -105,11 +105,7 @@ static void amdgpu_job_free_cb(struct amd_sched_job *s_job)
  	struct amdgpu_job *job = container_of(s_job, struct amdgpu_job, base);
 

drivers/gpu/drm/amd/amdgpu/amdgpu_job.c static void amdgpu_job_free_cb(struct amd_sched_job *s_job) · line 111

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +1 -5
  	amdgpu_ring_priority_put(job->ring, s_job->s_priority);
-	dma_fence_put(job->fence);
-	amdgpu_sync_free(&job->sync);
-	amdgpu_sync_free(&job->dep_sync);
-	amdgpu_sync_free(&job->sched_sync);
-	kfree(job);
+	amdgpu_job_free(job);
  }
 
  void amdgpu_job_free(struct amdgpu_job *job)

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx