drm/msm: Add a context pointer to the submitqueue
Each submitqueue is attached to a context. Add a pointer to the context to the submitqueue at create time and refcount it so that it stays around through the life of the queue. Co-developed-by: Rob Clark <robdclark@chromium.org> Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
@@ -12,6 +12,8 @@ void msm_submitqueue_destroy(struct kref *kref)
|
||||
struct msm_gpu_submitqueue *queue = container_of(kref,
|
||||
struct msm_gpu_submitqueue, ref);
|
||||
|
||||
msm_file_private_put(queue->ctx);
|
||||
|
||||
kfree(queue);
|
||||
}
|
||||
|
||||
@@ -83,6 +85,7 @@ int msm_submitqueue_create(struct drm_device *drm, struct msm_file_private *ctx,
|
||||
|
||||
write_lock(&ctx->queuelock);
|
||||
|
||||
queue->ctx = msm_file_private_get(ctx);
|
||||
queue->id = ctx->queueid++;
|
||||
|
||||
if (id)
|
||||
|
Reference in New Issue
Block a user