summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
diff options
context:
space:
mode:
authorskadamati <skadamati@nvidia.com>2017-05-23 06:25:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-26 06:34:42 -0400
commite21e6e947b334cd16cc92c41953bf3c0153b1508 (patch)
treea9222039f465548e0f69730c8c3bf24ad6223116 /drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
parent2e338c77eac4edffb94c8c9480dbd72712c7696f (diff)
gpu: nvgpu: Fix build failure by missing headers
Move the platform_gk20a.h include out of the ifdef CONFIG_DEBUG_FS in the CDE code since dev_from_gk20a() is used regardless of whether debugfs is enabled. Also modify some of the CE ops to take a struct gk20a instead of a struct device. This avoids any requirement for including linux/device.h or platform_gk20a.h. Bug 200310575 Change-Id: Ifef963cd0f66d05094a698200386cc6140920eac Signed-off-by: skadamati <skadamati@nvidia.com> Reviewed-on: http://git-master/r/1487830 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
index 25d6462d..1ed90b14 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
@@ -424,7 +424,7 @@ void gk20a_ce_suspend(struct gk20a *g)
424} 424}
425 425
426/* CE app utility functions */ 426/* CE app utility functions */
427u32 gk20a_ce_create_context_with_cb(struct device *dev, 427u32 gk20a_ce_create_context_with_cb(struct gk20a *g,
428 int runlist_id, 428 int runlist_id,
429 int priority, 429 int priority,
430 int timeslice, 430 int timeslice,
@@ -432,7 +432,6 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev,
432 ce_event_callback user_event_callback) 432 ce_event_callback user_event_callback)
433{ 433{
434 struct gk20a_gpu_ctx *ce_ctx; 434 struct gk20a_gpu_ctx *ce_ctx;
435 struct gk20a *g = gk20a_from_dev(dev);
436 struct gk20a_ce_app *ce_app = &g->ce_app; 435 struct gk20a_ce_app *ce_app = &g->ce_app;
437 u32 ctx_id = ~0; 436 u32 ctx_id = ~0;
438 int err = 0; 437 int err = 0;
@@ -548,7 +547,7 @@ end:
548} 547}
549EXPORT_SYMBOL(gk20a_ce_create_context_with_cb); 548EXPORT_SYMBOL(gk20a_ce_create_context_with_cb);
550 549
551int gk20a_ce_execute_ops(struct device *dev, 550int gk20a_ce_execute_ops(struct gk20a *g,
552 u32 ce_ctx_id, 551 u32 ce_ctx_id,
553 u64 src_buf, 552 u64 src_buf,
554 u64 dst_buf, 553 u64 dst_buf,
@@ -561,7 +560,6 @@ int gk20a_ce_execute_ops(struct device *dev,
561 struct gk20a_fence **gk20a_fence_out) 560 struct gk20a_fence **gk20a_fence_out)
562{ 561{
563 int ret = -EPERM; 562 int ret = -EPERM;
564 struct gk20a *g = gk20a_from_dev(dev);
565 struct gk20a_ce_app *ce_app = &g->ce_app; 563 struct gk20a_ce_app *ce_app = &g->ce_app;
566 struct gk20a_gpu_ctx *ce_ctx, *ce_ctx_save; 564 struct gk20a_gpu_ctx *ce_ctx, *ce_ctx_save;
567 bool found = false; 565 bool found = false;
@@ -700,10 +698,9 @@ end:
700} 698}
701EXPORT_SYMBOL(gk20a_ce_execute_ops); 699EXPORT_SYMBOL(gk20a_ce_execute_ops);
702 700
703void gk20a_ce_delete_context(struct device *dev, 701void gk20a_ce_delete_context(struct gk20a *g,
704 u32 ce_ctx_id) 702 u32 ce_ctx_id)
705{ 703{
706 struct gk20a *g = gk20a_from_dev(dev);
707 gk20a_ce_delete_context_priv(g, ce_ctx_id); 704 gk20a_ce_delete_context_priv(g, ce_ctx_id);
708} 705}
709 706