diff options
author | Lauri Peltonen <lpeltonen@nvidia.com> | 2014-07-17 19:21:34 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:40 -0400 |
commit | bcf60a22c3e8671468517d34aa37548272455c1f (patch) | |
tree | c3544f6714c291e611e33a8d0e39c5cb2c795821 /drivers/gpu/nvgpu/gk20a/sync_gk20a.h | |
parent | 55295c6087ed975be12e92f9be799269aef94678 (diff) |
gpu: nvgpu: Add gk20a_fence type
When moving compression state tracking and compbit management ops to
kernel, we need to attach a fence to dma-buf metadata, along with the
compbit state.
To make in-kernel fence management easier, introduce a new gk20a_fence
abstraction. A gk20a_fence may be backed by a semaphore or a syncpoint
(id, value) pair. If the kernel is configured with CONFIG_SYNC, it will
also contain a sync_fence. The gk20a_fence can easily be converted back
to a syncpoint (id, value) parir or sync FD when we need to return it to
user space.
Change gk20a_submit_channel_gpfifo to return a gk20a_fence instead of
nvhost_fence. This is to facilitate work submission initiated from
kernel.
Bug 1509620
Change-Id: I6154764a279dba83f5e91ba9e0cb5e227ca08e1b
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: http://git-master/r/439846
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sync_gk20a.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h index 49597f06..e9c26221 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.h | |||
@@ -29,7 +29,7 @@ struct gk20a_semaphore; | |||
29 | struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...); | 29 | struct sync_timeline *gk20a_sync_timeline_create(const char *fmt, ...); |
30 | void gk20a_sync_timeline_destroy(struct sync_timeline *); | 30 | void gk20a_sync_timeline_destroy(struct sync_timeline *); |
31 | void gk20a_sync_timeline_signal(struct sync_timeline *); | 31 | void gk20a_sync_timeline_signal(struct sync_timeline *); |
32 | int gk20a_sync_fence_create(struct sync_timeline *, | 32 | struct sync_fence *gk20a_sync_fence_create(struct sync_timeline *, |
33 | struct gk20a_semaphore *, | 33 | struct gk20a_semaphore *, |
34 | struct sync_fence *dependency, | 34 | struct sync_fence *dependency, |
35 | const char *fmt, ...); | 35 | const char *fmt, ...); |