gpu: nvgpu: remove temporary gpfifo allocation in submit path
authorDeepak Nibade <dnibade@nvidia.com>
Mon, 26 Oct 2015 13:17:55 +0000 (18:17 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sat, 31 Oct 2015 04:57:13 +0000 (21:57 -0700)
commit3e0702db006c262dd8737a567b8e06f7ff005e2c
tree5427dfa7665c29bb92d99d92c9fba99f1326e744
parent8d0ddee571ba5057816bd422053ae5a7ab142a53
gpu: nvgpu: remove temporary gpfifo allocation in submit path

In GPU job submit path gk20a_ioctl_channel_submit_gpfifo(),
we currently allocate a temporary gpfifo, copy user space
gpfifo content into this temporary buffer, and then copy
temp buffer content into channel's gpfifo.

Allocation/copy/free of temporary buffer adds additional
overhead

Rewrite this sequence such that gk20a_submit_channel_gpfifo()
can receive either a pre-filled gpfifo or pointer to
user provided args.
And then we can direclty copy the user provided gpfifo
into the channel's gpfifo

Also, if command buffer tracing is enabled, we still need
to copy user provided gpfifo into temporaty buffer for reading
But that should not cause overhead in real world use case

Bug 200141116

Change-Id: I7166c9271da2694059da9853ab8839e98457b941
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/823386
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/gpu/nvgpu/gk20a/cde_gk20a.c
drivers/gpu/nvgpu/gk20a/channel_gk20a.c
drivers/gpu/nvgpu/gk20a/channel_gk20a.h