gpu: nvgpu: support skipping buffer refcounting in submit
authorDeepak Nibade <dnibade@nvidia.com>
Thu, 29 Oct 2015 09:50:50 +0000 (14:50 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Mon, 23 Nov 2015 21:13:19 +0000 (13:13 -0800)
commit0a4ebde02c5471cd1aff8fa496cc62d3df965202
treed8aefe34648c97723a09fd318ea54c9c4c07189c
parent2a270f0e8d4d0f9d5463f7309145d411bf6aff8d
gpu: nvgpu: support skipping buffer refcounting in submit

In job submission path, we always take refcount on all
the mapped buffers to safeguard against case where user
space releases the buffer early

But in case user space itself is doing proper buffer
management, kernel need not take refcounts on all the
buffers - which is also a overhead in submit path

Hence, provide a new submit flag
NVGPU_SUBMIT_GPFIFO_FLAGS_SKIP_BUFFER_REFCOUNTING to
optionally skip taking refcounts on all the buffers

Also, if we do not take refcounts, then no need to drop
any refcounts in gk20a_channel_update() as well

Bug 1698667
Bug 200141116

Change-Id: I81bb7a03240300b691c70bcec04ea1badd5934f4
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/824718
(cherry picked from commit 8c8978fa303ec4e6db0233becdbdcbad4a248173)
Reviewed-on: http://git-master/r/833327
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c
include/uapi/linux/nvgpu.h