Skip to content

Commit 718c4fb

Browse files
committed
nouveau: fix devinit paths to only handle display on GSP.
This reverts: nouveau/gsp: don't check devinit disable on GSP. and applies a further fix. It turns out the open gpu driver, checks this register, but only for display. Match that behaviour and in the turing path only disable the display block. (ampere already only does displays). Fixes: 5d4e8ae ("nouveau/gsp: don't check devinit disable on GSP.") Reviewed-by: Danilo Krummrich <[email protected]> Signed-off-by: Dave Airlie <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent fec50db commit 718c4fb

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm107.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
#include <subdev/bios.h>
2727
#include <subdev/bios/init.h>
28+
#include <subdev/gsp.h>
2829

2930
void
3031
gm107_devinit_disable(struct nvkm_devinit *init)
@@ -33,10 +34,13 @@ gm107_devinit_disable(struct nvkm_devinit *init)
3334
u32 r021c00 = nvkm_rd32(device, 0x021c00);
3435
u32 r021c04 = nvkm_rd32(device, 0x021c04);
3536

36-
if (r021c00 & 0x00000001)
37-
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
38-
if (r021c00 & 0x00000004)
39-
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 2);
37+
/* gsp only wants to enable/disable display */
38+
if (!nvkm_gsp_rm(device->gsp)) {
39+
if (r021c00 & 0x00000001)
40+
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
41+
if (r021c00 & 0x00000004)
42+
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 2);
43+
}
4044
if (r021c04 & 0x00000001)
4145
nvkm_subdev_disable(device, NVKM_ENGINE_DISP, 0);
4246
}

drivers/gpu/drm/nouveau/nvkm/subdev/devinit/r535.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ r535_devinit_new(const struct nvkm_devinit_func *hw,
4141

4242
rm->dtor = r535_devinit_dtor;
4343
rm->post = hw->post;
44+
rm->disable = hw->disable;
4445

4546
ret = nv50_devinit_new_(rm, device, type, inst, pdevinit);
4647
if (ret)

0 commit comments

Comments
 (0)