diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-30 10:44:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-10 22:04:19 -0400 |
commit | 3ba374a5d94f8c2067731155afaf79f03e6c390c (patch) | |
tree | d8a2bd0d52b1e8862510aedeb7529944c0b7e28e /drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |
parent | 2be51206af88aba6662cdd9de5bd6c18989bbcbd (diff) |
gpu: nvgpu: gk20a: Use new error macro
gk20a_err() and gk20a_warn() require a struct device pointer,
which is not portable across operating systems. The new nvgpu_err()
and nvgpu_warn() macros take struct gk20a pointer. Convert code
to use the more portable macros.
JIRA NVGPU-16
Change-Id: Ia51f36d94c5ce57a5a0ab83b3c83a6bce09e2d5c
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1331694
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index f3ac28ea..c502add5 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include "gk20a.h" | 31 | #include "gk20a.h" |
32 | #include "debug_gk20a.h" | 32 | #include "debug_gk20a.h" |
33 | 33 | ||
34 | #include <nvgpu/log.h> | ||
35 | |||
34 | #include <nvgpu/hw/gk20a/hw_ce2_gk20a.h> | 36 | #include <nvgpu/hw/gk20a/hw_ce2_gk20a.h> |
35 | #include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h> | 37 | #include <nvgpu/hw/gk20a/hw_pbdma_gk20a.h> |
36 | #include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h> | 38 | #include <nvgpu/hw/gk20a/hw_ccsr_gk20a.h> |
@@ -459,7 +461,7 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, | |||
459 | runlist_id, | 461 | runlist_id, |
460 | true); | 462 | true); |
461 | if (!ce_ctx->ch) { | 463 | if (!ce_ctx->ch) { |
462 | gk20a_err(ce_ctx->dev, "ce: gk20a channel not available"); | 464 | nvgpu_err(g, "ce: gk20a channel not available"); |
463 | goto end; | 465 | goto end; |
464 | } | 466 | } |
465 | ce_ctx->ch->wdt_enabled = false; | 467 | ce_ctx->ch->wdt_enabled = false; |
@@ -467,21 +469,21 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, | |||
467 | /* bind the channel to the vm */ | 469 | /* bind the channel to the vm */ |
468 | err = __gk20a_vm_bind_channel(&g->mm.ce.vm, ce_ctx->ch); | 470 | err = __gk20a_vm_bind_channel(&g->mm.ce.vm, ce_ctx->ch); |
469 | if (err) { | 471 | if (err) { |
470 | gk20a_err(ce_ctx->dev, "ce: could not bind vm"); | 472 | nvgpu_err(g, "ce: could not bind vm"); |
471 | goto end; | 473 | goto end; |
472 | } | 474 | } |
473 | 475 | ||
474 | /* allocate gpfifo (1024 should be more than enough) */ | 476 | /* allocate gpfifo (1024 should be more than enough) */ |
475 | err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, 1024, 0, 0); | 477 | err = gk20a_channel_alloc_gpfifo(ce_ctx->ch, 1024, 0, 0); |
476 | if (err) { | 478 | if (err) { |
477 | gk20a_err(ce_ctx->dev, "ce: unable to allocate gpfifo"); | 479 | nvgpu_err(g, "ce: unable to allocate gpfifo"); |
478 | goto end; | 480 | goto end; |
479 | } | 481 | } |
480 | 482 | ||
481 | /* allocate command buffer (4096 should be more than enough) from sysmem*/ | 483 | /* allocate command buffer (4096 should be more than enough) from sysmem*/ |
482 | err = nvgpu_dma_alloc_map_sys(ce_ctx->vm, NVGPU_CE_COMMAND_BUF_SIZE, &ce_ctx->cmd_buf_mem); | 484 | err = nvgpu_dma_alloc_map_sys(ce_ctx->vm, NVGPU_CE_COMMAND_BUF_SIZE, &ce_ctx->cmd_buf_mem); |
483 | if (err) { | 485 | if (err) { |
484 | gk20a_err(ce_ctx->dev, | 486 | nvgpu_err(g, |
485 | "ce: could not allocate command buffer for CE context"); | 487 | "ce: could not allocate command buffer for CE context"); |
486 | goto end; | 488 | goto end; |
487 | } | 489 | } |
@@ -492,7 +494,7 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, | |||
492 | if (priority != -1) { | 494 | if (priority != -1) { |
493 | err = gk20a_fifo_set_priority(ce_ctx->ch, priority); | 495 | err = gk20a_fifo_set_priority(ce_ctx->ch, priority); |
494 | if (err) { | 496 | if (err) { |
495 | gk20a_err(ce_ctx->dev, | 497 | nvgpu_err(g, |
496 | "ce: could not set the channel priority for CE context"); | 498 | "ce: could not set the channel priority for CE context"); |
497 | goto end; | 499 | goto end; |
498 | } | 500 | } |
@@ -502,7 +504,7 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, | |||
502 | if (timeslice != -1) { | 504 | if (timeslice != -1) { |
503 | err = gk20a_fifo_set_timeslice(ce_ctx->ch, timeslice); | 505 | err = gk20a_fifo_set_timeslice(ce_ctx->ch, timeslice); |
504 | if (err) { | 506 | if (err) { |
505 | gk20a_err(ce_ctx->dev, | 507 | nvgpu_err(g, |
506 | "ce: could not set the channel timeslice value for CE context"); | 508 | "ce: could not set the channel timeslice value for CE context"); |
507 | goto end; | 509 | goto end; |
508 | } | 510 | } |
@@ -512,7 +514,7 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, | |||
512 | if (runlist_level != -1) { | 514 | if (runlist_level != -1) { |
513 | err = gk20a_channel_set_runlist_interleave(ce_ctx->ch, runlist_level); | 515 | err = gk20a_channel_set_runlist_interleave(ce_ctx->ch, runlist_level); |
514 | if (err) { | 516 | if (err) { |
515 | gk20a_err(ce_ctx->dev, | 517 | nvgpu_err(g, |
516 | "ce: could not set the runlist interleave for CE context"); | 518 | "ce: could not set the runlist interleave for CE context"); |
517 | goto end; | 519 | goto end; |
518 | } | 520 | } |