Skip to content

Commit 2fb2b3c

Browse files
author
Ben Skeggs
committed
drm/nouveau/gr/gf117-: assume no PPC if NV_PGRAPH_GPC_GPM_PD_PES_TPC_ID_MASK is zero
fdo#92761 Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
1 parent ccb7b6b commit 2fb2b3c

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,8 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info)
207207
const u32 b = beta * gr->ppc_tpc_nr[gpc][ppc];
208208
const u32 t = timeslice_mode;
209209
const u32 o = PPC_UNIT(gpc, ppc, 0);
210+
if (!(gr->ppc_mask[gpc] & (1 << ppc)))
211+
continue;
210212
mmio_skip(info, o + 0xc0, (t << 28) | (b << 16) | ++bo);
211213
mmio_wr32(info, o + 0xc0, (t << 28) | (b << 16) | --bo);
212214
bo += grctx->attrib_nr_max * gr->ppc_tpc_nr[gpc][ppc];

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,8 @@ gf100_gr_oneinit(struct nvkm_gr *base)
15301530
gr->ppc_nr[i] = gr->func->ppc_nr;
15311531
for (j = 0; j < gr->ppc_nr[i]; j++) {
15321532
u8 mask = nvkm_rd32(device, GPC_UNIT(i, 0x0c30 + (j * 4)));
1533+
if (mask)
1534+
gr->ppc_mask[i] |= (1 << j);
15331535
gr->ppc_tpc_nr[i][j] = hweight8(mask);
15341536
}
15351537
}

drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ struct gf100_gr {
9797
u8 tpc_nr[GPC_MAX];
9898
u8 tpc_total;
9999
u8 ppc_nr[GPC_MAX];
100+
u8 ppc_mask[GPC_MAX];
100101
u8 ppc_tpc_nr[GPC_MAX][4];
101102

102103
struct nvkm_memory *unk4188b4;

0 commit comments

Comments
 (0)