diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2018-05-08 20:39:46 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2018-05-18 15:01:23 +1000 |
commit | 778f18c607e30206c1a791a4d356f1ed32bc1947 (patch) | |
tree | 9fac3246b3754d0a97278919425188b1876dc7cf /drivers/gpu/drm/nouveau | |
parent | 0a84a51334b5d75decd23b735aab00ff4698eeb2 (diff) | |
download | linux-778f18c607e30206c1a791a4d356f1ed32bc1947.tar.bz2 |
drm/nouveau/gr/gf100-: virtualise init_419c9c + apply fixes from traces
Deliberately removed from non-GP100, as RM doesn't touch it.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c | 14 |
3 files changed, 14 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c index 947278274846..a379794df761 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c @@ -2068,6 +2068,8 @@ gf100_gr_init(struct gf100_gr *gr) gr->func->init_419cc0(gr); if (gr->func->init_419eb4) gr->func->init_419eb4(gr); + if (gr->func->init_419c9c) + gr->func->init_419c9c(gr); for (gpc = 0; gpc < gr->gpc_nr; gpc++) { nvkm_wr32(device, GPC_UNIT(gpc, 0x0420), 0xc0000000); diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h index 1dae373fa0d7..e328957453fb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h @@ -136,6 +136,7 @@ struct gf100_gr_func { void (*init_sked_hww_esr)(struct gf100_gr *); void (*init_419cc0)(struct gf100_gr *); void (*init_419eb4)(struct gf100_gr *); + void (*init_419c9c)(struct gf100_gr *); void (*init_ppc_exceptions)(struct gf100_gr *); void (*set_hww_esr_report_mask)(struct gf100_gr *); const struct gf100_gr_pack *mmio; diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c index 7518d249f648..3fcbe1fc19cf 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gp100.c @@ -30,6 +30,14 @@ * PGRAPH engine/subdev functions ******************************************************************************/ +static void +gp100_gr_init_419c9c(struct gf100_gr *gr) +{ + struct nvkm_device *device = gr->base.engine.subdev.device; + nvkm_mask(device, 0x419c9c, 0x00010000, 0x00010000); + nvkm_mask(device, 0x419c9c, 0x00020000, 0x00020000); +} + void gp100_gr_init_fecs_exceptions(struct gf100_gr *gr) { @@ -80,9 +88,8 @@ gp100_gr_init(struct gf100_gr *gr) nvkm_wr32(device, 0x405840, 0xc0000000); nvkm_wr32(device, 0x405844, 0x00ffffff); gr->func->init_419cc0(gr); - - nvkm_mask(device, 0x419c9c, 0x00010000, 0x00010000); - nvkm_mask(device, 0x419c9c, 0x00020000, 0x00020000); + if (gr->func->init_419c9c) + gr->func->init_419c9c(gr); gr->func->init_ppc_exceptions(gr); @@ -135,6 +142,7 @@ gp100_gr = { .init_ds_hww_esr_2 = gm200_gr_init_ds_hww_esr_2, .init_sked_hww_esr = gk104_gr_init_sked_hww_esr, .init_419cc0 = gf100_gr_init_419cc0, + .init_419c9c = gp100_gr_init_419c9c, .init_ppc_exceptions = gk104_gr_init_ppc_exceptions, .rops = gm200_gr_rops, .ppc_nr = 2, |