mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 02:52:51 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
0ca69a482d
commit
819f32bdf1
@@ -776,6 +776,7 @@ static int gk20a_ioctl_channel_submit_gpfifo(
|
||||
u32 submit_flags = 0;
|
||||
int fd = -1;
|
||||
struct gk20a *g = ch->g;
|
||||
struct nvgpu_gpfifo_userdata userdata;
|
||||
|
||||
int ret = 0;
|
||||
nvgpu_log_fn(g, " ");
|
||||
@@ -798,7 +799,12 @@ static int gk20a_ioctl_channel_submit_gpfifo(
|
||||
return fd;
|
||||
}
|
||||
|
||||
ret = gk20a_submit_channel_gpfifo_user(ch, args, args->num_entries,
|
||||
userdata.entries = (struct nvgpu_gpfifo_entry __user*)
|
||||
(uintptr_t)args->gpfifo;
|
||||
userdata.context = NULL;
|
||||
|
||||
ret = gk20a_submit_channel_gpfifo_user(ch,
|
||||
userdata, args->num_entries,
|
||||
submit_flags, &fence, &fence_out, profile);
|
||||
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user