aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_submitqueue.c
diff options
context:
space:
mode:
authorJordan Crouse <[email protected]>2020-08-17 22:01:36 +0000
committerRob Clark <[email protected]>2020-09-12 17:45:56 +0000
commitcf655d615931b905bbb40f7b5387eb0efd1742e0 (patch)
tree4b0744ae7796b68f0adc5f3ed6d80313adadc0c6 /drivers/gpu/drm/msm/msm_submitqueue.c
parentdrm/msm: Set adreno_smmu as gpu's drvdata (diff)
downloadkernel-cf655d615931b905bbb40f7b5387eb0efd1742e0.tar.gz
kernel-cf655d615931b905bbb40f7b5387eb0efd1742e0.zip
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 <[email protected]> Signed-off-by: Jordan Crouse <[email protected]> Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Bjorn Andersson <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_submitqueue.c')
-rw-r--r--drivers/gpu/drm/msm/msm_submitqueue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_submitqueue.c b/drivers/gpu/drm/msm/msm_submitqueue.c
index 90c9d84e6155..c3d206105d28 100644
--- a/drivers/gpu/drm/msm/msm_submitqueue.c
+++ b/drivers/gpu/drm/msm/msm_submitqueue.c
@@ -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)