diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-04-14 15:36:16 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-05-20 14:43:04 +1000 |
commit | 06d4f26cc33b11be4b41fa0409130cbdf34d9343 (patch) | |
tree | 7818e74d47e3ee1932fb48e2b548558464823ab5 /drivers/gpu | |
parent | 734a0aa669fd032f40e27e3d3df7228e1fe27681 (diff) | |
download | linux-06d4f26cc33b11be4b41fa0409130cbdf34d9343.tar.gz linux-06d4f26cc33b11be4b41fa0409130cbdf34d9343.tar.bz2 linux-06d4f26cc33b11be4b41fa0409130cbdf34d9343.zip |
drm/nouveau/gr/gm200-: fix bad hardcoding of a max-tpcs-per-gpc value
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c index 7a78d974ee1a..e65b70a01a88 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c @@ -33,7 +33,7 @@ gm200_grctx_generate_tpcid(struct gf100_gr *gr) struct nvkm_device *device = gr->base.engine.subdev.device; int gpc, tpc, id; - for (tpc = 0, id = 0; tpc < 4; tpc++) { + for (tpc = 0, id = 0; tpc < TPC_MAX_PER_GPC; tpc++) { for (gpc = 0; gpc < gr->gpc_nr; gpc++) { if (tpc < gr->tpc_nr[gpc]) { nvkm_wr32(device, TPC_UNIT(gpc, tpc, 0x698), id); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h index be32330c58da..9a2c7bacc0e6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h @@ -31,7 +31,8 @@ #include <subdev/mmu.h> #define GPC_MAX 32 -#define TPC_MAX (GPC_MAX * 8) +#define TPC_MAX_PER_GPC 8 +#define TPC_MAX (GPC_MAX * TPC_MAX_PER_GPC) #define ROP_BCAST(r) (0x408800 + (r)) #define ROP_UNIT(u, r) (0x410000 + (u) * 0x400 + (r)) |