Commit 1264f832 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50-: cursors always use core channel vram ctxdma

Ctxdmas for cursors from all heads are setup in the core channel, and due
to us tracking allocated handles per-window, we were failing with -EEXIST
on multiple-head setups trying to allocate duplicate handles.

The cursor code is hardcoded to use the core channel vram ctxdma already,
so just skip ctxdma allocation for cursor fbs to fix the issue.

Fixes: 5bca1621 ("drm/nouveau/kms/nv50-: move fb ctxdma tracking into windows")
Reported-by: default avatarAdam Borowski <kilobyte@angband.pl>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 6c46d01f
...@@ -132,7 +132,7 @@ curs507a_new_(const struct nv50_wimm_func *func, struct nouveau_drm *drm, ...@@ -132,7 +132,7 @@ curs507a_new_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
nvif_object_map(&wndw->wimm.base.user, NULL, 0); nvif_object_map(&wndw->wimm.base.user, NULL, 0);
wndw->immd = func; wndw->immd = func;
wndw->ctxdma.parent = &disp->core->chan.base.user; wndw->ctxdma.parent = NULL;
return 0; return 0;
} }
......
...@@ -444,14 +444,17 @@ nv50_wndw_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state) ...@@ -444,14 +444,17 @@ nv50_wndw_prepare_fb(struct drm_plane *plane, struct drm_plane_state *state)
if (ret) if (ret)
return ret; return ret;
ctxdma = nv50_wndw_ctxdma_new(wndw, fb); if (wndw->ctxdma.parent) {
if (IS_ERR(ctxdma)) { ctxdma = nv50_wndw_ctxdma_new(wndw, fb);
nouveau_bo_unpin(fb->nvbo); if (IS_ERR(ctxdma)) {
return PTR_ERR(ctxdma); nouveau_bo_unpin(fb->nvbo);
return PTR_ERR(ctxdma);
}
asyw->image.handle[0] = ctxdma->object.handle;
} }
asyw->state.fence = reservation_object_get_excl_rcu(fb->nvbo->bo.resv); asyw->state.fence = reservation_object_get_excl_rcu(fb->nvbo->bo.resv);
asyw->image.handle[0] = ctxdma->object.handle;
asyw->image.offset[0] = fb->nvbo->bo.offset; asyw->image.offset[0] = fb->nvbo->bo.offset;
if (wndw->func->prepare) { if (wndw->func->prepare) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment