drm/nouveau/fbcon: take runpm reference when userspace has an open fd
authorBen Skeggs <bskeggs@redhat.com>
Fri, 2 Oct 2015 04:03:19 +0000 (14:03 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Mon, 12 Oct 2015 03:54:40 +0000 (13:54 +1000)
commitf231976c2e8964ceaa9250e57d27c35ff03825c2
tree4463b69ae15d4a5f41f0f0db518df8304b49f4f4
parent953132b56a43c707979df8da7bfd00931bdfe695
drm/nouveau/fbcon: take runpm reference when userspace has an open fd

We need to do this in order to prevent accesses to the device while it's
powered down.  Userspace may have an mmap of the fb, and there's no good
way (that I know of) to prevent it from touching the device otherwise.

This fixes some nasty races between runpm and plymouth on some systems,
which result in the GPU getting very upset and hanging the boot.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/nouveau/nouveau_fbcon.c