summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-08-04 16:58:36 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-08-17 16:51:01 -0400
commit0e89d0c16b9446a094215e71734e583c438bf83d (patch)
tree914cd8c6aa9766789e041b0b04c04dc5e285944c /drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
parentefd4ccb59a4acb8b85835d6b053362dbacee40f9 (diff)
drm/amdgpu: stop leaking the ctx id into the scheduler v2
Id's are for the IOCTL ABI only. v2: remove tgid as well Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/scheduler/gpu_scheduler.c')
-rw-r--r--drivers/gpu/drm/amd/scheduler/gpu_scheduler.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
index 4ad1825e713e..b9aa572980d2 100644
--- a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
+++ b/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c
@@ -172,7 +172,7 @@ exit:
* @entity The pointer to a valid amd_context_entity
* @parent The parent entity of this amd_context_entity
* @rq The run queue this entity belongs
- * @context_id The context id for this entity
+ * @kernel If this is an entity for the kernel
* @jobs The max number of jobs in the job queue
*
* return 0 if succeed. negative error code on failure
@@ -181,7 +181,6 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched,
struct amd_context_entity *entity,
struct amd_sched_entity *parent,
struct amd_run_queue *rq,
- uint32_t context_id,
uint32_t jobs)
{
uint64_t seq_ring = 0;
@@ -203,9 +202,6 @@ int amd_context_entity_init(struct amd_gpu_scheduler *sched,
return -EINVAL;
spin_lock_init(&entity->queue_lock);
- entity->tgid = (context_id == AMD_KERNEL_CONTEXT_ID) ?
- AMD_KERNEL_PROCESS_ID : current->tgid;
- entity->context_id = context_id;
atomic64_set(&entity->last_emitted_v_seq, seq_ring);
atomic64_set(&entity->last_queued_v_seq, seq_ring);
@@ -275,9 +271,9 @@ int amd_context_entity_fini(struct amd_gpu_scheduler *sched,
if (r) {
if (entity->is_pending)
- DRM_INFO("Entity %u is in waiting state during fini,\
+ DRM_INFO("Entity %p is in waiting state during fini,\
all pending ibs will be canceled.\n",
- entity->context_id);
+ entity);
}
mutex_lock(&rq->lock);