drm/nouveau/fifo: map Kepler video engine contexts non-privileged
Subsystems (3)
PATCH 1/1 drm/nouveau/fifo: map Kepler video engine contexts non-privileged
Since the engine context rework, gk104_ectx_ctor() maps every engine context into the channel's VMM as a privileged page. The MSVLD, MSPDEC and MSPPP falcons on Kepler fetch their context with non-privileged requests, so the first method sent to any of them faults and the channel is killed:
fifo: fault 00 [READ] at 0000000001050000 engine 10 [MSVLD] client 0d [HUB/MSVLD] reason 05 [PRIV_VIOLATION] on channel 9
fifo: fault 00 [READ] at 0000000001051000 engine 14 [MSPDEC] client 0b [HUB/MSPDEC] reason 05 [PRIV_VIOLATION] on channel 10
fifo: fault 00 [READ] at 0000000001052000 engine 11 [MSPPP] client 0c [HUB/MSPPP] reason 05 [PRIV_VIOLATION] on channel 11
Before the rework, gk104_fifo_gpfifo_engine_ctor() mapped engine contexts without the privileged bit. Restore that for the three video engines, and keep the privileged mapping for everything else.
--- drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +13 -0
@@ -180,6 +180,19 @@ gk104_ectx_ctor(struct nvkm_engn *engn, struct nvkm_vctx *vctx)struct gf100_vmm_map_v0 args = { .priv =1 };int ret; +/* The video falcons access their context with non-privileged +* requests, and fault with PRIV_VIOLATION on a privileged mapping. +*/ +switch (engn->engine->subdev.type) { +case NVKM_ENGINE_MSVLD : +case NVKM_ENGINE_MSPDEC : +case NVKM_ENGINE_MSPPP : + args.priv =0 ; +break ; +default : +break ; + } + ret =nvkm_vmm_get (vctx->vmm,12 , vctx->inst->size, &vctx->vma);if (ret)return ret;
Signature · 1 line
2.56.0
Dave Airlie
maintainerQuoted 11 lines · Rosen Penev
Since the engine context rework,
gk104_ectx_ctor()maps every engine context into the channel's VMM as a privileged page. The MSVLD, MSPDEC and MSPPP falcons on Kepler fetch their context with non-privileged requests, so the first method sent to any of them faults and the channel is killed:fifo: fault 00 [READ] at 0000000001050000 engine 10 [MSVLD] client 0d [HUB/MSVLD] reason 05 [
PRIV_VIOLATION] on channel 9
fifo: fault 00 [READ] at 0000000001051000 engine 14 [MSPDEC] client 0b [HUB/MSPDEC] reason 05 [PRIV_VIOLATION] on channel 10
fifo: fault 00 [READ] at 0000000001052000 engine 11 [MSPPP] client 0c [HUB/MSPPP] reason 05 [PRIV_VIOLATION] on channel 11
Quoted 6 lines
Before the rework,
gk104_fifo_gpfifo_engine_ctor()mapped engine contexts without the privileged bit. Restore that for the three video engines, and keep the privileged mapping for everything else.Fixes 8ab849d6dd4c ("drm/nouveau/fifo: add new engine context handling")Signed-off-by Rosen Penev <[email protected]>
Appled to drm-misc-fixes
Thanks,
Dave.