summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-03-13 23:23:03 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-25 05:06:55 -0400
commite0f2afe5eb43fb32490ccabd504879c3e3e54623 (patch)
treed227311914fd44e88e1ab13b652870c0fa772cf1 /drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
parentb48186488d0108dee7b3fb755b2d99f4652780df (diff)
gpu: nvgpu: refactor teardown to support unbind
This change refactors the teardown in remove to ensure that it is possible to unload the driver while leaving fds open. This is achieved by making sure that the SW state is kept alive till all fds are closed and by checking that subsequent calls to ioctls after the teardown fail. Normally, this would be achieved ny calls into gk20a_busy(), but in kickoff we dont call into that to reduce latency, so we need to check the driver status directly, and also in some of the functions as we need to make sure the ioctl does not dereference the device or platform struct bug 200277762 JIRA: EVLR-1023 Change-Id: I163e47a08c29d4d5b3ab79f0eb531ef234f40bde Signed-off-by: David Nieto <dmartineznie@nvidia.com> Reviewed-on: http://git-master/r/1320219 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> Reviewed-by: Shreshtha Sahu <ssahu@nvidia.com> Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
index 5cdd233e..7ecf130f 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.h
@@ -144,9 +144,12 @@ int gk20a_ce_execute_ops(struct device *dev,
144 struct gk20a_fence *gk20a_fence_in, 144 struct gk20a_fence *gk20a_fence_in,
145 u32 submit_flags, 145 u32 submit_flags,
146 struct gk20a_fence **gk20a_fence_out); 146 struct gk20a_fence **gk20a_fence_out);
147void gk20a_ce_delete_context_priv(struct gk20a *g,
148 u32 ce_ctx_id);
147void gk20a_ce_delete_context(struct device *dev, 149void gk20a_ce_delete_context(struct device *dev,
148 u32 ce_ctx_id); 150 u32 ce_ctx_id);
149 151
152
150#ifdef CONFIG_DEBUG_FS 153#ifdef CONFIG_DEBUG_FS
151/* CE app debugfs api */ 154/* CE app debugfs api */
152void gk20a_ce_debugfs_init(struct device *dev); 155void gk20a_ce_debugfs_init(struct device *dev);