gpu: host1x: Cleanup and refcounting for syncpoints
Add reference counting for allocated syncpoints to allow keeping them allocated while jobs are referencing them. Additionally, clean up various places using syncpoint IDs to use host1x_syncpt pointers instead. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
committed by
Thierry Reding
parent
f63b42cbc8
commit
2aed4f5ab0
@@ -79,6 +79,9 @@ static void job_free(struct kref *ref)
|
||||
{
|
||||
struct host1x_job *job = container_of(ref, struct host1x_job, ref);
|
||||
|
||||
if (job->syncpt)
|
||||
host1x_syncpt_put(job->syncpt);
|
||||
|
||||
kfree(job);
|
||||
}
|
||||
|
||||
@@ -674,7 +677,7 @@ EXPORT_SYMBOL(host1x_job_unpin);
|
||||
*/
|
||||
void host1x_job_dump(struct device *dev, struct host1x_job *job)
|
||||
{
|
||||
dev_dbg(dev, " SYNCPT_ID %d\n", job->syncpt_id);
|
||||
dev_dbg(dev, " SYNCPT_ID %d\n", job->syncpt->id);
|
||||
dev_dbg(dev, " SYNCPT_VAL %d\n", job->syncpt_end);
|
||||
dev_dbg(dev, " FIRST_GET 0x%x\n", job->first_get);
|
||||
dev_dbg(dev, " TIMEOUT %d\n", job->timeout);
|
||||
|
||||
Reference in New Issue
Block a user