summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2021-06-10 14:04:44 +0300
committerThierry Reding <treding@nvidia.com>2021-08-10 14:41:02 +0200
commit17a298e9ac7c011e64a9c0b6f807b43f9af22eac (patch)
tree6102c1eca9012643d6613db2ff08cdf26a142560 /drivers/gpu/host1x
parentc78f837ae3d1e532ff4eb90155b42d7a2e892a3f (diff)
gpu: host1x: Add job release callback
Add a callback field to the job structure, to be called just before the job is to be freed. This allows the job's submitter to clean up any of its own state, like decrement runtime PM refcounts. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x')
-rw-r--r--drivers/gpu/host1x/job.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/job.c b/drivers/gpu/host1x/job.c
index 8f59b34672c2..09097e19c0d0 100644
--- a/drivers/gpu/host1x/job.c
+++ b/drivers/gpu/host1x/job.c
@@ -79,6 +79,9 @@ static void job_free(struct kref *ref)
{
struct host1x_job *job = container_of(ref, struct host1x_job, ref);
+ if (job->release)
+ job->release(job);
+
if (job->waiter)
host1x_intr_put_ref(job->syncpt->host, job->syncpt->id,
job->waiter, false);