aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-04-20 20:28:55 -0400
committerBen Skeggs <bskeggs@redhat.com>2016-05-20 00:43:04 -0400
commit00f50c662c5aa3cebea62015d1df8cd5b19a41b6 (patch)
tree488c8f404ea73384345c6b99fd140f2d73931db5 /drivers/gpu
parenta00ecf2212be0196c7485786c7b0c0263dfbf88a (diff)
drm/nouveau/gr/gm107-: fix touching non-existent ppcs in attrib cb setup
Also removes an XXX; according to nvgpu headers the field is called NV_PGRAPH_GPCS_SWDX_TC_BETA_CB_SIZE_DIV3, so, apparently not some magic we need to figure out :) Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
index 053ff2f850b9..6d3c5011e18c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
@@ -920,13 +920,15 @@ gm107_grctx_generate_attrib(struct gf100_grctx *info)
920 const u32 bs = attrib * gr->ppc_tpc_nr[gpc][ppc]; 920 const u32 bs = attrib * gr->ppc_tpc_nr[gpc][ppc];
921 const u32 u = 0x418ea0 + (n * 0x04); 921 const u32 u = 0x418ea0 + (n * 0x04);
922 const u32 o = PPC_UNIT(gpc, ppc, 0); 922 const u32 o = PPC_UNIT(gpc, ppc, 0);
923 if (!(gr->ppc_mask[gpc] & (1 << ppc)))
924 continue;
923 mmio_wr32(info, o + 0xc0, bs); 925 mmio_wr32(info, o + 0xc0, bs);
924 mmio_wr32(info, o + 0xf4, bo); 926 mmio_wr32(info, o + 0xf4, bo);
925 bo += grctx->attrib_nr_max * gr->ppc_tpc_nr[gpc][ppc]; 927 bo += grctx->attrib_nr_max * gr->ppc_tpc_nr[gpc][ppc];
926 mmio_wr32(info, o + 0xe4, as); 928 mmio_wr32(info, o + 0xe4, as);
927 mmio_wr32(info, o + 0xf8, ao); 929 mmio_wr32(info, o + 0xf8, ao);
928 ao += grctx->alpha_nr_max * gr->ppc_tpc_nr[gpc][ppc]; 930 ao += grctx->alpha_nr_max * gr->ppc_tpc_nr[gpc][ppc];
929 mmio_wr32(info, u, ((bs / 3 /*XXX*/) << 16) | bs); 931 mmio_wr32(info, u, ((bs / 3) << 16) | bs);
930 } 932 }
931 } 933 }
932} 934}