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>
Fri, 4 Dec 2015 16:05:57 +0000 (08:05 -0800)
commit185d2224e4767d68e44fc10c85d5de2371c0ff12
treeaf85ff181fa6fbda20273c4dd932961589f2910f
parent944ebc14562f2a51c7bb650332206f68e89eb2f6
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
(cherry picked from commit 3e0702db006c262dd8737a567b8e06f7ff005e2c)
Reviewed-on: http://git-master/r/835816
Reviewed-on: http://git-master/r/838591
GVS: Gerrit_Virtual_Submit
Tested-by: Kiran SJ <ksj@nvidia.com>
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