gpu: nvgpu: implement poll() for semaphores
authorKonsta Holtta <kholtta@nvidia.com>
Wed, 10 Sep 2014 14:23:31 +0000 (17:23 +0300)
committerTerje Bergstrom <tbergstrom@nvidia.com>
Fri, 19 Sep 2014 07:17:16 +0000 (00:17 -0700)
commite253a435f04b44cc0a3bb7096add884c04cac3e9
tree9e6b850a8e669f31fbf6a42caec375370b886234
parent1ca84ad199ffeb34c7df5fa8c4589e34567c8e83
gpu: nvgpu: implement poll() for semaphores

Add poll interface and control ioctls for waiting for GPU job completion
via semaphores.

Poll on a gk20a channel file waits for events from pending semaphore
interrupts (stalling) of that channel. New ioctls enable and disable the
events, and clear a single interrupt event so that next poll doesn't
wake up for it again.

Bug 1528781

Change-Id: I5c6238966b5d0900c8ab263c6a7f8f2611901f33
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/497750
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
drivers/gpu/nvgpu/gk20a/channel_gk20a.c
drivers/gpu/nvgpu/gk20a/channel_gk20a.h
drivers/gpu/nvgpu/gk20a/gk20a.c
drivers/gpu/nvgpu/gk20a/gr_gk20a.c
include/linux/nvhost_ioctl.h