Commit 72ac64b8 authored by Lucas Stach's avatar Lucas Stach

drm/etnaviv: move job context pointer to etnaviv_gem_submit

The context isn't really related to the cmdbuf, but is a property of
the job. This has been missed when moving to a properly refcounted
etnaviv_gem_submit.
Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
Reviewed-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
parent f5fd9fd4
...@@ -15,8 +15,6 @@ struct etnaviv_perfmon_request; ...@@ -15,8 +15,6 @@ struct etnaviv_perfmon_request;
struct etnaviv_cmdbuf { struct etnaviv_cmdbuf {
/* suballocator this cmdbuf is allocated from */ /* suballocator this cmdbuf is allocated from */
struct etnaviv_cmdbuf_suballoc *suballoc; struct etnaviv_cmdbuf_suballoc *suballoc;
/* user context key, must be unique between all active users */
struct etnaviv_file_private *ctx;
/* cmdbuf properties */ /* cmdbuf properties */
int suballoc_offset; int suballoc_offset;
void *vaddr; void *vaddr;
......
...@@ -95,6 +95,7 @@ struct etnaviv_gem_submit_bo { ...@@ -95,6 +95,7 @@ struct etnaviv_gem_submit_bo {
struct etnaviv_gem_submit { struct etnaviv_gem_submit {
struct drm_sched_job sched_job; struct drm_sched_job sched_job;
struct kref refcount; struct kref refcount;
struct etnaviv_file_private *ctx;
struct etnaviv_gpu *gpu; struct etnaviv_gpu *gpu;
struct dma_fence *out_fence, *in_fence; struct dma_fence *out_fence, *in_fence;
int out_fence_id; int out_fence_id;
......
...@@ -506,7 +506,7 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data, ...@@ -506,7 +506,7 @@ int etnaviv_ioctl_gem_submit(struct drm_device *dev, void *data,
if (ret) if (ret)
goto err_submit_objects; goto err_submit_objects;
submit->cmdbuf.ctx = file->driver_priv; submit->ctx = file->driver_priv;
submit->exec_state = args->exec_state; submit->exec_state = args->exec_state;
submit->flags = args->flags; submit->flags = args->flags;
......
...@@ -150,7 +150,7 @@ int etnaviv_sched_push_job(struct drm_sched_entity *sched_entity, ...@@ -150,7 +150,7 @@ int etnaviv_sched_push_job(struct drm_sched_entity *sched_entity,
mutex_lock(&submit->gpu->fence_lock); mutex_lock(&submit->gpu->fence_lock);
ret = drm_sched_job_init(&submit->sched_job, sched_entity, ret = drm_sched_job_init(&submit->sched_job, sched_entity,
submit->cmdbuf.ctx); submit->ctx);
if (ret) if (ret)
goto out_unlock; goto out_unlock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment