mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 21:03:32 +00:00
nouveau: fix devinit paths to only handle display on GSP.
[ Upstream commit718c4fb221
] 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:5d4e8ae6e5
("nouveau/gsp: don't check devinit disable on GSP.") Reviewed-by: Danilo Krummrich <dakr@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240408064243.2219527-1-airlied@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
96e08fb285
commit
4d5ee18247
2 changed files with 9 additions and 4 deletions
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include <subdev/bios.h>
|
#include <subdev/bios.h>
|
||||||
#include <subdev/bios/init.h>
|
#include <subdev/bios/init.h>
|
||||||
|
#include <subdev/gsp.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
gm107_devinit_disable(struct nvkm_devinit *init)
|
gm107_devinit_disable(struct nvkm_devinit *init)
|
||||||
|
@ -33,10 +34,13 @@ gm107_devinit_disable(struct nvkm_devinit *init)
|
||||||
u32 r021c00 = nvkm_rd32(device, 0x021c00);
|
u32 r021c00 = nvkm_rd32(device, 0x021c00);
|
||||||
u32 r021c04 = nvkm_rd32(device, 0x021c04);
|
u32 r021c04 = nvkm_rd32(device, 0x021c04);
|
||||||
|
|
||||||
if (r021c00 & 0x00000001)
|
/* gsp only wants to enable/disable display */
|
||||||
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
|
if (!nvkm_gsp_rm(device->gsp)) {
|
||||||
if (r021c00 & 0x00000004)
|
if (r021c00 & 0x00000001)
|
||||||
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 2);
|
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 0);
|
||||||
|
if (r021c00 & 0x00000004)
|
||||||
|
nvkm_subdev_disable(device, NVKM_ENGINE_CE, 2);
|
||||||
|
}
|
||||||
if (r021c04 & 0x00000001)
|
if (r021c04 & 0x00000001)
|
||||||
nvkm_subdev_disable(device, NVKM_ENGINE_DISP, 0);
|
nvkm_subdev_disable(device, NVKM_ENGINE_DISP, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,6 +41,7 @@ r535_devinit_new(const struct nvkm_devinit_func *hw,
|
||||||
|
|
||||||
rm->dtor = r535_devinit_dtor;
|
rm->dtor = r535_devinit_dtor;
|
||||||
rm->post = hw->post;
|
rm->post = hw->post;
|
||||||
|
rm->disable = hw->disable;
|
||||||
|
|
||||||
ret = nv50_devinit_new_(rm, device, type, inst, pdevinit);
|
ret = nv50_devinit_new_(rm, device, type, inst, pdevinit);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in a new issue