]> git.baikalelectronics.ru Git - kernel.git/commit
drm/nouveau: Move PBN and VCPI allocation into nv50_head_atom
authorLyude Paul <lyude@redhat.com>
Sat, 2 Feb 2019 00:20:04 +0000 (19:20 -0500)
committerLyude Paul <lyude@redhat.com>
Tue, 5 Feb 2019 23:19:44 +0000 (18:19 -0500)
commit39aae673e791a7d4dfb97d23eabcd5f8622aa8c1
tree70b74b594f5856f2fd4e3652d076afef5c098a8d
parent1a3bcb82842e01a9d6e5a7dc368b88fa3bf02bd3
drm/nouveau: Move PBN and VCPI allocation into nv50_head_atom

Atomic checks should never modify anything outside of the state that
they're passed in. Unfortunately this appears to be exactly what we're
doing in nv50_msto_atomic_check() where we update mstc->pbn every time
the function is called. This hasn't caused any bugs yet, but it needs to
be fixed in order to ensure that when committing an artificially
duplicated state (like during system resume), that we reuse the PBN of
that state to perform VCPI allocations and don't recalculate a different
value from the drm connector's reported bpc.

Also, move the VCPI slot allocations while we're at it as well. With
this, removing a topology in suspend while using nouveau no longer
causes the new atomic VCPI helpers to complain.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Fixes: 338faaf89bf4 ("drm/dp_mst: Start tracking per-port VCPI allocations")
Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190202002023.29665-5-lyude@redhat.com
drivers/gpu/drm/nouveau/dispnv50/atom.h
drivers/gpu/drm/nouveau/dispnv50/disp.c
drivers/gpu/drm/nouveau/dispnv50/head.c