diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2018-05-18 04:35:29 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-06-20 15:25:45 -0400 |
commit | 819f32bdf119ebf4d758a901c9a22c2c4a7d167a (patch) | |
tree | 0dd9760b4788cb3e287750c62a43e89366eb38b5 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 0ca69a482d15ccf22bacccc4964606969df144f6 (diff) |
gpu: nvgpu: abstract away ioctl gpfifo read
The biggest remaining Linuxism in the submit path is the
copy_from_user() calls for reading the gpfifo entries to the HW-visible
buffer. Abstract away the copy of one such segment starting at some
offset and keep the wraparound logic and vidmem proxy in the core submit
path.
Jira NVGPU-705
Change-Id: I0c6438045c695e5e3f5da4fbc0c92d2c6e7f32cb
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1730480
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 3b8c5cd2..9061236e 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -148,6 +148,14 @@ enum gk20a_cbc_op { | |||
148 | enum nvgpu_unit; | 148 | enum nvgpu_unit; |
149 | 149 | ||
150 | enum nvgpu_flush_op; | 150 | enum nvgpu_flush_op; |
151 | |||
152 | struct _resmgr_context; | ||
153 | |||
154 | struct nvgpu_gpfifo_userdata { | ||
155 | struct nvgpu_gpfifo_entry __user *entries; | ||
156 | struct _resmgr_context *context; | ||
157 | }; | ||
158 | |||
151 | /* | 159 | /* |
152 | * gpu_ops should only contain function pointers! Non-function pointer members | 160 | * gpu_ops should only contain function pointers! Non-function pointer members |
153 | * should go in struct gk20a or be implemented with the boolean flag API defined | 161 | * should go in struct gk20a or be implemented with the boolean flag API defined |
@@ -1488,6 +1496,9 @@ struct gk20a { | |||
1488 | struct channel_gk20a *ch, const char *fmt, ...); | 1496 | struct channel_gk20a *ch, const char *fmt, ...); |
1489 | void (*signal_os_fence_framework)(struct channel_gk20a *ch); | 1497 | void (*signal_os_fence_framework)(struct channel_gk20a *ch); |
1490 | void (*destroy_os_fence_framework)(struct channel_gk20a *ch); | 1498 | void (*destroy_os_fence_framework)(struct channel_gk20a *ch); |
1499 | int (*copy_user_gpfifo)(struct nvgpu_gpfifo_entry *dest, | ||
1500 | struct nvgpu_gpfifo_userdata userdata, | ||
1501 | u32 start, u32 length); | ||
1491 | } os_channel; | 1502 | } os_channel; |
1492 | 1503 | ||
1493 | struct gk20a_scale_profile *scale_profile; | 1504 | struct gk20a_scale_profile *scale_profile; |