drm/amdgpu: remove scheduler fence list v2

Unused and missing proper locking.

v2: add locking comment to commit message.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
This commit is contained in:
Christian König 2015-08-10 14:16:24 +02:00 committed by Alex Deucher
parent 05caae8515
commit 5b232c2a71
3 changed files with 1 additions and 21 deletions

View File

@ -195,7 +195,6 @@ int amd_sched_entity_init(struct amd_gpu_scheduler *sched,
entity->fence_context = fence_context_alloc(1); entity->fence_context = fence_context_alloc(1);
snprintf(name, sizeof(name), "c_entity[%llu]", entity->fence_context); snprintf(name, sizeof(name), "c_entity[%llu]", entity->fence_context);
memcpy(entity->name, name, 20); memcpy(entity->name, name, 20);
INIT_LIST_HEAD(&entity->fence_list);
if(kfifo_alloc(&entity->job_queue, if(kfifo_alloc(&entity->job_queue,
jobs * sizeof(void *), jobs * sizeof(void *),
GFP_KERNEL)) GFP_KERNEL))

View File

@ -53,7 +53,6 @@ struct amd_sched_entity {
wait_queue_head_t wait_emit; wait_queue_head_t wait_emit;
bool is_pending; bool is_pending;
uint64_t fence_context; uint64_t fence_context;
struct list_head fence_list;
char name[20]; char name[20];
}; };
@ -78,7 +77,6 @@ struct amd_run_queue {
struct amd_sched_fence { struct amd_sched_fence {
struct fence base; struct fence base;
struct fence_cb cb; struct fence_cb cb;
struct list_head list;
struct amd_sched_entity *entity; struct amd_sched_entity *entity;
uint64_t v_seq; uint64_t v_seq;
spinlock_t lock; spinlock_t lock;

View File

@ -27,16 +27,7 @@
#include <drm/drmP.h> #include <drm/drmP.h>
#include "gpu_scheduler.h" #include "gpu_scheduler.h"
static void amd_sched_fence_wait_cb(struct fence *f, struct fence_cb *cb) struct amd_sched_fence *amd_sched_fence_create(struct amd_sched_entity *s_entity)
{
struct amd_sched_fence *fence =
container_of(cb, struct amd_sched_fence, cb);
list_del_init(&fence->list);
fence_put(&fence->base);
}
struct amd_sched_fence *amd_sched_fence_create(
struct amd_sched_entity *s_entity)
{ {
struct amd_sched_fence *fence = NULL; struct amd_sched_fence *fence = NULL;
fence = kzalloc(sizeof(struct amd_sched_fence), GFP_KERNEL); fence = kzalloc(sizeof(struct amd_sched_fence), GFP_KERNEL);
@ -49,14 +40,6 @@ struct amd_sched_fence *amd_sched_fence_create(
&fence->lock, &fence->lock,
s_entity->fence_context, s_entity->fence_context,
fence->v_seq); fence->v_seq);
fence_get(&fence->base);
list_add_tail(&fence->list, &s_entity->fence_list);
if (fence_add_callback(&fence->base,&fence->cb,
amd_sched_fence_wait_cb)) {
fence_put(&fence->base);
kfree(fence);
return NULL;
}
return fence; return fence;
} }