diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2017-11-24 11:36:03 +0100 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2018-01-02 17:31:31 +0100 |
commit | e0329e6cfa6274ceb54d175b5e6ac19c00024c33 (patch) | |
tree | 61f286acee5eb8fb92c6b48f31159c3d1e994d03 /drivers/gpu/drm/etnaviv/etnaviv_gem.h | |
parent | 08301d73f27d59e2ac45411ed7bb2235d68190db (diff) | |
download | talos-obmc-linux-e0329e6cfa6274ceb54d175b5e6ac19c00024c33.tar.gz talos-obmc-linux-e0329e6cfa6274ceb54d175b5e6ac19c00024c33.zip |
drm/etnaviv: refcount the submit object
The submit object lifetime will get extended to the actual GPU
execution. As multiple users will depend on this, add a kref to
properly control destruction of the object.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gem.h')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gem.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gem.h b/drivers/gpu/drm/etnaviv/etnaviv_gem.h index 6b78d059ed2d..4238f8d8541d 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gem.h +++ b/drivers/gpu/drm/etnaviv/etnaviv_gem.h @@ -101,6 +101,7 @@ struct etnaviv_gem_submit_bo { * lasts for the duration of the submit-ioctl. */ struct etnaviv_gem_submit { + struct kref refcount; struct etnaviv_gpu *gpu; struct dma_fence *out_fence, *in_fence; u32 flags; @@ -109,6 +110,8 @@ struct etnaviv_gem_submit { /* No new members here, the previous one is variable-length! */ }; +void etnaviv_submit_put(struct etnaviv_gem_submit * submit); + int etnaviv_gem_wait_bo(struct etnaviv_gpu *gpu, struct drm_gem_object *obj, struct timespec *timeout); int etnaviv_gem_new_private(struct drm_device *dev, size_t size, u32 flags, |