aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2015-11-22 14:24:32 -0500
committerBen Skeggs <bskeggs@redhat.com>2015-11-25 00:31:21 -0500
commit7028156a91326fda29cf972f0d148badbf5ae078 (patch)
tree8a5c56248f19d20f06c62d49f57d64b60de07e2a /drivers/gpu
parent954329412ea45ad6b509aa26f1441941fd432823 (diff)
drm/nouveau/gr/gf100-: split out per-gpc address calculation macro
There's a few places where we need to access a GPC register from ucode, but outside of the falcon's io address space. To do this we need to calculate the offset based on which GPC we're executing on. This used to be done manually, but we've since found a "base" offset that can be added by the hardware. To use this, an extra bit needs to be set in the register address, which is what this macro achieves. There should be no functional change from this commit. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc6
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h90
2 files changed, 49 insertions, 47 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc
index 194afe910d21..19d75173655b 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpc.fuc
@@ -52,10 +52,12 @@ mmio_list_base:
52#endif 52#endif
53 53
54#ifdef INCLUDE_CODE 54#ifdef INCLUDE_CODE
55#define gpc_addr(reg,addr) /*
56*/ imm32(reg,addr) /*
57*/ or reg NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE
55#define gpc_wr32(addr,reg) /* 58#define gpc_wr32(addr,reg) /*
59*/ gpc_addr($r14,addr) /*
56*/ mov b32 $r15 reg /* 60*/ mov b32 $r15 reg /*
57*/ imm32($r14, addr) /*
58*/ or $r14 NV_PGRAPH_GPCX_GPCCS_MMIO_CTRL_BASE_ENABLE /*
59*/ call(nv_wr32) 61*/ call(nv_wr32)
60 62
61// reports an exception to the host 63// reports an exception to the host
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h
index 51f5c3c6e966..f09afe6f05a7 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/fuc/gpcgm107.fuc5.h
@@ -356,33 +356,33 @@ uint32_t gm107_grgpc_code[] = {
356 0x02687e2f, 356 0x02687e2f,
357 0x002fbb00, 357 0x002fbb00,
358 0x0f003fbb, 358 0x0f003fbb,
359 0x8effb23f, 359 0x1d608e3f,
360 0xf0501d60, 360 0x01e5f050,
361 0x8f7e01e5, 361 0x8f7effb2,
362 0x0c0f0000, 362 0x0c0f0000,
363 0xa88effb2, 363 0x501da88e,
364 0xe5f0501d, 364 0xb201e5f0,
365 0x008f7e01, 365 0x008f7eff,
366 0x03147e00, 366 0x03147e00,
367 0xb23f0f00, 367 0x8e3f0f00,
368 0x1d608eff, 368 0xf0501d60,
369 0x01e5f050, 369 0xffb201e5,
370 0x00008f7e, 370 0x00008f7e,
371 0xffb2000f, 371 0x9c8e000f,
372 0x501d9c8e, 372 0xe5f0501d,
373 0x7e01e5f0, 373 0x7effb201,
374 0x0f00008f, 374 0x0f00008f,
375 0x03147e01, 375 0x03147e01,
376 0x8effb200, 376 0x1da88e00,
377 0xf0501da8,
378 0x8f7e01e5,
379 0xff0f0000,
380 0x988effb2,
381 0xe5f0501d,
382 0x008f7e01,
383 0xb2020f00,
384 0x1da88eff,
385 0x01e5f050, 377 0x01e5f050,
378 0x8f7effb2,
379 0xff0f0000,
380 0x501d988e,
381 0xb201e5f0,
382 0x008f7eff,
383 0x8e020f00,
384 0xf0501da8,
385 0xffb201e5,
386 0x00008f7e, 386 0x00008f7e,
387 0x0003147e, 387 0x0003147e,
388 0x85050498, 388 0x85050498,
@@ -414,13 +414,13 @@ uint32_t gm107_grgpc_code[] = {
414 0x0050b7bf, 414 0x0050b7bf,
415 0x0142b608, 415 0x0142b608,
416 0x0fa81bf4, 416 0x0fa81bf4,
417 0x8effb23f, 417 0x1d608e3f,
418 0xf0501d60, 418 0x01e5f050,
419 0x8f7e01e5, 419 0x8f7effb2,
420 0x0d0f0000, 420 0x0d0f0000,
421 0xa88effb2, 421 0x501da88e,
422 0xe5f0501d, 422 0xb201e5f0,
423 0x008f7e01, 423 0x008f7eff,
424 0x03147e00, 424 0x03147e00,
425 0x01008000, 425 0x01008000,
426 0x0003f602, 426 0x0003f602,
@@ -491,9 +491,9 @@ uint32_t gm107_grgpc_code[] = {
491 0x8000f804, 491 0x8000f804,
492 0xf6028100, 492 0xf6028100,
493 0x04bd000f, 493 0x04bd000f,
494 0xc48effb2, 494 0x501dc48e,
495 0xe5f0501d, 495 0xb201e5f0,
496 0x008f7e01, 496 0x008f7eff,
497 0x0711f400, 497 0x0711f400,
498 0x0006217e, 498 0x0006217e,
499/* 0x0664: ctx_xfer_not_load */ 499/* 0x0664: ctx_xfer_not_load */
@@ -505,23 +505,23 @@ uint32_t gm107_grgpc_code[] = {
505 0x4afc8003, 505 0x4afc8003,
506 0x0002f602, 506 0x0002f602,
507 0x0c0f04bd, 507 0x0c0f04bd,
508 0xa88effb2, 508 0x501da88e,
509 0xe5f0501d, 509 0xb201e5f0,
510 0x008f7e01, 510 0x008f7eff,
511 0x03147e00, 511 0x03147e00,
512 0xb23f0f00, 512 0x8e3f0f00,
513 0x1d608eff, 513 0xf0501d60,
514 0x01e5f050, 514 0xffb201e5,
515 0x00008f7e, 515 0x00008f7e,
516 0xffb2000f, 516 0x9c8e000f,
517 0x501d9c8e, 517 0xe5f0501d,
518 0x7e01e5f0, 518 0x7effb201,
519 0x0f00008f, 519 0x0f00008f,
520 0x03147e01, 520 0x03147e01,
521 0x01fcf000, 521 0x01fcf000,
522 0xb203f0b6, 522 0x8e03f0b6,
523 0x1da88eff, 523 0xf0501da8,
524 0x01e5f050, 524 0xffb201e5,
525 0x00008f7e, 525 0x00008f7e,
526 0xf001acf0, 526 0xf001acf0,
527 0x008b02a5, 527 0x008b02a5,
@@ -553,9 +553,9 @@ uint32_t gm107_grgpc_code[] = {
553 0x1a12f406, 553 0x1a12f406,
554/* 0x073c: ctx_xfer_post */ 554/* 0x073c: ctx_xfer_post */
555 0x0002277e, 555 0x0002277e,
556 0xffb20d0f, 556 0xa88e0d0f,
557 0x501da88e, 557 0xe5f0501d,
558 0x7e01e5f0, 558 0x7effb201,
559 0x7e00008f, 559 0x7e00008f,
560/* 0x0753: ctx_xfer_done */ 560/* 0x0753: ctx_xfer_done */
561 0x7e000314, 561 0x7e000314,