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>
Wed, 4 Nov 2015 05:22:39 +0000 (21:22 -0800)
commit8c8978fa303ec4e6db0233becdbdcbad4a248173
tree7a605b6f1e52828b345b24c638d223ade99e304b
parent5ae95330e67116512d539c1854539b4af22b863b
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
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c
include/uapi/linux/nvgpu.h