Karol Herbst
2020-Oct-07 15:13 UTC
[Nouveau] [RFC] fifo: only reboot engines if they have a ref
this prevents double fini/init on engines and also fixes the "gr: fecs falcon already acquired by gr!" error I was seeing. RFC comment: not sure if this is the right solution, but it does fix the issue for me. And I guess if this is a valid approach older/newer chipset might need similiar fixes? Signed-off-by: Karol Herbst <kherbst at redhat.com> --- drm/nouveau/nvkm/engine/fifo/gk104.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drm/nouveau/nvkm/engine/fifo/gk104.c b/drm/nouveau/nvkm/engine/fifo/gk104.c index 441483325..669153fba 100644 --- a/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -292,8 +292,12 @@ gk104_fifo_recover_work(struct work_struct *w) for (todo = engm; engn = __ffs(todo), todo; todo &= ~BIT(engn)) { if ((engine = fifo->engine[engn].engine)) { - nvkm_subdev_fini(&engine->subdev, false); - WARN_ON(nvkm_subdev_init(&engine->subdev)); + mutex_lock(&engine->subdev.mutex); + if (engine->usecount) { + nvkm_subdev_fini(&engine->subdev, false); + WARN_ON(nvkm_subdev_init(&engine->subdev)); + } + mutex_unlock(&engine->subdev.mutex); } } -- 2.26.2
Maybe Matching Threads
- [PATCH] fifo/gk104: fix engine status register offset
- [PATCH] fifo/gk104: fix chid bit mask
- [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should
- [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should
- [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line