summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-03-30 10:44:03 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-10 22:04:19 -0400
commit3ba374a5d94f8c2067731155afaf79f03e6c390c (patch)
treed8a2bd0d52b1e8862510aedeb7529944c0b7e28e /drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
parent2be51206af88aba6662cdd9de5bd6c18989bbcbd (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/css_gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
index e5910e7f..76237e03 100644
--- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
@@ -27,6 +27,8 @@
27#include "gk20a.h" 27#include "gk20a.h"
28#include "css_gr_gk20a.h" 28#include "css_gr_gk20a.h"
29 29
30#include <nvgpu/log.h>
31
30#include <nvgpu/hw/gk20a/hw_perf_gk20a.h> 32#include <nvgpu/hw/gk20a/hw_perf_gk20a.h>
31#include <nvgpu/hw/gk20a/hw_mc_gk20a.h> 33#include <nvgpu/hw/gk20a/hw_mc_gk20a.h>
32 34
@@ -299,8 +301,7 @@ static int css_gr_flush_snapshots(struct channel_gk20a *ch)
299 cur->snapshot->hw_overflow_events_occured++; 301 cur->snapshot->hw_overflow_events_occured++;
300 } 302 }
301 303
302 gk20a_warn(dev_from_gk20a(g), 304 nvgpu_warn(g, "cyclestats: hardware overflow detected");
303 "cyclestats: hardware overflow detected\n");
304 } 305 }
305 306
306 /* process all items in HW buffer */ 307 /* process all items in HW buffer */
@@ -340,8 +341,7 @@ static int css_gr_flush_snapshots(struct channel_gk20a *ch)
340 dst_nxt = dst_head; 341 dst_nxt = dst_head;
341 } else { 342 } else {
342 /* client not found - skipping this entry */ 343 /* client not found - skipping this entry */
343 gk20a_warn(dev_from_gk20a(g), 344 nvgpu_warn(g, "cyclestats: orphaned perfmon %u",
344 "cyclestats: orphaned perfmon %u\n",
345 src->perfmon_id); 345 src->perfmon_id);
346 goto next_hw_fifo_entry; 346 goto next_hw_fifo_entry;
347 } 347 }
@@ -351,8 +351,7 @@ static int css_gr_flush_snapshots(struct channel_gk20a *ch)
351 if (dst_nxt == dst_get) { 351 if (dst_nxt == dst_get) {
352 /* no data copy, no pointer updates */ 352 /* no data copy, no pointer updates */
353 dst->sw_overflow_events_occured++; 353 dst->sw_overflow_events_occured++;
354 gk20a_warn(dev_from_gk20a(g), 354 nvgpu_warn(g, "cyclestats: perfmon %u soft overflow",
355 "cyclestats: perfmon %u soft overflow\n",
356 src->perfmon_id); 355 src->perfmon_id);
357 } else { 356 } else {
358 *dst_put = *src; 357 *dst_put = *src;
@@ -392,8 +391,7 @@ next_hw_fifo_entry:
392 /* not all entries proceed correctly. some of problems */ 391 /* not all entries proceed correctly. some of problems */
393 /* reported as overflows, some as orphaned perfmons, */ 392 /* reported as overflows, some as orphaned perfmons, */
394 /* but it will be better notify with summary about it */ 393 /* but it will be better notify with summary about it */
395 gk20a_warn(dev_from_gk20a(g), 394 nvgpu_warn(g, "cyclestats: completed %u from %u entries",
396 "cyclestats: completed %u from %u entries\n",
397 completed, pending); 395 completed, pending);
398 } 396 }
399 397